Repository navigation
test(atlas+pm): metadata version conformance fixture set (#9095) - #13527
Conversation
Acceptance item 4 of #9095: metadata at every historical version parses and is usable by the current reader, in the #8525-#8528 fixture-family practice. - Fixture set under the schema v1 design folder: PM pm_meta v1 in its historical shapes (section 12 canonical, aggregator links-only and minimal-link blocks, float version, unknown keys, populated extras, type mismatch, plus fail-closed rejection cases), Atlas schema_version 1 item/embed/classification shapes alongside the unversioned atlas_stage v1 producer meta bag, and exact-byte digest vectors for the design section 2 identity rule. - Executable conformance: the fleet crate test runs every PM case through parse_metadata_block and the stamp assembly round-trip; the atlas-core test round-trips every executable Atlas case through a provisioned atlas_stage v1 database and list_staged_items, byte-exact. - Doctrine-projection cases (extras relocation, lossless-only coercion, sensitivity fallback, unknown closed enums) are recorded as oracle data for design section 7 slices 2/6; no current reader projects, so they are not asserted against one. - No new persisted fields, no store writes: CEN-04 section 3.10 already owns the PM block/mirror facts (see fixtures README).
|
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 48 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: c846a3ed0c
ℹ️ 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".
| let path = concat!( | ||
| env!("CARGO_MANIFEST_DIR"), | ||
| "/../../../../doc/2026-11-21T17-56-24Z_design_atlas_metadata_schema_v1/fixtures/atlas-metadata-v1.json" | ||
| ); | ||
| let raw = std::fs::read_to_string(path) | ||
| .unwrap_or_else(|e| panic!("conformance fixture set unreadable at {path}: {e}")); |
There was a problem hiding this comment.
Include conformance fixtures in the Nix package sources
When the Atlas Nix package runs its check phase, this read fails because pkgs/atlas-search/default.nix constructs packageSrc with its root at pkgs/atlas-search and includes only the manifests, crates, schema, and package-local fixtures—not repository-root doc/. The new test therefore panics with “conformance fixture set unreadable,” preventing the checked package from building. The Fleet conformance test has the same problem: pkgs/fleet/default.nix roots fleetSrc at pkgs/ and excludes these documentation fixtures. Include the fixture directory in both packaged source trees and adjust the paths/layout accordingly, or place the executable fixtures within the existing package source boundaries.
Useful? React with 👍 / 👎.
Completes the one remaining acceptance item of #9095 — the conformance fixture set. (No
Closeskeyword: #9095 is the design tracker and the breaking-changes parking lot's home; the close call is Felix's.)Done check behind this PR
Verified fresh against origin/main before writing anything:
doc/2026-11-21T17-56-24Z_design_atlas_metadata_schema_v1/note.md.What lands
Fixture set under
doc/2026-11-21T17-56-24Z_design_atlas_metadata_schema_v1/fixtures/(README indexes it):pm-metadata-v1.json— PMpm_metav1 in its historical shapes: §12 canonical, the aggregator's links-only and minimal-link blocks, float1.0version, unknown top-level keys, populated extras, a type-mismatch case, plus fail-closed rejection cases (no version key; future version) and a no-block body.atlas-metadata-v1.json— the unversionedatlas_stagev1 producer meta bag (the shape live staged items carry) plus doctrine v1 envelope item/embed/classification records, and doctrine-projection cases (invalid sensitivity → most restrictive + extras retention; lossless-only coercion; unknown closed-enum value).digest-vectors.json— exact-byte identity vectors for the design §2 rule, inputs and expectedsha256:IDs recorded.Executable conformance, in the #8525–#8528 fixture-family pattern:
pm_metadata_version_conformance_fixturesruns every PM case throughparse_metadata_blockand the stamp-assembly round-trip (parse outcome + key preservation;pm_metapinned to integer 1 by assembly).metadata_conformance.rsinserts every executable Atlas case's row into a provisionedatlas_stagev1 database and reads it back vialist_staged_items— meta round-trips byte-exact, schema version 1.Doctrine-projection expectations are recorded as oracle data for design §7 slices 2/6 — no current reader projects, so they are deliberately not asserted against one.
Evidence
pm_metadata_version_conformance_fixtures ... ok, 1 passed / 0 failed.atlas_metadata_version_conformance_fixtures ... ok, 1 passed / 0 failed.Conformance / scope notes
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.