GeezerVison is showing github.com — design(atlas): delta-only ingestion + offset embeds — land only changes; span-anchored chunks with non-doubling joins · Issue #6028 · developing-today/code
design(atlas): delta-only ingestion + offset embeds — land only changes; span-anchored chunks with non-doubling joins #6028DescriptionParent: #6018 (Atlas ingestion program). Statements S35–S38 of the 2026-11-04 brief.
Requirement (Drew, in substance)
Delta-only ingestion
Re-ingesting a largely unchanged corpus must land only the deltas. Drew's numbers: a 21 GB corpus of which 20.5 GB is already in Atlas — re-running ingestion over it must NOT update every file, retag everything, or edit all metadata to carry a new date. What lands is exactly:
- all the new files, and
- the edits to the old files — edits carry a new date and repeat some overlapping data, and that overlap repetition is accepted rather than engineered away.
Untouched content is not re-embedded, not re-tagged, not re-dated. (Content-addressed landing per #3125 is the natural mechanism; this design makes "we only take the deltas" a stated, testable guarantee of the ingest path, including metadata: no mass metadata edits for unchanged objects.)
Offset / overlap embeds
The chunker need not re-chunk a changed file along fresh boundary lines. The system may accept embeds with different overlaps that are not along boundary lines, recorded as spans into the current file version. Drew's example:
An embed is accepted whose content, joined to the file's most recent version, runs from index 17 to 241 — because indices 0–16 matched a prior embed. A different embed covers another end; everything after 241 matched a different embed. Only this one diff is new.
So an edit produces a small set of span-anchored embeds covering the changed region (with whatever overlap the matcher needed), anchored by offsets into the current version, each embed knowing which prior embeds its head and tail matched.
Search-time join
A search hit shows the full paragraph — and when results are joined together, lines that were merged do not double up. The join reconstructs source text exactly once: overlapped spans between sibling embeds (and between an embed and the file version it anchors to) are deduplicated at reconstruction, so a paragraph assembled from three overlapping embeds reads as the paragraph, not as three stuttering copies.
Design must answer
- Change detection per source type: git (commit diff), plain trees (hash walk), databases/session stores (watermarks + row hashes) — and the cost ceiling for detection itself (a detection pass that reads 21 GB to save embedding 20.5 GB has only won if reads are much cheaper than embeds; say so with numbers).
- Span anchoring: offsets in what unit (bytes/chars/lines), against which version id, and how anchors survive a subsequent edit (offset drift — when does an anchored embed detach, and how is detachment detected and logged?).
- Overlap acceptance rules: minimum match run to anchor on (the 0–16 head match), maximum overlap fraction before an embed is just a duplicate (interacts with the #5733 ≥0.9 dedup edge), and occurrence recording for the matched spans (an embed's matched head is an occurrence of the prior embed's content — #3125 semantics).
- Join/reconstruction: paragraph assembly from overlapping embeds + version text; the no-double-up guarantee stated as a testable invariant; behavior when the underlying version is cold or retired (sibling versioning design).
Done looks like
A design doc: delta-detection per source with cost model, the span-anchored embed format, acceptance thresholds, join semantics with the non-doubling invariant, and a worked example using Drew's 17–241 case end to end. Implementation split into follow-ons.
Activitydeveloping-today commented on Nov 5, 2026 dezren39 commented on Nov 5, 2026 Research verdict: the span model is the design — CDC is the wrong engine at embed scale
The prior-art pass (Cluster 1) settles this design's central mechanism choice:
- Content-defined chunking is refuted as the embed-layer engine. Backup CDC (LBFS Rabin; FastCDC, USENIX ATC '16) targets ~512 KiB–8 MiB chunks; embedding chunks are ~1–2 KB, where min/max constraints dominate and the dedup bought is small. Decisively: embeddings are not hashes — a restic chunk is identical bytes, but an embedding is a function of the chunk's exact text including its window neighbors. CDC can make bytes line up; it cannot make yesterday's vector the right vector for today's window. CDC also degrades under structural shift (a +15-byte insertion invalidated 57% of 64 KiB FastCDC chunks in a controlled test). A feasibility follow-up (#6040) will verify this verdict on our own corpus before it forecloses anything.
- The design is the rsync/restic span model. (a) Matching: rsync's sliding-window matcher (rolling weak checksum, strong verify on hit — Tridgell & Mackerras 1996) aligns a new version against prior spans at arbitrary offsets — it is literally the mechanism that computes "0–16 matched span A, 17–241 is new, 242+ matched span B." (b) Storage: a file version is an ordered list of span references
(embed_id, start, end) (restic/borg shape); the version costs only its new spans plus a manifest row; spans are reused only when byte-identical. (c) Reconstruction: results carry their own text (a hit reads correctly alone), and the join deduplicates by interval union per file version — sort spans by start, merge overlapping/adjacent intervals, emit each byte once. That is the testable form of this issue's non-doubling invariant.
- Failure catalog the design must answer (from the research): vector drift on identical content under changed windows; top-K crowding by near-duplicate v1/v2 chunks; phantom diffs from pure re-wrapping; orphan spans whose surrounding context changed meaning (span context — heading path — must version with the reference, not the span).
Wave-2 children filed under this issue
- #6035 — spans as (file_version_id, start, end) + text snapshots; migration from the chunk store
- #6036 — the rsync-style matcher design
- #6037 — structural-first splitting per source type
- #6038 — how much a vector/rank moves with different neighbors
- #6039 — 0/10/20% overlap vs recall and index size
- #6040 — verify the CDC verdict on the real corpus
— Wave-2 research fold-in, 2026-11-04 (prior-art doc: ~/workspace/scratch/atlas-ingestion-brief-2026-11-04/prior-art-research.md) dezren39 commented on Nov 5, 2026 Triage — task 10395 (lane code-e, 2026-11-05)
Verdict: valid design parent, already decomposed — no implementation at current main, nothing to fix directly in this issue.
Evidence checked fresh this pass:
- Issue design(atlas): delta-only ingestion + offset embeds — land only changes; span-anchored chunks with non-doubling joins #6028 is OPEN, no hard-stop labels (
held, user/owned, do-not-merge, do-not-auto-edit absent). Parent tracker atlas ingestion program: semi-automated updates, versioning, provenance, feedback — long-term design + tasks (2026-11-04 brief) #6018 is OPEN.
- No PR references design(atlas): delta-only ingestion + offset embeds — land only changes; span-anchored chunks with non-doubling joins #6028 (searched all states) and no competing branch owns this work.
- At current
main, Atlas is the chunk-based search service in pkgs/atlas-search (corpus chunks referenced by corpus_chunk_id against ~/atlas/v3/corpus.db). There is no span table, no delta-only ingest path, and no offset-embed join in the tree — this design is pre-implementation, as filed.
- The central mechanism question is already settled on this issue (research verdict, 2026-11-04 comment): CDC is refuted as the embed-layer engine; the design is the rsync/restic span model — sliding-window matcher at arbitrary offsets, a file version as an ordered list of span references
(embed_id, start, end), and search-time reconstruction by interval union per file version (each byte emitted once — the testable form of the non-doubling invariant).
Routing / ordering (the follow-ons already exist — do not re-file):
- design(atlas): span-table schema — spans as (file_version_id, start, end) with embedded-text snapshots #6035 — span-table schema
(file_version_id, start, end) + text snapshots; migration from the chunk store. Foundation; goes first.
- design(atlas): offset-matching algorithm — rsync-style sliding-window matcher for span alignment #6036 — rsync-style offset matcher design. Depends on the design(atlas): span-table schema — spans as (file_version_id, start, end) with embedded-text snapshots #6035 span shape.
- design(atlas): chunk-boundary policy v2 — structural-first splitting per source type #6037 — structural-first chunk-boundary policy per source type. Feeds both of the above.
- Research gates, in parallel with 1–3: research(atlas): boundary-drift measurement — how much a paragraph's vector/rank moves with different embedding neighbors #6038 (boundary drift), research(atlas): overlap budget experiment — 0% / 10% / 20% overlap vs golden-set recall and index size #6039 (0/10/20% overlap budget), research(atlas): CDC feasibility at embedding scale — FastCDC with ~512-token targets vs the span approach #6040 (verify the CDC verdict on the real corpus before it forecloses anything).
- Cross-issue dependencies the design doc must respect: design(atlas): content versioning + retention — versions, rename lineage, newest-resolution, cold rollout, deletion triggers #6026 (content versioning + retention — version ids and cold/retired behavior the anchors bind to), atlas: provenance registry (chunk occurrences), content-addressed extracts, multi-DB vector resolution #3125 (provenance registry / occurrence semantics for matched spans), Atlas search: Jaccard as a third signal (rescore + ingest dedup); SPLADE as a triggered follow-on #5733 (≥0.9 Jaccard dedup edge — the maximum-overlap acceptance threshold interacts directly), design(atlas): embedding cost ledger — per-batch token/$ accounting with a delta reuse-ratio alert #6058 (embedding cost ledger — the delta reuse-ratio is the cost-model proof for "reads are much cheaper than embeds").
What remains for this issue itself: the consolidated design doc answering its four questions (per-source delta detection + cost ceiling, span anchoring + drift/detach, overlap acceptance thresholds, join semantics + the worked 17–241 example). That doc is the synthesis of #6035–#6040, so it is correctly sequenced after those children land their designs/measurements — writing it now would freeze thresholds the research gates are meant to set. No blocker from Drew; the ordering above is the record.
Queue: task 10395 completes as triaged with this routing. The children carry their own queue tasks (all labelled queue/queued at check time). dezren39 commented on Nov 13, 2026
Progress from repo-worker-code-a: verified: design record is PR 8336; checking its state, implementation follow-ons not yet filed dezren39 commented on Nov 13, 2026 🤖 Agent note · released-free (fallback)
- Agent: repo-worker-code-a, lane code-a (fallback mode: queue backend down)
- Issue: design(atlas): delta-only ingestion + offset embeds — land only changes; span-anchored chunks with non-doubling joins #6028 — design record is PR docs(atlas): per-source delta detection + non-doubling join semantics (#6028) #8336 (docs-only, branch queue/14409-6028-delta-join, head 22b93df), still OPEN.
- Codex gate blocks merge: 4 undispositioned P2 findings from chatgpt-codex-connector[bot] on PR docs(atlas): per-source delta detection + non-doubling join semantics (#6028) #8336 — review comments 4531706861 (update-sensitive watermark for mutable tables), 4531706875 (preserve uncovered residue above dedup threshold), 4531706887 (clip intersecting spans to paragraph before emission), 4531706899 (preserve superseded versions until retention permits retirement). Per the Codex findings gate these must be fixed in the PR or replied to on-thread before any merge.
- Also remaining: implementation split (a)–(d) named in the record is not yet filed as follow-on issues.
- Next: first laptop-up lane edits PR docs(atlas): per-source delta detection + non-doubling join semantics (#6028) #8336 to disposition the 4 findings, merges it, then files follow-ons (a)–(d). Laptop route is DOWN this shift, so no branch edit was possible here.
dezren39 commented on Nov 13, 2026
Released by repo-worker-code-a (outcome: free). Design record PR #8336 still OPEN; merge blocked by 4 undispositioned Codex P2 findings (4531706861/6875/6887/6899) needing laptop branch edits (route down); implementation follow-ons (a)-(d) not yet filed. Note posted on #6028. dezren39 commented on Nov 14, 2026 Released to the queue under Drew's 2026-11-13 unblock-all order (main chat, 23:53 CT). Task(s) 15281 moved from blocked/parked to queued in the fleet unblock-all pass (worker main-unblock-all-2026-11-13). Dependency gates still recorded on a task remain recorded — the dependency checker will re-block it if a gate is genuinely unmet. dezren39 commented on Nov 14, 2026
agent-note:v1
state: done (triaged — design record merged; implementation follow-ons filed)
Outcome: the blocker is cleared. Design PR #8336 merged (e9cf612) and #6028 closed by the merge.
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|