Skip to content

feat(atlas-search): stable source-root + locator registration (#3125 slice 4) - #13485

Merged
dezren39 merged 1 commit into
mainfrom
lane-aad-3125
Nov 23, 2026
Merged

dezren39 merged 1 commit into
mainfrom
lane-aad-3125

Conversation

@dezren39

@dezren39 dezren39 commented Nov 23, 2026 •

Copy link
Copy Markdown
Member

Slice 4 of #3125, per the next-slice note on that issue (2026-11-23T11:05Z, restated 14:27Z): a stable source-root + locator registration in the registry, without altering existing data. Slice 3 (read side, PR #13450) is a different lane's and is untouched by this change.

What lands

  • New atlas-core module source_registry (source_roots + source_locators tables, created when absent in whichever database the caller opens — in production the phase-4 catalog database):
    • register_source_root — first registration stores the row; a repeat with the same base locator returns the stored row (created: false, original registered_at stands); a repeat with a different base locator is refused (a root id may not be re-pointed).
    • register_locator — idempotent per (root, locator); a locator under an unknown root is refused rather than orphaned.
    • source_root / locators_for_root — the read side resolution starts from (sorted, per-root).
  • Six oracle tests in tests/source_registry.rs, one per property: stability/idempotence, non-alteration (a seeded shard schema — chunks + chunk_occurrences with the aggregator's DDL — snapshotted byte-identical across new and repeat registrations), re-point refusal, unknown-root refusal, per-root resolution, empty-field refusal.
  • Book: the corpus-and-provenance chapter's atlas: provenance registry (chunk occurrences), content-addressed extracts, multi-DB vector resolution #3125 section records the slice.

Verification (laptop, worktree route)

  • cargo test -p atlas-core --test source_registry — 6 passed.
  • cargo test -p atlas-core (full suite, run twice) — 376 passed, 0 failed.
  • cargo fmt clean.
  • Clippy could not run in this environment: cargo clippy -p atlas-core --all-targets fails compiling the untouched atlas-proto crate with E0514 (serde/serde_json/sha2 rlibs from an incompatible rustc in the shared cache) — pre-existing, reproduces with a fresh target dir, unrelated to this change.

#3125 stays open: historical occurrence backfill (phase 3) and the catalog/shard layout (phase 4) remain, as does slice 3 in PR #13450.


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

…slice 4)

New atlas-core module `source_registry`: the registration layer the
#3125 provenance programme's phase-4 resolution builds on. A source
root is a stable named origin (a pinned repository, an extracts
corpus); locators — the source strings occurrence rows carry — hang
from a root.

Registration is stable and additive only:
- repeating a registration returns the first row unchanged
  (created: false), including its original registered_at;
- re-pointing an existing root id to a different base locator is
  refused — it would rewrite the meaning of recorded locators;
- a locator under an unknown root is refused;
- registration never updates or deletes any row, in its own tables
  or any other table of the database it is given.

Six oracle tests pin each property, including a non-alteration
oracle that snapshots a seeded shard schema (chunks +
chunk_occurrences, the aggregator's DDL) across registrations.
Book: corpus-and-provenance chapter records the slice.
@coderabbitai

coderabbitai Bot commented Nov 23, 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 12 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: a70e5f08-db9d-4e14-9435-d206063fdb11
Commits

Reviewing files that changed from the base of the PR and between cf40e59 and 99098e8.

Files selected for processing: 4

  • pkgs/atlas-search/book/concepts/corpus-and-provenance.md
  • pkgs/atlas-search/crates/atlas-core/src/lib.rs
  • pkgs/atlas-search/crates/atlas-core/src/source_registry.rs
  • pkgs/atlas-search/crates/atlas-core/tests/source_registry.rs
  • 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 23, 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-23T17:07:26.563926Z 99098e8 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 c5bf676 into main Nov 23, 2026
2 checks passed
@dezren39
dezren39 deleted the lane-aad-3125 branch November 23, 2026 17:06
@dezren39 dezren39 added the audit:partial PR partially implemented; gap filed label Nov 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

audit:partial PR partially implemented; gap filed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant