Repository navigation
fix(review): let scheduled deliveries use the structural review cache - #1067
Conversation
Co-authored-by: Masato Hoshino <[email protected]>
|
Codex review: needs real behavior proof before merge. Reviewed August 8, 2026, 1:26 AM ET / 05:26 UTC. ClawSweeper reviewWhat this changesThe PR validates and reuses a workflow-reserved review lease so scheduled deliveries can enter the structural-cache path without posting a second start comment. Merge readiness⛔ Blocked until real behavior proof from a real setup is added - 7 items remain Keep open: the PR fixes lease coordination and reservation activity, but it leaves the target-head comparison that still prevents scheduled structural-cache hits whenever the reviewed repository’s default branch advances. Priority: P1 Review scores
Verification
How this fits togetherThe scheduled review workflow reserves a durable lease before invoking ClawSweeper’s review command. The command validates that lease, probes the structural cache, then either reuses a prior verdict or hydrates the item for a fresh Codex review. flowchart LR
A[Scheduled delivery] --> B[Reserved review lease]
B --> C[Review command]
C --> D[Lease validation]
D --> E[Structural cache decision]
E -->|Cache hit| F[Reuse recorded verdict]
E -->|Cache miss| G[Hydrate and run review]
Before merge
Findings
Agent review detailsSecurityNone. Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Copy recommended automerge instructionTechnical reviewBest possible solution: Allow scheduled structural reuse to ignore cross-review target-head movement while retaining the existing same-run revalidation and cache-age ceiling, then demonstrate an after-fix scheduled delivery with a real reserved lease and zero hydration. Do we have a high-confidence way to reproduce the issue? Yes—source reproducible: a scheduled delivery with a valid reservation can pass the new coordination path, but a changed target head still returns Is this the best way to solve the issue? No—the lease-aware change is a useful partial repair, but it does not resolve the moving-default-branch condition central to #1052. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 985651bf6642. LabelsLabel changes:
Label justifications:
EvidenceAcceptance criteria:
What I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
What Problem This Solves
Supersedes #1053 by @masatohoshino — same bug, smaller seam. Closes #1052.
Scheduled review deliveries run with
--skip-start-commentbecause the exact-review queue reserves their lease before the runtime starts. That flag also disabled structural-cache coordination wholesale, so unchanged items were fully re-reviewed (Codex spend + API quota) every scheduled pass and could flip verdicts.The Fix
Instead of restructuring review preparation (+837 in #1053), the cache path learns to use the supplied scheduled-delivery lease: coordination is enabled when a supplied lease exists, the lease is validated and claimed inside the existing structural-cache flow, and the cache decision is re-evaluated against the reservation's own timestamp so owned-lease activity no longer reads as
activity_changed. No preparation logic moves; the target-head cache policy is untouched. +463/−64 across 5 files, 285 of which are the workflow-level regression fixture.Proof
cache-hit structural-unchanged skip-hydration-model #1052,structural_cache_hits=1 ... hydrations=0(46/46 in the fixture file).pnpm test:unit: 1,961/1,963 pass (2 skipped), 0 fail.Credit: commit carries
Co-authored-by: Masato Hoshino— the diagnosis and test approach originate from #1053.