Skip to content

atlas(classification): wire boundary-safe chunks into staging and promotion #12628

Closed

Description

@dezren39

Scope

Wire the merged per-embed classification-record API (#12408) and boundary splitter from PR #12625 into Atlas staging (pkgs/atlas-search, atlas_core::stage) and promotion (aggregate). This is the follow-up integration slice for #12403; it must not duplicate the standalone splitter implementation.

Acceptance

  • Staging derives source-native classification segments and uses boundary-safe chunks; persisted embed records carry exact source offsets and effective sensitivity.
  • No embed or overlap crosses a known source boundary. Unknown or unisolatable boundary data fails closed to the restrictive classification.
  • Promotion preserves unchanged embeds and vectors; changed boundaries update only affected embed records/vectors.
  • Tests cover transcript turns, embedded secrets, code/log units, restrictive uncertainty, no-crossing/overlap, and unchanged vector preservation.

Dependencies / evidence

Activity

  1. added
    kind/feature
    task/small-fix
    epic/atlas-program
    on Nov 22, 2026
  2. developing-today commented on Nov 22, 2026

    @developing-today
    Contributor
  3. dezren39 commented on Nov 22, 2026

    @dezren39
    MemberAuthor

    Follow-up for #12403, explicitly linked to unfinished PR #12625. This issue owns only stage/promotion wiring after #12625 merges; the boundary splitter itself is already in that PR. A live code-pilot queue task is being added in this same pass.

  4. dezren39 commented on Nov 22, 2026

    @dezren39
    MemberAuthor

    Refs #12625: this issue owns the explicitly deferred staging/promotion wiring named by the open splitter PR; implementation starts after that PR merges. Refs #12403: this is the follow-up integration slice for the parent classification issue.

  5. added
    queue/queued
    status/needs-triage
    on Nov 22, 2026
  6. dezren39 commented on Nov 22, 2026

    @dezren39
    MemberAuthor

    Picked up by felix — working this now. (Fleet queue fallback mode: the queue backend is down, so this issue's comments carry the claim. The claim stays live while felix posts progress markers; after 30 minutes of silence any other worker may pick this up.)

  7. added
    queue/claimed
    work/assigned
    and removed
    queue/queued
    on Nov 22, 2026
  8. dezren39 commented on Nov 22, 2026

    @dezren39
    MemberAuthor

    Picked up by felix — working this now. (Fleet queue fallback mode: the queue backend is down, so this issue's comments carry the claim. The claim stays live while felix posts progress markers; after 30 minutes of silence any other worker may pick this up.)

  9. dezren39 commented on Nov 22, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    event: progress
    by: agent felix (kind muse, Muse sandbox seat; queue task 21060)
    at: 2026-11-22

    Slice landed for review: #12634

    What the PR does:

    • Staging: new stage_classified_artifact composes declared source-native segments through split_by_boundaries into boundary-safe chunks_raw and persists one feat(atlas): add per-embed classification records #12408 classification record per chunk in the item meta — exact source offsets (start/end record extras) + effective sensitivity + stable embed id (<source>#chunk-<idx>). Read-back (chunk_classifications) fails closed per record. atlas-stage ingest --segments exposes it. Legacy stage_artifact unchanged; v1 staging schema untouched (records ride the meta JSON bag).
    • Promotion: embed_unit_into_shard writes each classified chunk's persisted effective sensitivity as the shard chunk's sensitivity (missing record inside a classified item fails closed to secret-bearing; legacy items keep item-tier behaviour exactly). Embed-time pieces stay within their chunk and inherit its classification. Each distinct text is embedded once per run, so unchanged chunks keep the one computed vector; a boundary revision changes only the affected chunk's record.

    Evidence: fail-before at base d5bfa05 — the new oracle tests (tests/boundary_wiring.rs, 10 tests) fail to compile, unresolved imports for the wiring API (the unwired path is the failure). Pass-after in the sandbox: boundary_wiring 10/10; full cargo test -p atlas-core -p atlas-proto -p atlas-search green (lib 166, aggregate 5, stage 6, disclosure 13, cli_parity 11, ...); fmt check clean. Coverage maps to the acceptance list: transcript turns, embedded secrets, code/log units, restrictive uncertainty (uncertain/gap/overlap/no-declarations), no-crossing/overlap, unchanged vector preservation (counting embedder: 2 embed calls for 4 chunks / 2 distinct texts, bit-identical vectors for identical texts).

    Not merged — Felix reviews (the fail-closed reader in stage.rs and the classified arm in aggregate::read_staged_chunks are the spots to read). No new dependencies. Claim released free; the issue's acceptance is fully covered by the PR, which says Closes #12628 for when it merges.

  10. dezren39 commented on Nov 22, 2026

    @dezren39
    MemberAuthor

    Released by felix (outcome: free). Wiring slice landed as PR #12634 (unmerged, for Felix review): stage_classified_artifact + persisted per-chunk classification records with offsets; promotion writes per-chunk effective sensitivity fail-closed and embeds each distinct text once. 10 new oracle tests pass; full atlas suites green; fail-before at base is unresolved-import (wiring absent).

  11. added
    queue/queued
    and removed
    queue/claimed
    work/assigned
    on Nov 22, 2026
  12. added a commit that references this issue on Nov 22, 2026
  13. dezren39 commented on Nov 22, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    event: merged
    by: agent felix (kind muse, Muse sandbox seat; queue task 21060)
    at: 2026-11-22

    Merged: #12634 — the staging/promotion wiring for the boundary-safe chunks (#12625) and the per-embed classification records (#12408).

    Staging's new stage_classified_artifact composes a producer's declared segments through split_by_boundaries into boundary-safe chunks and persists one ClassificationRecord per chunk in the item's meta JSON — exact offsets, effective sensitivity, stable embed id #chunk- — with the v1 schema untouched and legacy stage_artifact unchanged. Promotion resolves each chunk's persisted record and writes its effective sensitivity as the shard chunk's sensitivity, embedding each distinct piece text once per run so unchanged chunks keep the single computed vector.

    Felix read the fail-closed path directly at review: an unparseable record, a missing uncertainty flag, or an unknown sensitivity resolves to secret-bearing + uncertain (chunk_classification_from_json), and a chunk missing its record inside a classified item defaults to SecretBearing at promotion, never to the item tier; legacy unclassified items keep the exact previous behaviour. The boundary_wiring suite re-ran 10/10 at review, including the counting-embedder proof (4 chunks over 2 distinct texts -> exactly 2 embed calls, bit-identical vectors) and the promotion test where a secret-bearing chunk inside an internal unit is withheld at a personal ceiling while its shareable sibling is served. No new dependencies.

    Boundary of the slice, as the PR states: segment declaration stays with producers (classifier/boundary-detector work upstream); this wires declaration -> staging -> promotion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    epic/atlas-programkind/featurequeue/queuedstatus/needs-triagestatus:donetask/small-fix

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions