Repository navigation
fix(edit-cage): lead the unparseable-test refusal with a fix-the-syntax-error hint (RIPR-SPEC-0289) - #8993
Conversation
|
Warning Review limit reachedEnable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Next included review available in 10 minutes. View limit details
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
Summary by CodeRabbit
WalkthroughWhen an edit-cage refusal identifies an unparseable newly written test, recovery narration now begins with a syntax-error instruction. Existing refusal details remain after the hint. Tests cover parse-specific and unrelated refusals. Documentation and traceability records describe the behavior. ChangesEdit-cage parse-error hint
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~12 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to
|
There was a problem hiding this comment.
Code Review
This pull request introduces a clearer error hint when an agent-repair attempt's newly written test fails to parse, prepending a plain syntax error message to the refusal narration. It also updates the relevant documentation, specifications, and adds corresponding unit tests. Feedback on the changes suggests avoiding fragile substring matching in the violation detection logic to prevent test fragility, though this must be balanced against the need to distinguish parse errors from other inline region violations.
…ict-corpus ledgers (#8991)
|
Bounded independent review/integration coordination (2026-10-20): current head 45411e3 remains with the existing writer. Returned to Draft for the material source-confirmed r4330965451 concern: the Please repair on the existing branch: either carry evidence-backed parse attribution, or use truthful selected-file parse wording and preserve the useful syntax/restart guidance conditionally. Include production-only corruption and valid over-budget controls. Reconcile spec/docs with that actual contract and add focused proof of the shared refusal consumers/recording (r4330965583) before exact-head rereview. Do not apply the Gemini suggestion to treat every OutsideInlineTestRegion as malformed syntax; the production_edit negative case must retain its meaning. Remote integration subject verified: 7cac39e, parents a816499 and this candidate, tree 95ac4c6843fdae5eb7256044fccefed3369f5a3b. No merge/qualification requested; no competing writer created. |
|
Independent exact-head review: REPAIR_REQUIRED Reviewed head: [P1] Confirmed unsupported attribution in r4330965451. The Smallest useful repair, retained with this PR's existing writer: use truthful selected-file/region wording and conditional syntax guidance, including the possibility of an analysis limit; alternatively carry an evidence-backed typed distinction before attributing failure to an added test. Update spec/docs/literal tests together. Retain production-only malformed and valid-over-budget negative controls, and establish the rendered/recorded/JSON consumer path with bounded proof after repair. No broad before-phase qualification campaign is needed for this finding. Validation observed: standalone producer harness compiled and ran with exit 0; both controls reproduced the false premise. Focused The Gemini suggestion to remove reason discrimination was source-refuted separately in r4331480838 and only that thread was resolved after reply/readback; the attribution and missing consumer-proof threads remain open. No candidate code or branch was changed. No readiness or merge clearance is granted. |
|
Owner / governing claim: #8991 / #8993. The existing writer retains Complete adoption diff — 10 changed files:
The narration now describes the whole selected-file observation, explicitly includes analysis limits, and makes syntax advice conditional. It no longer infers a newly written test or an established syntax error. Reason discrimination and existing bounded recovery remain intact; spec/docs/changelog/traceability agree. Fresh exact-head checks all exited 0:
Independent substantive exact-head review found no remaining source/test findings after repairing fixture imports and the stale negative oracle. It covered the producer, predicate, actual consumers, sentence normalization, test stimulus/oracles and contract parity. Review disposition remains REVIEW_INCOMPLETE for hosted merge qualification. Local integration proof also passed all five controls and both fixture tests at Reused evidence: the unchanged observer/budget reasoning and the source-refutation of Gemini's kind-only suggestion. The historical SIGKILL library compilation remains incomplete, never a pass. The old-wording runtime red witness and intermediate oracle/compile failures remain recorded on their original subjects; later exact-head passes do not rewrite them. Access limits preserved: the all-state #8991 PR search via gh GraphQL and GET classic main Next / owner / resume condition: the canonical writer can adopt this exact descendant after checking no concurrent branch changes, for example by fetching the adoption ref and fast-forwarding the existing candidate from expected Actual merges: none. No Ready transition or hosted qualification campaign was requested. Adoption follow-through — 2026-10-21Fresh checks confirm the canonical PR is still Draft at All PR Conversation comments, submitted reviews and inline threads were read. There is no owner acknowledgment or transfer after this handoff. Attribution thread Concrete owner action requested: the existing writer of |
…test; bind the predicate to the real observation (#8991 review)
|
Review of record, head 024ff12 (single-reviewer pass). 🤖 Generated with Claude Code https://claude.ai/code/session_01NnZhkThzBwCEoDGo2rn4Yo Generated by Claude Code |
# Conflicts: # docs/specs/README.md # policy/doc-artifacts.toml
…pt to the 6-arg recovery-lines signature (#8991)
There was a problem hiding this comment.
Decision
- Needs verification checks before upstream.
Verification questions
- Confirm the renderer remains the single narration owner, so stderr, recorded refusal reason, and JSON envelopes should receive the same leading line without per-surface changes.
- Confirm the required recorded-refusal and JSON-envelope behavior is not directly proven by the changed tests.
- Confirm the required shared-surface proof for recorded and JSON refusal narration is specified but not directly evidenced by the added tests.
Refuted
- The hint is applied to every OutsideInlineTestRegion refusal, making the Gemini suggestion incorrect.; refuted because: The predicate requires the producer-specific unparseable detail, and the negative production_edit control confirms other reasons do not receive it.
- The hint still misattributes a whole-file parse failure to a newly written test.; refuted because: The current wording and producer-linked test name the selected file and cover production-only syntax corruption, so the earlier attribution objection no longer applies.
- Using only the OutsideInlineTestRegion kind would add a syntax hint to non-parse refusals.; refuted because: The implementation requires the producer-owned unparseable detail and has a negative control proving production_edit does not receive the hint; prior discussion rejected replacing the distinction with kind-only matching.
- Checking only the violation kind would add the parse hint to unrelated OutsideInlineTestRegion refusals.; refuted because: The predicate also requires the producer-owned unparseable detail, and the negative control confirms a production_edit refusal does not receive the hint.
Evidence gaps
- Model proof intent was rejected by deterministic validation.
- The mapped tests are present in source, but this packet lacks a successful cargo-test receipt; ripr exited 2 and cargo-test was scheduled late, leaving execution as residual verification risk.
- The available sensor evidence does not yet confirm the mapped Rust tests pass.
Governing issue or accepted claim: #8991
Acceptance delta (one sentence): the OutsideInlineTestRegion parse-error refusal now opens with the plain "the test written for this attempt does not parse — fix the syntax error and start the attempt again" statement before the existing bounded-recovery detail, on every surface that renders the refusal.
What changed
crates/ripr/src/cli/commands/agent.rs(repair_after_cage_recovery_lines, the edit-cage refusal renderer): when the after-phase verdict refuses the attempt with anOutsideInlineTestRegionviolation whose region-observation detail reportsunparseable, the narration's first line is now "the test written for this attempt does not parse — fix the syntax error and start the attempt again." The refused-path listing, terminal-attempt statement, and CRLF-aware undo route below it are unchanged. Because stderr, the recordedlast_after_refusal.reason, and the--jsonrefusal/failure envelopes all carry these narration lines, every surface benefits from the one renderer.crates/ripr/src/edit_cage/mod.rs: newrefusal_is_unparseable_new_testpredicate owned beside theOutsideInlineTestRegionreason producer (evaluate_edit_cage), so the renderer does not string-match on vocabulary owned elsewhere; a module name (a Rust identifier) can never smuggle the marker in.docs/specs/README.md,policy/doc-artifacts.toml, and.ripr/traceability.toml.unparseable_new_test_refusal_leads_with_the_plain_hintpins the exact first line and that the recovery detail (refused-path listing,`mod tests`: unparseabledetail, terminal statement, CRLF undo route) still follows;other_inline_region_refusals_do_not_lead_with_the_parse_hintis the negative control for every other refusal reason. Existing pin sites assert substrings (undo the refused changes,--phase beforepresence/absence), which the added leading line does not disturb;docs/REPAIR_ATTEMPT.mdrecords the new lead line in the terminal-attempt narration contract.changelog.d/8991-edit-cage-parse-error-hint.md.Non-goals
Incomparable-with-empty-violations narration (agent repair: before phase commits an attempt whose baseline it already recorded ambiguous (exit 0, no disclosure), so the guided after phase always refuses Incomparable with a misleading recovery message #7204), the violation reason stored in the attempt manifest, or any other refusal family.