Repository navigation
fix(review): stop code from rewriting model findings, ratings and proof status - #1773
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 changesThe branch preserves model-authored findings, risks and ratings, and makes the model’s proof assessment determine proof applicability. Example: A maintainer reads a review containing “Add the required changelog entry.”
Review scores
ProductKind: Bug fix · Worth it: Yes Merge readiness✅ Ready for maintainer review This PR advances the established model-owned review direction and contains useful work that current main has not implemented; no concrete patch defect was found. Priority: P2 Before mergeNone. FindingsNone. Provenance
Tests
Agent review detailsHow this fits togetherClawSweeper turns model decisions into stored reviews, public comments, labels and automation verdicts. These changes affect the parsing and proof checks between the model’s assessment and those outputs. flowchart TD
A[Model review decision] --> B[Structure validation]
B --> C[Stored review report]
C --> D[Proof and readiness checks]
D --> E[Public review comment]
D --> F[GitHub labels]
D --> G[Opted-in automation verdict]
Technical reviewBest possible solution: Keep semantic review judgments with the model while preserving structural validation, report-integrity checks and independent automation boundaries. Do we have a high-confidence way to reproduce the issue? Yes, from source: the base parser deletes qualifying contributor findings and risks, changes correctness, and synthesizes a replacement rating; the supplied before/after transcript exercises that trigger. This review did not execute target code. Is this the best way to solve the issue? Yes: removing the competing judgment paths directly addresses the cause and follows the established model-owned contract; structural and independent safety checks remain. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 9f3d54f8f0ca. Provenance checked
TestingProof path: in-process harness. 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 8, 2026, 6:51 PM ET / 22:51 UTC. |
What
This PR removes the code that rewrote or replaced the reviewer model's decision (inventory batch B, "decision normalization overrides"). The model findings, next step, correctness, risks, PR rating, and proof status now go through as the model wrote them. Code still validates structure only.
Removed judges:
src/clawsweeper-decision-parser.tsnormalizeDecisionForItem: the contributor changelog stripper. Three regexes deleted findings and next steps about changelog entries for OpenClaw contributor PRs. The code then changedoverallCorrectnessfrom incorrect to correct, cleared the work lane, and replaced the modelprRatingwithderivedPrRating. Also removed:isOpenClawContributorPullRequest,isContributorChangelogEntryFinding,STANDALONE_CHANGELOG_ENTRY_REQUEST,NEXT_STEP_CLAUSE_SEPARATOR,CLEAN_OPENCLAW_PR_REVIEW_NEXT_STEP, and theDecisionNormalizationItemtype andisMaintainerAuthorAssociationdependency that only this code used.src/clawsweeper-decision-parser.tsisEnvironmentAccessCaveat: a prose regex (GH_TOKEN, shallow clone, unauthenticated gh) that removed modelrisks.src/clawsweeper-rating.tsnormalizePrRatingproof cap:proofTierFromRealBehaviorProoflowered the modelproofTierandoverallTierwhen a verification receipt was attached. Only the structural rule stays (0 to 3nextSteps, none for S/A/NA).src/clawsweeper-rating.tsderivedPrRating,patchTierFromReview,defaultRatingNextSteps: a heuristic scorer that made a rating from proof status, finding priorities, and confidence thresholds. It ran when the stored rating was missing or malformed, when a maintainer PR had a D/F proof tier with N/A proof, and from the changelog stripper.src/clawsweeper-runtime.tsisDocsOnlyPullRequestReportand every use of it: the proof gate exemption insrc/clawsweeper-proof-policy.ts, the forced fixed proof insrc/clawsweeper-report-parser.tsdefaultRealBehaviorProof/reportGeneralBehaviorProof,linkedPullCannotSupersedeDocsOnlySourceinsrc/clawsweeper-promotion-facts.ts, and the docs-only veto insrc/clawsweeper-coverage-proof.ts.isDocsPath,linkedPullRequestFiles,pullRequestFilePathsFromReport, and thefiles/filesKnownfields ofLinkedPullRequestSupersessionhad no other users, so this PR removes them too.Replacement:
NAtiers and says "This report has no valid PR rating. A fresh review must rate this PR." Rating-gated automation (stale-F close, D/F budget close, S/A/B guards) gets no tier from code.realBehaviorProof.statusdecides. For external PRs,sufficient,override, andnot_applicableclear the gate.needsContributorAction: trueormissing/mock_only/insufficientblock it. An external PR with no proof section, or one that does not parse, still counts asmissing(fail closed).not_applicablecannot clear proof when the model starts the summary with the authority-chain proof marker.No prompt or rules change was needed, so
REVIEW_POLICY_VERSIONis unchanged. The rules already cover this:prompts/review-item.md(realBehaviorProof): "not_applicablefor non-PR items, maintainer/bot PRs outside the gate, and docs-only PRs."prompts/review-item.md: "missingghauth,GH_TOKEN, a shallow clone, or unavailable authenticated GitHub does not lower confidence and is not a risk."src/repository-profiles.tsOpenClawpromptNote: "Do not make missingCHANGELOG.mda review finding, merge blocker, work item, or next-step blocker."instructions/pr-review-rules.md### Rating rubricowns all tiers.Why
Maintainer rule (AGENTS.md, "LLM systems"): never use a regex or code judge on LLM work. Code validates structure and enforces hard boundaries only. Inventory items, batch B (local code-judges inventory): changelog finding stripper and correctness flip,
isEnvironmentAccessCaveat,normalizePrRatingproof cap,derivedPrRating, and the docs-only path rule in runtime, report-parser, promotion-facts, and coverage-proof.Proof
Before =
origin/main9f3d54f dist, after = this branch dist.59 saved real reports (
~/Developer/.agents/handoffs/clawsweeper-review-quality/**and/tmp/rules-slice/**), re-rendered with the shippedrenderReviewCommentFromReport(dev/render-comments.mjs): 59 of 59 comments are byte-identical. No saved real report used a removed judge.Three real Codex decisions (167298, 167362, 144991) through the shipped
parseDecisionwith a contributor OpenClaw item. I parsed each one as recorded, and again with a contributor changelog finding, a required changelog next step, and a GH_TOKEN risk added:(167362 and 144991 give the same result.) Before, code deleted the model's finding, next step and risk, changed correctness, and replaced the model's B rating with a computed A.
docs/files, model proofmissingdocs/files, model proofnot_applicablenot_applicablemissingChecks:
pnpm run build:all,pnpm run lint, the fullnode scripts/run-node-tests.mjs all(6983 tests, 0 fail), and onepnpm run check(exit 0: build, lint, static checks, coverage gates, 6983 tests, 0 fail).Codex review dispositions
codex review --base origin/main(and an earlier run against--base main): "No actionable defects were found." No P0–P2 items to fix.Merge Danger
Door: two-way. Revert restores the old judges. No stored data or schema changes.
Blast radius:
realBehaviorProof.status: not_applicablenow skip the proof gate and can get a pass verdict. Before, only PRs whose files were all underdocs/could skip it. Adocs/-only external PR that the model marksmissingnow needs proof (before, code exempted it). The authority-chain proof marker and failed or malformed verification receipts still block.rating: 🌊 off-meta tidepoollabel and NA tiers instead of a computed tier. Close promotions that need a D/F tier do not fire for them, and S/A/B close guards do not protect them. A fresh review restores the model's rating.docs/-only PR because the canonical PR changes code. The model coverage-proof step andunsafeCanonicalPullRequestReasonstill apply.