Enforce repair contract at every checkpoint#341
Conversation
|
Codex review: needs maintainer review before merge. Reviewed June 25, 2026, 10:38 AM ET / 14:38 UTC. Summary Reproducibility: not applicable. as an issue reproduction; this is a PR adding optional repair-contract enforcement. The changed behavior is source-verifiable and the PR body includes terminal dry-run output for accepted and rejected checkpoint cases. Review metrics: 2 noteworthy metrics.
Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land the contract only after maintainers accept Do we have a high-confidence way to reproduce the issue? Not applicable as an issue reproduction; this is a PR adding optional repair-contract enforcement. The changed behavior is source-verifiable and the PR body includes terminal dry-run output for accepted and rejected checkpoint cases. Is this the best way to solve the issue? Mostly yes technically: the patch addresses the predecessor blockers by defining the canonical field and using structured NUL-delimited parsing. Product acceptance of the new artifact field and fail-closed policy remains the open maintainer decision. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 323f7bdf7236. Label changesLabel justifications:
Evidence reviewedWhat I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
05484c7 to
da96bec
Compare
|
Updated this PR after the maintainer deep review on #340. Changes now address the two blockers called out there: Validation run locally: All passed. @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
v3 update pushedI updated this PR to address the maintainer blockers from #340 instead of reopening or duplicating that closed PR. What changed: Validation run locally: Result: Local dry-run executor proof with canonical |
|
@clawsweeper re-review Please review the current head |
|
Small implementation-shape note for review: if maintainers prefer a narrower contract activation policy, I can make that adjustment in this PR without changing the overall design. The intentionally small knobs are: One extra architectural motivation for this shape: keeping That keeps the core provider-neutral: ClawSweeper owns schema, validation, git/checkpoint safety, and PR mechanics, while any external worker that can emit the canonical artifact can interoperate through the same contract. This should make the repair lane easier to extend safely without growing backend-specific logic in the core. Those would be narrow follow-ups on the current head, not a new PR and not a redesign of the checkpoint gate. |
Summary
Update the repair checkpoint contract after maintainer review on #340.
This revision moves the contract from manually injected unsupported fields into the canonical fix artifact contract:
The checkpoint gate now activates only when
fix_artifact.repair_contractis present. It continues to bypass uncertain/incompletelikely_filesso stale planning hints do not fail-close otherwise valid repairs.What changed from the closed #340 approach
This directly addresses the two maintainer blockers from #340:
Scope
Semantics
Validation
Observed result:
Local repair-worker dry-run proof
I ran the real
dist/repair/execute-fix-artifact.jsexecutor locally in--dry-runmode withCODEX_BINset to a deterministic fake Codex binary. This exercises the executor, subprocess boundary, git checkout, checkpoint helper and dry-run report path without pushing or opening PRs.The fixture uses the canonical field now accepted by the schema:
{ "repair_contract": { "must_touch": ["docs/repair-contract-proof.md"], "match": "any", "scope": "every_checkpoint" } }1. Allowed checkpoint when
repair_contract.must_touchis changedSetup:
Observed result:
2. Rejected checkpoint when only an off-contract file is changed
Setup:
Observed result:
Error:
Relation to closed PRs
Jhacarreiro/clawsweeper#2was closed as local hygiene; the useful parser idea is represented here through porcelain v1 z parsing.