codeburn/docs/design
Doug Gabehart 35ad1e6b3a fix(status-snapshot): address PR #999 review — 5 correctness bugs + doc relocation
Responds to ozymandiashh's CHANGES_REQUESTED review on #999.

Structural: kept the disk status-snapshot, scoped to serve's documented
CLI-spawn-fallback path, after bringing its invalidation to parity with
serve's own in-process memo (see docs/design/perf-cache-fix.md for the full
reconciliation reasoning against #972's serve.ts/watcher invalidation,
already merged into this branch's ancestry).

Correctness fixes:
1. queryKey now includes the same four pricing-config hashes parser.ts's
   own cacheKey deliberately includes (proxyPaths/modelAliases/
   priceOverrides/localModelSavings), so an edited pricing config
   invalidates the snapshot instead of waiting for an unrelated corpus
   change.
2. computeCorpusFingerprint now gives network providers (e.g.
   vercel-gateway) a now-stamped synthetic fingerprint entry every call,
   mirroring parseAllSessions' own treatment of the same sources, instead
   of letting them contribute nothing to the hash.
3. computeCorpusFingerprint generically expands any directory-shaped
   non-Claude source (e.g. mistral-vibe) via a new collectFilesRecursive
   helper, instead of only Claude getting leaf-file expansion.
4. saveStatusSnapshot is now gated on isSessionHydrationComplete(), so a
   degraded read-only parse can no longer be checkpointed as authoritative.
5. The settle-window defer in loadStatusSnapshot now anchors on wall-clock
   time since the fingerprint FIRST mismatched (persisted via a new
   mismatchFirstSeenAt field) instead of the corpus-wide newest mtime,
   which fix #2 can otherwise keep perpetually "recent."

Also fixes a 6th instance of the same defect class as #1, found while
root-causing a test failure: the query key omitted the active display
currency, so switching currencies kept serving stale numbers. Updates
tests/parse-workers.test.ts, whose "warm" assertion assumed every
menubar-json call does a full parse — no longer true within the settle
window after this PR's own snapshot feature.
2026-08-19 13:29:35 -05:00
..
codeburn-desktop-plan.md docs(desktop): implementation plan (T0 scaffold, T1 emitters, 6 sections, integration) 2026-07-10 14:49:20 -07:00
codeburn-desktop.md docs(desktop): design spec + wireframes for standalone CodeBurn Desktop app 2026-07-10 14:28:16 -07:00
codeburn-mcp-plan.md Scope the root test script to tests/ so npm test runs from a clean install 2026-08-09 10:19:58 -05:00
codeburn-mcp.md docs(mcp): add design spec for codeburn MCP server 2026-06-02 01:20:58 -07:00
perf-cache-fix.md fix(status-snapshot): address PR #999 review — 5 correctness bugs + doc relocation 2026-08-19 13:29:35 -05:00