Conversation
Publish completed-window cache results after each pending bounded pass, so an earlier publication cannot suppress later updates. Keep existing scope and completeness checks and final downward reconciliation. Cover resumed sessions across local days, active/archive copies, parser migration, and discovery completion with synthetic fixtures. Refs #3508, #3303, #3420.
|
🦞👀 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. Reviewed September 27, 2026, 11:23 PM ET / September 28, 2026, 03:23 UTC. ClawSweeper reviewWhat this changesThe branch makes CodexBar refresh validated Codex cost snapshots after each pending catch-up pass and adds synthetic regression coverage and documentation for that behavior. Merge readiness✅ Ready for maintainer review Current main and v0.68.0 can retain an earlier Codex cost snapshot after a later scan pass validates newer totals. This PR addresses that remaining publication gap. The broader catch-up investigation and the separate counter-reset reports remain open. Priority: P2 Review scores
Verification
How this fits togetherCodexBar scans local Codex session files into a cost cache. Its usage store publishes validated cache snapshots to the menu and widget while bounded historical scanning continues. flowchart LR
A[Codex session files] --> B[Bounded cost scan]
B --> C[Local cost cache]
C --> D{Reporting window validated?}
D -->|Yes| E[Usage store snapshot]
D -->|No| F[Retain prior snapshot]
E --> G[Menu and widget]
F --> G
Before mergeNone. Agent review detailsSecurityNone. Review metrics
Technical reviewBest possible solution: Publish each newly validated same-scope reporting window during catch-up, retain incomplete history, and let the final complete snapshot reconcile totals in either direction. Do we have a high-confidence way to reproduce the issue? Yes. The current-main guard and the focused before/after assertion establish a deterministic source-level path, though this read-only review did not run the test. Is this the best way to solve the issue? Yes. Reusing the existing completed-cache and scope checks is a narrow repair that preserves final downward reconciliation. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 579f68406855. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
Codex catch-up kept a one-time publication flag after showing its first validated window. Later bounded passes could update that window while historical work remained pending, but the menu and widget retained the earlier snapshot. Retry the existing guarded cache publication after each pending pass.
The regression checks that a validated $4 result replaces $2 before the next automatic sleep, then allows the final authoritative correction to $1. Added synthetic coverage for event-time bucketing over three local days, active/archive copies, parser-revision migration, and discovery completion. Production line count is unchanged.
Validation used a temporary SwiftPM harness containing the repository's app/core sources and focused test files, with byte-identical
Package.resolvedpins:Before the fix: 16 passed, one failed because the worker still showed $2 instead of $4. After the fix: 28 passed, one opt-in benchmark skipped, zero failures across three suites. The opt-in 1,500-file/150,000-event benchmark also passed. The isolated P2 review found no actionable issues.
Refs #3508
Refs #3303
Refs #3420
TMPDIR="$PWD/.build/task-tmp" make checkpassed:Found 0 violations, 0 serious in 2671 files.Four pre-existing SQLite lock tests that timed out during shared filesystem pressure passed on isolated retry (4/4). The final broad check also passed its process-cleanup and cache-writer tests.