Repository navigation
feat(review): carry re-review finding history and flag late findings - #384
Conversation
|
Codex review: needs changes before merge. Reviewed July 4, 2026, 3:15 AM ET / 07:15 UTC. Summary Reproducibility: yes. for the patch defect by source inspection: a legacy durable comment with a public-body Review metrics: 2 noteworthy metrics.
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:
Copy recommended automerge instructionNext step before merge
Security Review findings
Review detailsBest possible solution: Harden legacy marker extraction, keep the strict ledger parser and tests, then merge only after maintainers accept durable PR comments as parseable review-history state and exact-head checks pass. Do we have a high-confidence way to reproduce the issue? Yes for the patch defect by source inspection: a legacy durable comment with a public-body Is this the best way to solve the issue? No, not until legacy marker extraction is hardened. The ledger design is otherwise narrow, but the previous-comment conversion needs to trust the footer/local marker instead of the first marker in the full body. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against d7d856dd6e3b. Label changesLabel changes:
Label justifications:
Evidence reviewedSecurity concerns:
Acceptance criteria:
What 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
|
…syncs ClawSweeper edits one durable review comment in place, so every re-review sync erased what earlier cycles found and the reviewer model only ever saw the latest cycle. Reviews could then surface one previously visible concern per cycle across many cycles without any accountability. PR keep-open comment syncs now carry a compact review-history ledger of earlier cycles (reviewed-at, head sha, verdict, finding titles) inside the durable comment, capped at eight cycles and deduped on re-syncs of the same review. The review context exposes the parsed ledger as previousClawSweeperReview.earlierReviewCycles plus a completedReviewCycles count. The review prompt now requires re-review continuity: verify prior findings first, report every remaining blocking concern in one pass, and mark findings on previously reviewed unchanged code with the new optional reviewFindings lateFinding flag, which round-trips through reports and renders in the durable comment.
CodeQL flagged the marker-attribute regex as polynomial on repeated unclosed marker prefixes. Replace it with the same indexOf-based linear comment scan the main module uses for HTML markers.
9ee80d1 to
d98977d
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
Land-ready proof for
The first live exact-item review found that latest-cycle extraction still used the legacy broad priority-bullet scanner. |
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
…penclaw#384) * feat(review): carry re-review finding history across durable comment syncs ClawSweeper edits one durable review comment in place, so every re-review sync erased what earlier cycles found and the reviewer model only ever saw the latest cycle. Reviews could then surface one previously visible concern per cycle across many cycles without any accountability. PR keep-open comment syncs now carry a compact review-history ledger of earlier cycles (reviewed-at, head sha, verdict, finding titles) inside the durable comment, capped at eight cycles and deduped on re-syncs of the same review. The review context exposes the parsed ledger as previousClawSweeperReview.earlierReviewCycles plus a completedReviewCycles count. The review prompt now requires re-review continuity: verify prior findings first, report every remaining blocking concern in one pass, and mark findings on previously reviewed unchanged code with the new optional reviewFindings lateFinding flag, which round-trips through reports and renders in the durable comment. * fix(review): scan review markers linearly instead of with a lazy regex CodeQL flagged the marker-attribute regex as polynomial on repeated unclosed marker prefixes. Replace it with the same indexOf-based linear comment scan the main module uses for HTML markers. * fix(review): skip status comments in review history * fix(review): preserve accurate re-review history * fix(review): reject forged history markers * fix(review): trust only local review controls * fix(review): keep previous findings section-scoped --------- Co-authored-by: Peter Steinberger <[email protected]>
Problem
ClawSweeper edits one durable review comment in place. Each re-review therefore erased the visible record of earlier findings, so later reviewers could rediscover unchanged concerns one cycle at a time. The pipeline also could not distinguish a genuinely new regression from a finding that was already visible on an earlier reviewed head.
Fix
This branch adds a compact, versioned review-history ledger to pull-request review comments and carries that history into later review prompts.
lateFindingsignal through schema, reports, and durable comments.The parser accepts only the exact locally rendered ledger structure. Before appending local history and automation markers, comment rendering neutralizes every model-authored ClawSweeper control marker, including case and whitespace variants. That prevents untrusted review text from forging history, status, verdict, or action controls on both keep-open and close paths.
User impact
Contributors and maintainers get one durable comment that explains how the review evolved instead of losing prior cycles. Re-review prompts can verify resolved findings, avoid serial rediscovery, and identify unchanged-code late findings with actual Git history. Issue comments remain unchanged.
Real behavior proof
Ran a redacted two-cycle dry-run under Node 24 against the built production
dist/clawsweeper.jsrender/extract path. The input deliberately included unrelated P1/P2 bullets in risk and next-step sections. The second production render retained the first real finding in its durable ledger, and the next-review context carried the earlier cycle while exposing no false current findings:The real exact-item ClawSweeper review at
d98977d2then found that the latest-cycle branch still used the old broad scanner. Head1a51be649dremoves that scanner, makes both latest and earlier cycles use the section-aware parser, and adds an integration assertion with risk/next-step priority bullets.Evidence
node --test test/review-history.test.ts test/apply-label-sync.test.ts— 30 passing on the final code.d98977d2CI:pnpm check, Windows launcher, CodeQL, and Socket all passed; final-head CI is the merge gate.Coverage includes forged-marker injection, case/whitespace variants, close-comment rendering, detailed findings beyond the compact summary cap, risk/next-step exclusion from latest and earlier cycles, capped history totals, stale/failed cycles, idempotent sync, prompt/schema continuity, and apply comment-sync integration.