Repository navigation
fix(implementer): a stray closing fence is not file contents - #1577
Merged
Merged
Conversation
PROJ-9999 canary on main at 4e4161c, 2026-10-11. Four implementer replies in a row were correct YAML followed by one closing ``` (no opening fence) or a final ---. Strict parsing fails on either. The fallback added in #1573 then kept the stray line as the last line of the file, so compilable Python was refused with "SyntaxError at line 317" on a line the model never wrote as code. The cap was exhausted and the project was kicked back. strip_trailing_markers() drops blank, fence and separator lines from the END of a reply, flush-left only. parse_yaml_lenient uses it, so these replies parse without any fallback; the fallback uses it too. Also: the verifier is shown EVERY file of a pattern-matched family when the family fits a 30 KB budget. Quoting the first and last of twelve got "the evidence only shows the contents of two CSVs" and a rejection. A larger family quotes the ends and says how many it left out. Contract, unit and integration suites: 8543 passed. ruff 0.17.0 clean. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V7QkYvK7jaE1QVY1ZMfAt2
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 happened
Canary PROJ-9999 on
mainat 4e4161c was kicked back at step 28. Two causes, both in changes made earlier in this series.1. Reply recovery (#1573). Four implementer replies in a row (gpt-oss-120b) were correct YAML followed by one closing
```with no opening fence, or a final---. Strict parsing fails on either ("found character '`' that cannot start any token"; "expected a single document"). The fallback from #1573 then recovered the artifact but kept the stray line as the last line of the file, so compilable Python was refused:Line 317 was the fence. Before #1573 the fallback did not match this reply shape at all, so this path is a regression introduced there.
2. Pattern evidence (#1574). The collector listed all twelve files of a family but quoted only the first and last. The verifier rejected: "the provided evidence only shows the contents of two CSVs … cannot verify that each of them sums to its respective N".
Changes
yaml_extract.strip_trailing_markers()drops blank, fence and separator lines from the end of a reply, flush-left only.parse_yaml_lenientapplies it, so these replies parse as YAML with no fallback;_regex_parse_implementerapplies it too. An indented fence insidecontentsis kept._pattern_evidencequotes every file of a matched family when the family fits a 30 KB budget; a larger family quotes the first and last and states how many are listed but not quoted.Tests
```,```yaml,---,..., with blank lines, combined) written and executed throughwrite_artifacts.Contract, unit and integration suites: 8543 passed, 21 skipped.
ruff==0.17.0clean.Not verified: a canary run with this change.
🤖 Generated with Claude Code
https://claude.ai/code/session_01V7QkYvK7jaE1QVY1ZMfAt2