Skip to content

Make lineage caches family-aware and atomic #28

Description

@iam-brain

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    wayfinder:taskPrerequisite task on a Wayfinder map

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions