Repository navigation
Print each staged-row source warning once per run - #1709
Merged
Merged
Conversation
Four tests in tests/unit/input failed when the folder ran in file order and passed alone. TestOutputFieldPromotionInTaskPreparer patches scope_builder.build_field_context_with_history, and the code under the patch imports prompt.service for the first time. prompt.service binds that name at import, so it kept the mock for the rest of the process, and every later prompt build read the mock's source, which has no ticket_id. The test module now imports prompt.service and context_provider, the two modules that bind the name at import, before any patch runs. Closes #1702 Signed-off-by: Muizz Lateef <Lateefmuizz@gmail.com>
validate_source_reads_below runs in _check_and_prepare, which the walk calls twice for each staged file: from precheck_staged_file, before the first file is processed, and from process_initial_stage, when the file is processed. Each call logged its warnings, so every one printed twice. The pre-check logs them. The processing pass runs the same checks with warn=False, so a refusal still stops the run, and each warning prints once per file. Closes #1700 Signed-off-by: Muizz Lateef <Lateefmuizz@gmail.com>
Signed-off-by: Muizz Lateef <Lateefmuizz@gmail.com> # Conflicts: # agent_actions/input/preprocessing/staging/_MANIFEST.md # agent_actions/input/preprocessing/staging/field_validation.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1700. Now based on main, since #1708 merged.
Problem
validate_staged_source_readsruns in_check_and_prepare, which the walk calls twice for each staged file:precheck_staged_file, before the first file is processed;process_initial_stage, when the file is processed.Each call logged its warnings, so every warning printed twice.
Change
validate_staged_source_readsand_check_and_preparetakewarn=True.process_initial_stagepasseswarn=False. The walk pre-checks every staged file it will process (a file limit does not shorten that pass), so the pre-check's log is the one that prints.warnflag.Verification
test_each_warning_prints_once_per_staged_file, with one and two staged files, run through a realagac run. On main each warning printed twice and the test failed; now it passes.tests/unit/inputandtests/integrationgive 3089 passed. The 3 failures are tokenizer downloads my sandbox cannot reach.