Repository navigation
fix(greenfield): deliver the whole test failure to the feedback owner, not just the first item - #107
Merged
Merged
Conversation
…not just the first item
A single assert over many items (for example a list of response-time samples
compared with []) failed with 84 violations, and the fixer only ever saw the
first one: pytest's quiet mode elided the comparison diff ("Use -v to get more
diff") and truncated the assertion message. One fix-and-reverify cycle (about
1.5 hours on a sample web project) uncovered one violation at a time.
- Test runs that collect failure evidence (the implement-stage test feedback
probe, verify's per-file runtime checks and the test command) render
assertions fully (`verbosity_assertions=2`, set through the Python language
profile / adapter; test selection is unchanged).
- The full failure text is stored under CoDD's state directory (the feedback
stage's own directory; `.codd/verify` for verify) and the prompt excerpt
collapses lines that differ only in volatile tokens (numbers, hex ids) into
the first line plus a count, then applies the existing head/tail window and
names the stored file.
- Verify's per-file runtime output now gets the same window (it had none).
- The impl-blind test re-derivation prompt is unchanged (no verify output).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014yyaLv8ZQ3GiQnmizx4cqb
CoDD Audit❌ Audit failed to run. Check workflow logs. |
Coverage Matrix ReportProject: /home/runner/work/codd-dev/codd-dev
Totals: 369 axes, 176 covered signals (47.70%), 193 unknown. |
…feedback loop Review follow-up for the first version of this PR. - Verify's runtime checks, test command and the Python verify profile are back to main's behaviour: CoDD no longer rewrites PYTEST_ADDOPTS, so a project's own default (for example a wrapper that sets it only when unset) keeps selecting the same tests, and flaky-restart classification is unchanged. - The feedback probe raises assertion verbosity inside the pytest process it is already injected into; selection, counts and verdicts are unchanged. - Grouping masks only long numbers (5+ digits), long hex runs, UUIDs and addresses, so short codes such as HTTP 401 vs 403 stay distinct. - The window is applied after joining the excerpts returned to one owner (unstable-test outputs no longer pile up past it). - A suite timeout's partial output and a pre-collection error (for example a broken root conftest) are stored in full as well. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014yyaLv8ZQ3GiQnmizx4cqb
…ures for evidence Second review follow-up. - Runs that decide verdicts (the round suite, candidate suites and isolation runs) use pytest's default assertion rendering again: a more verbose AssertionError text could change a test that matches on it. - When a returned failure shows pytest's elision markers (kept as data in the pytest feedback adapter), that one case is re-run once with full assertion rendering, inside the existing isolation time budget. Its text is used only as evidence, and only when it failed at the same place and phase. - Masked tokens use placeholders that do not occur in ordinary output, so a literal "#" can no longer collide with a masked number. - Fixed instructions to the owner stay outside the window; only the evidence is windowed. - The loop's state directory is never treated as a declared output (a `**/*.txt` glob no longer makes stored evidence writable or part of the existing-output context). - An aborted start after earlier commands reported cases still stores the full output. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014yyaLv8ZQ3GiQnmizx4cqb
Third review follow-up. - Evidence re-runs (full assertion rendering for an elided failure) run only after the round's verdict isolation runs are done and only within the time that is left, so they never push a verdict run out of the budget. While other owners are still unprocessed in the round, the original text is returned. - When the re-run text is used, the original (verdict) text comes first and the re-run text follows, labelled as a re-run whose different rendering can show a different reason. - Elision markers are matched after trimming surrounding whitespace (`--tb=native` indents them). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014yyaLv8ZQ3GiQnmizx4cqb
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What
A test that checks many items with one assert (for example a list of response-time samples compared with
[]) failed with 84 violations, and every fixer (the implement-stage test feedback owner and the verify-stage repair) saw only the first one. pytest's quiet mode elided the comparison diff ("Use -v to get more diff") and truncated the assertion message to 240 characters; CoDD's own 12,000-character window was never reached. On a sample web project each fix-and-reverify cycle (about 1.5 hours) uncovered one violation at a time. Run alone with full assertion output (about 4 minutes), the 84 violations were 4 batches x 21 actors with 2 distinct causes.Change (scope: the implement-stage test feedback loop)
main.verbosity_assertions, set inside the probe that the loop already injects), after the round's verdict isolation runs and only within the time left. The re-run text is used only as evidence and only when it failed at the same place and phase; the original text comes first, the re-run text follows with a note that its rendering can show a different reason. While other owners are still unprocessed in the round, the original text is returned..codd/implement-test-feedback/.failure-evidence), including a suite timeout's partial output and a pre-collection error. The state directory is never treated as a declared output.main.Guarantees kept
main.Tests
tests/greenfield/test_full_failure_evidence.py(real pytest on a synthetic project, fake AI). Onmain(744a2ac) the feedback evidence misses the second cause and the per-file verify output exceeds the window.tests/greenfield tests/repair tests/languages: 1631 passed, 3 skipped (local dogfood replay artifacts absent; same skips onmain). Full suite: the same 25 environment failures asmain(plusTestRealNpmCi::test_lock_and_manifest_agree_after_finalization, which also fails onmainwhen run alone here: a realnpm cithrough the Windows npm)..pytest_cache) that a later isolation run reads (verdict runs already do the same), an unstable case that passes in isolation keeps the elided suite text, a command ending in; truecan hide a start-up failure, and 5-digit business codes collapse like ids (the count is shown).Greenfield autopilot: SUCCESS.🤖 Generated with Claude Code
https://claude.ai/code/session_014yyaLv8ZQ3GiQnmizx4cqb