Repository navigation
feat(atlas-search): stable source-root + locator registration (#3125 slice 4) - #13485
Merged
Merged
Conversation
…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.
|
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 12 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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
atlas-coremodulesource_registry(source_roots+source_locatorstables, 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, originalregistered_atstands); 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).tests/source_registry.rs, one per property: stability/idempotence, non-alteration (a seeded shard schema —chunks+chunk_occurrenceswith the aggregator's DDL — snapshotted byte-identical across new and repeat registrations), re-point refusal, unknown-root refusal, per-root resolution, empty-field refusal.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 fmtclean.cargo clippy -p atlas-core --all-targetsfails compiling the untouchedatlas-protocrate 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.
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.