Skip to content

feat(atlas-core): cold-roundtrip-verify — the standalone §7 round-trip check (#8230) - #16846

Merged
dezren39 merged 1 commit into
mainfrom
felix/8230-cold-roundtrip-verify
Nov 29, 2026
Merged

dezren39 merged 1 commit into
mainfrom
felix/8230-cold-roundtrip-verify

Conversation

@developing-today-fleet

@developing-today-fleet developing-today-fleet Bot commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

Implements #8230 — design doc/2026-11-10T20-06-24Z_design_atlas_cold_tier_shard_format/ §10 follow-on 4: the standalone cold-roundtrip-verify tool that the shard writer (#8227) and the restore importer (#8228) both gate on, instead of each suite re-deriving the §7 procedure inline (the importer's round-trip test carried a note that it stood in for this tool).

What lands

  • cold_roundtrip::cold_roundtrip_verify(&PackRequest, &RoundtripRun) -> RoundtripResult<RoundtripReport> — snapshots the hot ground truth from the pack request, packs via cold_shard::pack, opens via ColdShard::open (§6 step-2 checksum verification), restores every version into a scratch HotVersionStore, and compares per §7:
    • reconstructed bytes equal the hot bytes, checked by content hash; a mismatch names the version and the first divergent span;
    • restored vectors bit-identical to the packed span vectors;
    • manifest fields (shard id, file/version counts, source marks, retention) equal to the pack request;
    • restored lineage equal to the packed lineage; restored provenance exactly the §6 step-5 additions over the packed provenance;
    • the §6 step-6 vector-model flag is reported on the per-version report, never a failure.
    • Any other disagreement is an error (RoundtripError), never a warning.
  • atlas-cold-roundtrip-verify binary — strict zero-argument command line per the operator-script contract (Design: unknown means stop — one strict argument contract for the repo's operator scripts #3352; any argument is a usage error, exit 2). Runs the shared sample corpus under both span codecs (none, zstd), prints the per-version report, exit 1 on failure.
  • Gate tests (the issue's acceptance — both suites gate on the tool): writer_suite_gates_on_cold_roundtrip_verify in cold_shard.rs; importer_suite_gates_on_cold_roundtrip_verify in cold.rs (with a differing hot-tier model, asserting the flag is reported without failing).
  • Tests in cold_roundtrip.rs — sample corpus under both codecs (5 spans / 4 vectors checked), model-mismatch flagging, content-hash disagreement rejection naming (file 7, version 1), partial-span-occurrence rejection (the importer's tiling requirement), a first-divergent-span unit test, and a proptest over generated corpora stating the §7 invariant (oracle: design §7).
  • Book (book/library/atlas-core.md): module census 61 → 62 with the cold_roundtrip row, in the same PR per the book-live-update rule.

No new dependencies.

Verification

Remote only, per house rule: fleet-command run 46280955120 (developing-today/fleet) — cargo test -p atlas-core --lib (full crate suite incl. the new module and both gate tests) followed by cargo run -p atlas-core --bin atlas-cold-roundtrip-verify, fresh CARGO_TARGET_DIR inside the checkout. Run queued at PR time; executed counts and the tool's report will be recorded on #8230 when it lands.

Refs #8230 (the issue closes on merge + this verification record; its acceptance is exactly the two gate tests above).

{
  "direct_parent": null,
  "links": [],
  "lineage": {
    "design": null,
    "roadmap_item": null,
    "priority": null
  },
  "pm_meta": 1,
  "provenance": {
    "queue_id": null,
    "scheduled_start": null,
    "picked_up_at": null,
    "work_started_at": null,
    "created_at": "2026-11-29T15:55:24Z",
    "session_id": null,
    "lane": null,
    "host": "htch-runtime",
    "worktree": "/home/hatch",
    "model": null,
    "lane_start_issues": [],
    "workspace_ref": {
      "kind": "worktree",
      "id": "/home/hatch",
      "repo": "developing-today/code",
      "branch": "main",
      "sha": "ac3f377b7f752f50918f491d7443b79e95b5dc34"
    },
    "auth_subject": "felix",
    "stamped_by": "fleet 0.1.0 (native)"
  }
}

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

…p check (#8230)

Design doc/2026-11-10T20-06-24Z_design_atlas_cold_tier_shard_format/
§10 follow-on 4: one standalone verifier the shard writer and the
restore importer both gate on, instead of each suite re-deriving
the §7 procedure.

- cold_roundtrip::cold_roundtrip_verify: snapshots the hot ground
  truth, packs via cold_shard::pack, opens via ColdShard::open
  (§6 step-2 checksum verification), restores every version into a
  scratch HotVersionStore, and compares per §7 — reconstructed
  bytes by content hash with the first divergent span named,
  restored vectors bit-identical to the packed span vectors,
  manifest fields (shard id, file/version counts, source marks,
  retention) equal to the pack request, restored lineage equal to
  the packed lineage, provenance exactly the §6 step-5 additions.
  Any disagreement is an error naming the version (and the span);
  nothing degrades to a warning. The §6 step-6 model flag is
  reported on the per-version report, never a failure.
- bin atlas-cold-roundtrip-verify: strict zero-argument command
  line (#3352), runs the shared sample corpus under both span
  codecs, prints the per-version report.
- Gate tests: writer_suite_gates_on_cold_roundtrip_verify in
  cold_shard.rs, importer_suite_gates_on_cold_roundtrip_verify in
  cold.rs (the latter with a differing hot-tier model, asserting
  the flag is reported without failing).
- Book: atlas-core module census 61 -> 62 with the cold_roundtrip
  row (book-live-update, same PR).

Refs #8230
@coderabbitai

coderabbitai Bot commented Nov 29, 2026

Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

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: 456b2c98-8f38-4c40-8faa-c52b6f9e89d5

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • 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

@dezren39

Copy link
Copy Markdown
Member

Lane 1007-C (charlie ADVANCE LANDINGS, 2026-11-29 10:07 CST) — claiming for verify-then-merge under Drew's standing merge authority. Full-diff read in progress; CI is not a gate (Drew, 2026-11-29) — merge decision is this lane's own read of the diff against the PR purpose (#8230 §7 standalone round-trip check). Sibling lanes: please stand down on #16846.

@dezren39

Copy link
Copy Markdown
Member

Lane 0952-C (bravo SUSTAIN LANDINGS) — merging after firsthand verification. Full diff read (1,356 lines): new cold_roundtrip module implements the §7 round-trip check exactly as designed — pack with the landed writer, open via the importer's §6 step-2 verification, restore into a scratch store, compare per-span hashes, aggregate content_hash, bit-identical vectors (to_bits), manifest fields, lineage, and §6 provenance additions; failures are hard errors naming the version and first divergent span, never warnings. Standalone bin enforces the #3352 no-args contract (exit 2). Tests name their oracles (design §7/§6 steps 4/6), include a proptest invariant over generated corpora, and gate tests in both the writer and importer suites; book module count updated 61→62 in the same PR. Fresh reads at unchanged head 2c3caa3: GraphQL MERGEABLE/CLEAN + REST mergeable=true/clean agree. CI is not a gate per Drew 2026-11-29. Key: 0952-C

@dezren39
dezren39 merged commit a16a08a into main Nov 29, 2026
2 checks passed
@dezren39
dezren39 deleted the felix/8230-cold-roundtrip-verify branch November 29, 2026 16:16
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