You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
cache: date-ranged queries republish the month shards they skipped, byte-identical, on every run #1032
Found by the upgrade-path verification harness (hardening track B), reproduced 3× in a row on main.
A date-ranged query — e.g. status --format json (the statusline/menubar fast path) — republishes the month shards its range skipped (claude.2026-05, claude.2026-06, codex.2026-05, codex.2026-06) with new nonce filenames every run, with nothing changed. Content is byte-identical (same bytes, same entry counts), so it is wasted I/O, not history loss — but on a real 6 GB corpus those are the big shards, and it partially defeats #1007's "a warm launch rewrites only the month that changed."
Mechanism: the deferred-merge path in saveCache (src/session-cache.ts:~1080-1088) — the unloaded buckets come out dirty despite no change and go through read-modify-republish. Likely the per-file dirty marking on a scoped load touching a bucket that wasn't loaded (or markCacheDirty for a bucket the entry was "last saved in" being set for untouched files).
Fix: unloaded, unchanged buckets must be carried by envelope reference (as #1007 intended); only buckets with an actual entry mutation may be dirty. Add an assertion to the upgrade-path harness (currently a note) that a warm ranged run changes zero shard filenames when nothing changed.
Activity
fix(cache): stop republishing month shards a scoped run never read
fix(upgrade-path): warm snapshot ignores the envelope and index files
Fix upgrade-path script safety and currency labels (#1914)