Address lightweight follow-up issues #266, #269, #271, #274, #275#277
Conversation
- #266: Document that run_with_log uses stderr=subprocess.STDOUT uniformly for all agent backends (Claude, Codex, Gemini) - #269: Add workdir guidance to the non-compact build_plan_revision_prompt path, matching the compact path that already included it - #271: Add unit tests covering the coder_followup path through attempt_envelope_normalization (duplicate footer, trailing prose, prose before footer) - #274: When envelope normalization fixes a structural defect but validate(normalized) raises UnknownPriorItemDispositionError, attempt a combined deterministic strip from the normalized candidate so both defects are resolved in one pass - #275: Ensure strip_unknown_prior_item_dispositions inserts a newline separator between re-encoded JSON and the trailing footer when the original was tightly packed; add tests verifying tight-pack output validates correctly Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Opened PR #277 addressing all five issues. #266 — stderr routing verified uniform: All three agent backends (Claude, Codex, Gemini) call #269 — Non-compact plan revision prompt gains workdir guidance: Added #271 — coder_followup path through #274 — Combined envelope+disposition strip: When #275 — Tight-packing newline fix: Tests: -- Anthropic Claude |
|
Review verdict: Approved No blocking issues found in the focused fixes for prompt workdir guidance, deterministic response repair, stderr capture documentation, or the added regression tests. -- OpenAI Codex |
|
Review verdict: Approved Review complete. The PR successfully addresses the follow-up issues, including adding necessary workdir guidance to the non-compact plan revision prompt, correctly handling combined repair paths, and accurately applying tighter spacing in stripped payloads. -- Google Gemini |
Summary
This PR addresses five lightweight follow-up issues from earlier planning and PR reviews.
#266 — stderr routing uniform across all backends
Verified that
run_with_logalready usesstderr=subprocess.STDOUTfor all three agent backends (Claude, Codex, Gemini). Added a comment inrunner.pydocumenting this intentional, uniform behavior.#269 — Non-compact plan revision prompt missing workdir guidance
Added
_coder_workdir_guidance(config, implementation=False)to the non-compactbuild_plan_revision_promptreturn value (line 1187 inprompts.py), matching the compact path that already included it via_compact_plan_stable_prefix.#271 — coder_followup path through attempt_envelope_normalization untested
Added three unit tests covering the
coder_followuppath throughattempt_envelope_normalization: duplicate AGENT_STATE footer (fixed), trailing prose after signature (fixed), and prose before footer (returns None).#274 — Combined envelope+disposition strip
When
attempt_envelope_normalizationfixes a structural defect butvalidate(normalized)raisesUnknownPriorItemDispositionError, the orchestrator now attempts a combined deterministic strip from the normalized candidate. This resolves both defects in one pass without falling through to the full repair pass. Added an integration test that exercises this combined path.#275 — json.dumps tight-packing fix
strip_unknown_prior_item_dispositionsnow inserts a\nseparator between the re-encoded JSON and the trailing footer/signature when the original had no whitespace between them. Added tests verifying tight-packed inputs produce valid output and surviveparse_structured_pr_reviewvalidation.Test plan
python3 -m pytest tests/test_agent_loop.py -qcoder_followuppath through `attempt_envelope_normaliz #271, Follow up future plan-review note: Consider a later cleanup to let deterministic disposition stripping operate on an env #274, Follow up future plan-review note: Verify that re-encoding the JSON with json.dumps in strip_unknown_prior_item_disposit #275Closes #266, #269, #271, #274, #275
🤖 Generated with Claude Code