Repository navigation
design(atlas): span-table schema for offset embeds (#6035) - #9425
Conversation
Settles the span schema under #6028: spans/spans_vectors/file_version_spans/chunk_span_map tables, byte offsets, split-on-reference (the question #6036 §4 left open), invariants I1-I8, phased migration from the ~107,639-chunk store with permanent chunk-id resolution, and the #5733 dedup coordination (0.9 Jaccard edge classifies, never authorizes reuse). Design only; implementation split in §9.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 59 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 932464d97d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| whole old spans. **This design adopts split-on-reference**, #6036's | ||
| recommendation: the restricted range becomes a new span whose | ||
| snapshot is the restricted text, re-embedded, with provenance |
There was a problem hiding this comment.
Align split ranges to UTF-8 character boundaries
For non-ASCII edits, the byte matcher can return a copy range ending inside a UTF-8 character. For example, changing "a" * 128 + "é" to "a" * 128 + "ê" produces a 129-byte matching prefix ending with the shared 0xC3 byte. Re-embedding that restricted range as prescribed here requires an invalid UTF-8 snapshot, which the existing atlas-embed API (embed(&[&str])) cannot accept; replacing invalid bytes would instead violate exact reconstruction. Define character-boundary adjustment during span resolution, moving incomplete characters into the literal region before storing or embedding the split spans.
Useful? React with 👍 / 👎.
| - **Rollback.** Until Phase 4, the chunk store is untouched and | ||
| authoritative for unverified content; abandoning the migration | ||
| is dropping the §4 tables. After Phase 4, rollback is a |
There was a problem hiding this comment.
Preserve Phase 3 ingests during rollback
If rollback occurs during Phase 3, dropping the §4 tables loses all content ingested since that phase began: lines 217–219 explicitly switch new ingests to span-only writes, so those records have no chunk-store representation to fall back to. The advertised rollback remains available until Phase 4, but its procedure is only safe before Phase 3. Either retain dual writes throughout the rollback window or require re-exporting span-only ingests before dropping the span tables.
Useful? React with 👍 / 👎.
|
Salvage note (duplicate-PR protocol, task 17310, lane code-c, 2026-11-16): PR #7624 carries an EARLIER, different design doc for the same deliverable #6035 (doc/2026-11-08T10-15-00Z_design_atlas_span_table_schema.md, commit f83f19c). Its content was diffed against this PR's landed record (doc/2026-11-13T10-55-11Z_design_atlas_span_table_schema/) before closing #7624 as superseded. Unique to the duplicate: an alternative, more elaborate schema built on interning tables (span_text, span_windows, span_contexts, span_occurrences, per-store index mapping), its own invariant set, and a go/no-go section — none of which the landed design adopted (the landed record settles spans/spans_vectors/file_version_spans/chunk_span_map + split-on-reference instead). The one overlapping element, the 17–241 worked example, is covered by the landed record §8. Nothing from the duplicate is required by the landed design; the alternative schema remains reachable at commit f83f19c if a future design wants to revisit interning. |
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.