Repository navigation
refactor(review): read PR readiness and comments from typed records - #1891
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 changesThis PR makes readiness, proof policy, labels, automation markers and public comments read the saved typed review decision. Example: A report’s typed record contains an A rating while its legacy markdown fields contain C.
Review scores
ProductKind: Refactor · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this PR open: it completes a useful typed-record cutover absent from current main, and source review found no actionable introduced defect. Priority: P3 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherStored review reports enter the publication readers, which produce GitHub comments, labels and advisory repair-loop readiness markers. flowchart TD
A[Stored review report] --> B[Strict typed record reader]
A --> C[Legacy readers when record absent]
B --> D[Shared decision projection]
C --> D
D --> E[Proof and readiness policy]
E --> F[Comments labels and automation markers]
Technical reviewBest possible solution: Complete the shared typed-decision cutover while preserving strict validation, legacy compatibility and existing publication guards. Do we have a high-confidence way to reproduce the issue? This is a refactor; current-main source confirms that readiness and publication still reconstruct the affected fields from markdown. Is this the best way to solve the issue? Extending the existing typed projection keeps dependent consumers together and retains the established record format and fallback boundary. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 56f90615e6cd. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
LabelsLabel changes:
Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
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 HistoryReview history (1 earlier review cycle)
Reviewed October 10, 2026, 8:02 AM ET / 12:02 UTC (Revision 2). |
5451726 to
2c1f380
Compare
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
What
Complete row 2 slice S4b after #1861.
reportReviewDecisionsupplies proof, rating, showcase, readiness and public-comment fields from the typed record. Reports without the line retain their existing readers; an unreadable line never falls back.proof: override, maintainer/bot exemptions, empty-summary handling and the authority-chain marker (including leading whitespace). Independent data-model compatibility remains intact.No stored format or schema changes. OpenClaw Bay is unaffected: this changes the source of already-existing comment and label decisions, not its observer data contract.
Proof
Frozen branch head:
545172673195895f7bef8e0b697fe04875050cd3.Main baseline:
9e8717ba669e480507db031901d8787cf3d077e5.Run the S4 saved-corpus driver against both built trees:
The driver exercises
renderReviewCommentFromReportand the shippedapply-decisions --sync-comments-only --item-numbers NCLI. Its recording GitHub transport is the existingpromotionGhMock, with its hard-codedhead-shareplaced by each saved report's head so check/status requests address the same fixture. No live GitHub mutations are exercised. Volatile apply timestamps and scratch paths are masked as in S4a.Corpus: the same 73 saved real reports used by S4a (59 PR reports, nine saved production reports, five issues), with no-record, backfilled, real-record and corrupt-record variants.
147/147 readable comments are byte-identical. All 159/159 CLI comparisons are identical, including label calls, all recorded GitHub calls, published comment bodies, apply results and report markdown. Every corrupt record is skipped with
skipped_changed_since_reviewand zero GitHub calls. The render harness includes local stack traces in failures, so their path-dependent error strings are not byte-equal; both implementations reject all 12.Artifacts:
~/Developer/.agents/handoffs/clawsweeper-review-record/s4b/complete/{proof.ts,proof.out,proof-table.md,render-*.json}.Checks
pnpm run build:all— pass.pnpm run lintandpnpm run format:check— pass.codex review --base origin/mainon the frozen committed head — no actionable findings; its reported build and 207 focused tests passed.Earlier local reviews found and this head fixes: mixed automation-marker readers, reviewed-main evidence-link loss, multiline scalar prose leakage, whitespace-prefixed authority requirements, and zero-diff promotion rendering before the record update.
A supplemental pre-final-projection 80,000-record reader run processed 6.4 GB without retaining the corpus (about 174 MiB peak heap on the branch). It is not claimed as an exact-head full production-corpus benchmark; additional memory sweeps were deferred as requested.
CI repair after rebasing on main
Current head:
2c1f380671efb42511bd2a2c687abeeb51433ae3.Rebased on
56f90615e6cd5cd24ea1507e020f32d7487bf414, including #1887, #1885 and #1888. The earlier corpus results above remain historical evidence at their explicitly named head, not a claim that they were rerun here.The failing test in https://github.com/openclaw/clawsweeper/actions/runs/38048164365 failed during fixture construction, before apply ran: it corrupted the record and then tried to render a synced comment. S4b correctly makes that renderer reject unreadable typed records. This is not a regression in the apply fail-closed path or an interaction with the security-label/source-revision changes.
The fixture now renders the last valid synced comment first and corrupts the stored record afterward. Its non-dry-run
apply-decisionsinvocation uses temporary item/closed directories and a recording GitHub transport. It asserts the persistedskipped_changed_since_reviewdisposition, the explicit fresh-review-required reason, no closed report, and zero GitHub calls (therefore zero mutations). No production fallback was added and no assertion was weakened.Validation (pueue task 1401):
pnpm run build:all, six focused files includingtest/apply-stale-version-bug-policy.test.ts, record/label/close-policy tests (45 passed, zero failed),pnpm run lint,pnpm run format:check, andcodex review --base origin/mainall passed; Codex reported no actionable defects. Committed-head review (pueue task 1408) also reported no actionable defects. This is a fixture-only CI repair; existing changelog and Bay scope remain unchanged. No live GitHub mutations or full-suite execution are claimed.