Repository navigation
Open
Labels
area/infraInfrastructure, deployment, and operationsInfrastructure, deployment, and operationskind/designA design proposal (design-architect): multi-step, phased, decision-bearingA design proposal (design-architect): multi-step, phased, decision-bearingtask/triageQueue packet kind: verify, reproduce, and route this itemQueue packet kind: verify, reproduce, and route this item
Description
Parent: #6018 (Atlas ingestion program). Statements S16–S20, S29, S30 of the 2026-11-04 brief.
Requirement (Drew, in substance)
Atlas must understand content versioning well enough that:
- New versions of files are first-class: a changed file lands as a new version of the same object, never an overwrite and never an unrelated new object.
- Renames are understood: a renamed file's versions continue the same lineage. For git sources this is simple if commits are done in the right way (renames recorded as renames instead of delete+insert) — the design may set commit-hygiene expectations for source repos, and must handle non-git sources (session stores, doc trees) where lineage has to be inferred (segment association, sibling design under #3125).
- Old and new are both kept, but resolution defaults to "the max" — the newest version of every file. Search/retrieval asks for a file and gets its latest version unless it explicitly addresses history.
- Old versions roll out to cold storage over time (2026-11-04 storage ruling: cold tiers → rustfs) — a lifecycle with hot → cold movement, not permanent hot residence.
- Old versions are eventually removed under an explicit policy with three named triggers, any of which can retire a version:
- by date — older than a threshold;
- by increments — N newer versions exist beyond it;
- by access — it has never (or no longer) been retrieved (this trigger consumes the retrieval statistics from the sibling stats/feedback design under #6018).
Tensions the design must face honestly
- #3125 carries Drew's 2026-10-31 rule: keep ALL data; nothing stripped to save space; only byte-identical dupes cleaned. The deletion policy above is a deliberate evolution of that rule (2026-11-04 brief) — the design must state which rule governs which tier/class, and default to keep unless a trigger AND a class rule both say retire. Deletion of a version must never orphan chunks whose occurrences point at it (occurrence registry semantics per atlas: provenance registry (chunk occurrences), content-addressed extracts, multi-DB vector resolution #3125).
- Newest-resolution interacts with fan-out search (#5755) and the parameter surface (#5774):
as-of/ version pinning becomes a query parameter, and full-version logging per run must record WHICH version of each file a result came from (feeds the query-trace design). - Cold rollout must preserve resolvability: a cold version still resolves (slower) until a deletion trigger fires; deletion is the only hard end.
Design must answer
- The version object model: identity (file id vs version id), lineage edges (rename, edit, split/merge of files), and how chunks map to versions (shared chunks across versions recorded as occurrences, not copies).
- Per-class retention defaults (code, docs, session logs, chat logs, generated reports likely differ) and who can override them.
- The retrieval-side contract: default-latest semantics, explicit history addressing, and how merge/rescore treats multi-version hits for the same file (one file, best version, unless the query is historical).
Done looks like
A design doc in code (doc/): version model, lineage rules per source type, retention policy table with the three triggers parameterized per class, cold-tier mechanics, and the query-side version contract — with implementation split into follow-ons.
Metadata
Metadata
Assignees
Labels
area/infraInfrastructure, deployment, and operationsInfrastructure, deployment, and operationskind/designA design proposal (design-architect): multi-step, phased, decision-bearingA design proposal (design-architect): multi-step, phased, decision-bearingtask/triageQueue packet kind: verify, reproduce, and route this itemQueue packet kind: verify, reproduce, and route this item
Activity
developing-today commentedon Nov 5, 2026
CODE-1692
dezren39 commentedon Nov 5, 2026
Research findings that change this design: git records NO renames; newest-resolution is a view
Two Cluster-2 findings reshape the versioning design:
-M50%; copies need-C). Documented failure modes: rename + heavy edit in one commit drops under threshold (reads as delete+create); file splits/merges are invisible to whole-file similarity; large diffs silently hit the rename limit. Drew's instinct — rename-only commits,git mv, no simultaneous edit — makes git lineage a convention-dependent hint, and this design may set that commit discipline for our repos, but Atlas must compute and store its own lineage edges (via segment search / the dedup-edge pipeline) as first-class data, with git's-Moutput as one input signal. Non-git sources (chats, logs, session stores) have no git signal at all — another reason the lineage graph lives in Atlas's tables.Wave-2 children filed under this issue
— Wave-2 research fold-in, 2026-11-04 (prior-art doc:
~/workspace/scratch/atlas-ingestion-brief-2026-11-04/prior-art-research.md)dezren39 commentedon Nov 5, 2026
🤖 Agent note · picked up
dezren39 commentedon Nov 5, 2026
Triage result — #6026
dezren39 commentedon Nov 5, 2026
🤖 Agent note · done
dezren39 commentedon Nov 5, 2026
Decision record for the PITR/Atlas-retention boundary: read the record. It records Turso PITR as whole-database disaster recovery and keeps per-version lineage, cold rollout, and policy deletion in Atlas. PR #6269 will close follow-on issue #6043 when merged.