Repository navigation
feat(atlas): stage code/config artifacts as embedding entries — item writer + atlas-stage ingest (#1518) - #10788
Conversation
…writer + atlas-stage ingest (#1518)
Codex Review Summary: ❌ FailedThis 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. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
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 26 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. |
Refs #1518, #2469. Queue task 17164 (second landing; the confirmed definition landed in PR #10350).
What this adds: the item writer (minimal ingestion path, staging tier)
The #1518 design doc (doc/2026-11-14T19-00-00Z_design_code-config-embeddings.md, §6) sequences the first ingestion as: stage one
itemsrow +chunks_rawinto an Atlas staging unit, promote (embedding at promotion), then prove semantic retrieval. Until now no code wroteitems/chunks_rawrows at all. This PR builds the writer:atlas_core::stage::stage_artifact(+stage_artifact_in_db): stages one repository artifact into a v1 staging DB as oneitemsrow plus itschunks_raw, exactly per the confirmed definition —sourcecarries the source-of-truth pointer (repo:path@commit_sha);metacarries the required metadata set (repo, path, commit_sha, kind, language, unit, embedded_at, chunks); sensitivity is the existing basic classification, recorded on the row. The DB must passcheck_stage_schemafirst; a non-staging DB is refused.unit: whole-file); above it,chunk_artifact_textsplits into declaration-sized chunks (breaks before top-level declaration lines, 64 KiB hard ceiling split at line boundaries). Chunks always partition the input exactly — concatenating them reproduces the artifact byte for byte — and each chunk'scontent_hashis its SHA-256.atlas_core::stage::list_staged_items(+_in_db): read-back of staged items with chunk counts.atlas-stage ingest --db … --unit … --repo … --path … --file … --commit … [--kind] [--language] [--sensitivity]andatlas-stage items --db … [--unit …].First entry staged (proof at the staging tier)
On the laptop, against a fresh staging unit (
task-17164):atlas-stage provision→ unit open, schema v1atlas-stage ingestofinfra/dns/dns_config.yaml(31,264 bytes, at commit d85bd4f) →item_id 1atlas-stage itemsread-back: kindconfig, sourcedeveloping-today/code:infra/dns/dns_config.yaml@d85bd4ff…, unitwhole-file, 1 chunk, full metadata — the infra/dns/dns_config.yaml is not embedded in any fleet semantic index found in this repo #2469 artifact is now staged as the first code/config entry.Tests
3 new oracle tests in
stage::tests(staged rows read back from a real provisioned DB): whole-file staging with exact metadata + hash-verified chunk; large-config declaration chunking with the lossless-partition oracle (200 records → 200 chunks, concat == input); refusal on a non-staging DB.cargo test -p atlas-core— 126 lib tests pass;cargo test -p atlas-searchpasses (41 + 11). Changed files arecargo fmtclean (pre-existing fmt drift in manifest.rs was left untouched).What remains on task 17164 (recorded, not in this PR)
Promotion/embedding of the staged unit (the aggregator slice of #5669 —
Registry::promoteis gated on the #7648 embedding-model contract), the live semantic-retrieval proof against the promoted index, and the shard-size benchmarks the design sequences after retrieval is proven. Task 17164 stays open with these as its next steps; #2469 stays open until the promoted index actually returns the config.Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.