Fix Finish now history catch-up - #2864
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs real behavior proof before merge. Reviewed August 11, 2026, 11:21 PM ET / August 12, 2026, 03:21 UTC. ClawSweeper reviewWhat this changesThe PR makes Usage & Spend’s Finish now use the larger of 30 days and the configured history window, and expands Codex catch-up progress tracking to persisted cursor state. Merge readiness⛔ Blocked until real behavior proof from a real setup is added - 9 items remain Keep this draft open. The effective-window fix addresses a real current-main mismatch, but the owner has explicitly asked not to merge it independently of the persisted-inventory decision in the companion work, and the added digest restores unbounded per-pass traversal. Priority: P2 Review scores
Verification
How this fits togetherUsage & Spend starts an accelerated local Codex-history scanner and reads its shared cache for progress and costs. Persisted scanner cursors determine whether bounded catch-up continues or is treated as stalled. flowchart LR
A[History window setting] --> B[Finish now action]
B --> C[Catch-up context]
C --> D[Bounded Codex scanner]
D --> E[Persisted scan cache]
E --> F[Progress decision]
F --> G[Dashboard status and costs]
Before merge
Findings
Agent review detailsSecurityNone. Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: After the companion scanner contract is decided, preserve the effective history-window behavior but obtain progress from a scanner-owned durable-progress signal and validate the actual settings-to-dashboard lifecycle. Do we have a high-confidence way to reproduce the issue? Yes—current source proves that dashboard catch-up uses 30 days while the primary catch-up uses the configured window. The reported real setup was not rerun during this read-only review. Is this the best way to solve the issue? No—the effective-window idea is correct, but the current digest is not the safest implementation because it performs whole-collection traversal and does not align with the approved companion scanner contract. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 26ebaf9d5b09. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
Thanks for isolating the shared-cache scope bug and for preserving arbitrary configured history values. The core This draft cannot safely land independently of #2849, though. The proposed progress digest covers current Please keep this draft open. After the persisted-inventory ownership decision on #2849, the right integration is to retain the effective-window concept but use scanner-owned |
Summary
max(30, configured history days).Root cause
The dashboard catch-up context always passed 30 days, even when the shared cache represented a wider configured history window. Its no-progress check also fingerprinted only file-parsing fields, so persisted discovery, lookback, or buffered-retry cursor advancement could be mistaken for a stall.
Implementation
User impact
Finish now now accelerates the full effective configured-history scope. Catch-up continues while durable discovery/lookback/retry cursors advance, while a genuinely unchanged pass still stops safely.
Validation
git diff --checkmake checkmake test: 840 selections across 70 groups, 0 failures and 0 retries.Fixes #2861
Refs #2815, #2848