Question
Implement lineage-aware incremental caching so parsed physical documents remain reusable while reconciled family results are invalidated whenever membership or member content changes, active-to-archive moves do not recount unchanged documents, schema changes cannot mix legacy and lineage totals, and cancellation never publishes partial cache or report state.
Locked constraints
- Cache parsed documents independently from reconciled accounting.
- Never treat a per-file accounting result as authoritative lineage output.
- Key reconciled results by a deterministic family fingerprint covering normalized Codex-home scope, member identities, and document content signatures.
- Recompute only affected families when possible; discovering a missing parent invalidates that family.
- Treat
sessions and sibling archived_sessions under one normalized Codex home as one source; never merge separate Codex homes.
- Cache updates and published totals are atomic after successful completion.
- Accounting mode and schema version prevent incompatible cache reuse.
Question
Implement lineage-aware incremental caching so parsed physical documents remain reusable while reconciled family results are invalidated whenever membership or member content changes, active-to-archive moves do not recount unchanged documents, schema changes cannot mix legacy and lineage totals, and cancellation never publishes partial cache or report state.
Locked constraints
sessionsand siblingarchived_sessionsunder one normalized Codex home as one source; never merge separate Codex homes.