Repository navigation
fix(repair): hash reports without the review_record line for implementation intake - #1842
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. What this changesClawSweeper excludes the structured review-record line from report revision hashes so adding that metadata does not restart issue implementation work. Example: An operator adds review_record to the audited report for issue 123.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review This PR remains necessary: current main still treats added record metadata as a changed review. No actionable introduced defect was found. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherIssue-implementation intake reads review reports and compares their revision hashes with saved audits to decide whether to queue or refresh repair work. This change keeps redundant structured metadata from changing that revision identity. flowchart TD
A[Stored review report] --> B[Remove structured record line]
B --> C[Hash remaining report]
D[Saved intake audit] --> E[Compare review revisions]
C --> E
E --> F[Reuse existing implementation work]
E --> G[Consider changed review for repair]
Technical reviewBest possible solution: Keep revision comparison in the shared intake hash owner while preserving every substantive report change. Do we have a high-confidence way to reproduce the issue? Yes: the contributor's main-versus-head intake CLI comparison shows an audited report becoming candidate 123 solely after adding review_record on main. Is this the best way to solve the issue? Yes: normalizing the shared revision input fixes candidate matching, refresh checks, and retry comparisons without introducing a parallel hash policy. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 410f120f8b9a. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
Review metrics
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed October 9, 2026, 4:23 PM ET / 20:23 UTC. |
What
Issue-implementation intake now hashes a report without its
review_recordline:reportRevisionSha256(markdown) = sha256(reportWithoutReviewRecord(markdown)).The line repeats the review. Adding it, either through a new review (#1838) or through the S2 backfill, must not look like a new review revision.
REVIEW_RECORD_KEYandreportWithoutReviewRecordmove intoreport-front-matter.ts, the light front-matter owner. Intake imports from there, so it stays free of the decision parser (the repair-intake dist copy test needs that).review-record.tsuses the same helper to drop an invalid record.Why
This is required before S2b may write (maintainer decision on row 2). Intake keys implementation jobs on a hash of the whole report. If a bulk backfill added the line, the next intake run would treat every item with an audit as changed:
issueImplementationJobNeedsRefreshreturns true;intakeAuditRetryDeferredstops deferring;dispatchedIssueImplementationWorkerRetryDuereturns true even after the attempt limit;repair-issue-implementation-backfilldispatches an intake workflow (and maybe a Codex worker) for each.The state branch currently has 1517 audits with a
job_report_revision_sha256and 1394 with a queued decision.Proof
Failing-first test (
test/repair/issue-implementation-intake.test.ts, "adding the review record does not change the implementation-intake revision"). Before the fix:After the fix it passes. The same test also checks two things: a queued audit made for the report without the line does not need a refresh, and a real front-matter change still changes the revision.
Shipped CLI, main vs branch.
node dist/repair/issue-implementation-intake.js candidates, run from each build on a strict-bug report whose intake audit (decision: not_eligible) matches it, before and after areview_recordline is added. The driver is in~/Developer/.agents/handoffs/clawsweeper-review-record/.Churn that S1 may already have caused. S1 merged at 2026-10-09T20:14:45Z. Measured on the
clawsweeper-statebranch at head55f7b21(2026-10-09T20:17:56Z), at 20:20:38Z: 0 of 2164 intake audits were prepared at or after S1, or hashed a report reviewed at or after S1. The lastrepair-issue-implementation-intakerun started at 20:07:25Z, before S1. So no stored audit holds a full-report hash of a report that has the line, and none will refresh because of this change. The count grows only for audits that intake writes between now and this merge. Re-measure with:build:all,lint,format:check, and the intake, worker-recovery, review-record and front-matter tests (82) pass.Codex dispositions
codex review --base origin/main:review_record. The measurement above found 0 such audits: intake has not run since S1. The clean-cutover rule keeps compatibility only for live stored data that is proven to exist, so the code has no old-hash fallback. Merging soon keeps the count at 0. If it grows before the merge, the worst case is one refresh for each of those items.Merge Danger
review_recordline the hash does not change. Reports with the line hash as if the line were absent. One-time refresh is bounded by the audits written between S1 and this merge (0 when measured).