Skip to content

design(atlas): span-table schema for offset embeds (#6035) - #9425

Merged
dezren39 merged 1 commit into
mainfrom
queue/12884-6035-span-schema
Nov 13, 2026
Merged

dezren39 merged 1 commit into
mainfrom
queue/12884-6035-span-schema

Conversation

@dezren39

@dezren39 dezren39 commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

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.
@dezren39
dezren39 requested a review from a team as a code owner November 13, 2026 10:56
@coderabbitai

coderabbitai Bot commented Nov 13, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You'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.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: ddc52c16-cdce-428b-8016-d0bc994b43bb
Commits

Reviewing files that changed from the base of the PR and between b78e91b and 932464d.

Files selected for processing: 1

  • doc/2026-11-13T10-55-11Z_design_atlas_span_table_schema/2026-11-13T10-55-11Z_design_atlas_span_table_schema.md
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-13T10:59:53.908668Z 932464d PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@dezren39
dezren39 merged commit d79ca41 into main Nov 13, 2026
1 check passed
@dezren39
dezren39 deleted the queue/12884-6035-span-schema branch November 13, 2026 10:58

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +53 to +55
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

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Comment on lines +233 to +235
- **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

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@dezren39

Copy link
Copy Markdown
Member Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant