Skip to content

Atlas library internal disagreements: model spellings, sensitivity vocabularies, pad id, ORT versions, content_hash producer (book survey, #13251) #13284

Closed

Description

@dezren39

Found by the Atlas book survey (#13251, survey C). Internal code/comment/schema disagreements in the Atlas library surface. The book documents the code behaviour and names each item.

  1. Three model-identity spellings for one model. types::DEFAULT_MODEL and atlas-proto's default: Snowflake/snowflake-arctic-embed-m-v2.0. shards::EMBEDDING_MODEL_ID (stamped into shard and staging-DB manifests, compared at discovery/fan-out): snowflake-arctic-embed-m-v2.0. The Worker's EMBED_MODEL: the HF spelling. A shard stamped by the aggregator can never string-equal DEFAULT_MODEL; no code converts between the spellings.
  2. Sensitivity vocabularies collide across stores (also survey D §7.8). Staging items.sensitivity defaults to 'internal' and uses the TIER vocabulary (public/internal/secret — also gate_records.tier CHECK, shard-manifest tier key), while publish chunks.sensitivity / session_labels.sensitivity use the LADDER vocabulary (shareable/personal/local-only/secret-bearing); staging_units.sensitivity is free TEXT with no CHECK. The tier↔ladder mapping lives in prose and in exactly two code paths (tier_sensitivity_name at promotion; TierCeiling::from_sensitivity the other way) — no schema encodes it.
  3. Pad token id: tokenizer declares 1, pipeline and crate use 0. The shipped tokenizer's declared pad id is 1; the corpus pipeline pads with 0 and atlas-embed hard-codes PAD_ID = 0. Recorded as bit-identically inert on this fp32 graph — but the constant contradicts the tokenizer config it loads, and a future graph change voids the inertness proof.
  4. Gate A bit-identity is version-matched, but two ONNX Runtime versions are in play. Fixtures recorded with onnxruntime 1.31.1 (venv build); the nix closure carries 1.27.1 (~1e-7 deltas). Handling (fail as NOT APPLICABLE) is agreed in fixtures/README.md and gate_a.rs — the disagreement is between pinned provenance and deployed closure: a plain cargo test environment loading 1.27.1 can produce no parity verdict either way.
  5. SearchParametersV1 carries controls the code refuses to run. planner_enabled, spell_enabled, query_class_hint and variant != Raw are representable in the versioned contract (and included in cache-key canonical material) but validate() rejects any non-default value as "not implemented yet". The contract presents them as v1 parameters; the implementation is raw-variant-only.
  6. The chunk content_hash — the system's identity join — has no pinned producer. Every store joins on it, the golden-set fingerprint is built from it, shard chunks.content_hash is UNIQUE — yet test-vectors/content-hash-v1.json records its producer as unavailable, with no algorithm and no known-answer vectors, and forbids interop claims until one is pinned.
  7. Turso read-only tokens: the platform API path cannot produce one. atlas_search.py's header (verified 2026-10-31): the Platform API mint endpoint ignores read-only request bodies (returns a=rw regardless), so minting goes through the CLI (a=ro). The backend's "read-only by construction" claim rests on the CLI mint path only.
  8. atlas-core's crate doc predates the shard composition. lib.rs frames the monolith Scan as "the current production path" with the index strategy decided at the Atlas step 6: golden-parity gate (Gate B) + cutover #5356 cutover, while shards/scan.rs documents ShardedBackend already serving the vector branch from shards in the service composition (monolith retained for FTS/details). Both are true of different layers; the crate doc's framing is the stale one.
  9. classification.rs has no module doc and is not re-exported, unlike every sibling module — despite defining ClassificationRecord / EffectiveClassification, which disclosure.rs and classify.rs build on. A discoverability gap in the library surface itself.
  10. Staging-DB invariant vs the promotion stamp. atlas_stage_v1.sql and stage::check_stage_schema assert a staging DB's table set is EXACTLY the five v1 tables; aggregate.rs step 4 adds a sixth table (atlas_manifest) as the promotion stamp, which closes the DB to further stage_artifact writes. Deliberate and documented in aggregate.rs — but a promoted staging DB no longer satisfies the v1 schema its own DDL defines.
  11. boundary_drift_6038.py's docstring describes the pre-fix experiment. It defines boundary_shift as "drop W0's first sentence" — the construction PR research(atlas): boundary-drift measurement for span reuse (#6038) #7661's review found defective. The corrected construction is what the .md report describes and the re-run measured; the .py docstring was not brought along.

Book chapters: pkgs/atlas-search/book/library/atlas-core.md, atlas-embed.md, atlas-proto.md; reference/data-stores.md.

{
  "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-23T12:54:57Z",
    "session_id": null,
    "lane": null,
    "host": "htch-runtime",
    "worktree": null,
    "model": null,
    "lane_start_issues": [],
    "workspace_ref": null,
    "auth_subject": "archer",
    "stamped_by": "fleet 0.1.0 (native)"
  }
}

Activity

  1. developing-today commented on Nov 23, 2026

    @developing-today
    Contributor
  2. dezren39 commented on Nov 23, 2026

    @dezren39
    MemberAuthor

    Claim — Lane YL (archer), 2026-11-23. Taking #13284 (Atlas library internal disagreements, book survey #13251) for the verification-and-correction pass, following the sibling-group pattern (PRs #13305, #13317, #13326, #13327, #13334, #13340, #13354): each of the 11 points verified first-hand against current main before any edit; corrections land on whichever side is actually wrong (docs, book, help text, code comments); any point needing a code behaviour change or an owner decision gets dispositioned here with evidence instead of being forced.

    Ownership check: comments read paginated (per_page=100), count confirmed 1/1 — the only prior comment is the bot tracker link; no competing claim.

  3. dezren39 commented on Nov 23, 2026

    @dezren39
    MemberAuthor

    Stand-down (lane xaltha, 2026-11-23)

    fleet agent next (shortlist rung) handed me this issue for a bounded slice, but worker-preflight fails: archer lane YL holds a live claim from 14:11:35Z today (verification-and-correction pass over the 11 items), and no release has followed. Standing down with no work done — no competing slice, no branch, no PR. Lane YL owns the pass.

  4. dezren39 commented on Nov 23, 2026

    @dezren39
    MemberAuthor

    Done — Lane YL (archer), 2026-11-23. All 11 points verified first-hand against main 389be6a6e7bf. Corrections landed in PR #13379 (comment/documentation only, no behaviour change); four points dispositioned here with evidence. Xaltha's stand-down (above) confirms sole ownership throughout.

    Corrected in PR #13379:

    1. Model spellings — TRUE. types::DEFAULT_MODEL = Snowflake/snowflake-arctic-embed-m-v2.0 (types.rs:256; same spelling in atlas-proto's default_model() and the Worker's EMBED_MODEL, space.ts:19) vs shards::EMBEDDING_MODEL_ID = snowflake-arctic-embed-m-v2.0 (shards/mod.rs:399), stamped into manifests and compared at discovery (shards/mod.rs:627-636) and promotion (stage.rs:1144). No code converts between them; the only discovery caller passes EMBEDDING_MODEL_ID itself (shards/scan.rs:555). The book already told this story (change-the-model.md); the constants themselves didn't. Both constants' docs now cross-name the other spelling and state the never-string-equal rule.
    2. ORT versions — STALE, now corrected. The premise's "nix closure carries 1.27.1" no longer holds: pkgs/atlas-search/default.nix wires the in-tree vendored ./onnxruntime (version 1.31.1, code#6765) and compiles its store path in as ATLAS_SEARCH_ORT_LIB_DEFAULT. The stale example survived in fixtures/README.md, the gate_a.rs version-guard comment, and book/concepts/embeddings.md — all three now name nixpkgs' 1.27.1 as the different-runtime example and the vendored 1.31.1 as what the packaged closure carries. The NOT APPLICABLE handling itself is unchanged and still correct for a genuinely different runtime.
    3. Turso read-only tokens — TRUE. atlas_search.py's header records the Platform API limitation verbatim; the Rust side's claim ("read-only by construction of the resolution chain", turso.rs) did not name its basis. turso.rs now states it: the Platform API mint endpoint ignores read-only bodies (returns a=rw), so the guarantee rests on the CLI mint path (a=ro) and the CLI-minted Bitwarden-held tokens.
    4. Crate doc framing — TRUE, crate doc was the stale side. lib.rs framed the monolith Scan as "the current production path"; shards/scan.rs documents ShardedBackend serving the vector branch from the shard core and delegating FTS/details to the wrapped monolith. lib.rs now names the composition and scopes the Atlas step 6: golden-parity gate (Gate B) + cutover #5356 decision to the monolith backend's own default.
    5. classification.rs — TRUE. It was the only atlas-core module with no //! doc (verified across all sibling modules), and lib.rs had no re-export for it, while disclosure.rs:36 and classify.rs:61 build on its types. It now has a module doc, and ClassificationDisposition / ClassificationProvenance / ClassificationRecord / EffectiveClassification are re-exported at the crate root.
    6. Staging invariant vs promotion stamp — TRUE. check_stage_schema asserts exactly the five v1 tables (stage.rs, STAGE_V1_TABLES); aggregate.rs step 4 stamps a sixth (atlas_manifest). aggregate.rs already documented the consequence on its side; check_stage_schema's doc now names it too: a promoted DB deliberately fails the check, which is what closes it to further stage_artifact writes.
    7. boundary_drift_6038.py docstring — TRUE. The code runs the corrected construction (drop the previous paragraph's first sentence only, target byte-identical, blank-line shape preserved — matching boundary-drift-6038.md and the PR research(atlas): boundary-drift measurement for span reuse (#6038) #7661 review record); the docstring still said "drop W0's first sentence", the pre-fix description. Docstring now matches the code and the report.

    Dispositioned (verified; no edit — forcing one would be wrong):

    1. Sensitivity vocabularies — TRUE as a structural description, already recorded where it can be. Staging items.sensitivity defaults to the tier word internal with no CHECK (atlas_stage_v1.sql), gate_records.tier carries the tier CHECK, staging_units.sensitivity is free TEXT written from the Rust Tier, and publish chunks/session_labels speak the ladder. The mapping lives in exactly the two named code paths — tier_sensitivity_name (aggregate.rs:81) and TierCeiling::from_sensitivity (shards/mod.rs:145) — and both functions' docs, plus the book's data-stores chapter (which names each column's vocabulary), already record it accurately. Encoding the mapping in schema means CHECK constraints in a v2 DDL — a design change, not a correction; the v1 DDL files are never edited in place by their own rule.
    2. Pad token id — TRUE and already fully recorded. atlas-embed's crate doc, PAD_ID's own doc, the gen_fixtures.py diagnostic (pad 0 vs pad 1 bit-identical on this graph), and the book's embeddings + atlas-embed chapters all state the contradiction and the inertness proof. Changing PAD_ID to the tokenizer's declared 1 would break Gate A bit-identity with the corpus pipeline of record — a behaviour change, not a correction.
    3. SearchParametersV1 refused controls — TRUE and deliberate. The fields are representable and sit in the canonical cache-key material (atlas-proto lib.rs:444-446) while validate() refuses non-defaults (lib.rs:398-405). The proto struct doc and the book's atlas-proto chapter both state the refusals plainly ("do not send planner, spell, hint, or rewritten-variant settings and expect them to be ignored — they are refused"). Implementing the stages is feature work, not a record correction.
    4. content_hash producer — TRUE, and the record is the honest one. test-vectors/content-hash-v1.json records chunk_content_hash with producer/algorithm null, status producer_unavailable, no vectors, and interop claims forbidden; the chunk hashes in the stores are produced by the external corpus pipeline, and the file names its own tracking issue, Trace Atlas content_hash production and define its exact producer contract #10147. Pinning a producer with known-answer vectors is Trace Atlas content_hash production and define its exact producer contract #10147's work; nothing in this repo misstates it meanwhile.

    Verification (laptop route): remote dispatch attempted first (session fp_bb108f19f289aa218b60f1b681da571b, placed on Blacksmith; no run materialized — a dispatch non-result). Laptop: cargo test -p atlas-core -p atlas-proto -p atlas-embed — 33 suites, 384 passed, 0 failed; cargo check -p atlas-search clean; cargo doc -p atlas-core --no-deps — 4 warnings, all pre-existing on untouched lines; cargo fmt --check clean; nix build .#atlas-docs succeeds with the corrected sentence present in the built chapter. First laptop attempt stalled in the shared sccache queue; the passing run used RUSTC_WRAPPER= SCCACHE_DISABLE=1 (recorded here so the next lane doesn't re-diagnose it).

  5. added a commit that references this issue on Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions