Skip to content

design(atlas): staging-shard ingest gate — write → classify → dedup → provenance-check → publish #6057

Closed

Description

@dezren39

Parent: #6019 (semi-automated ingestion operations). Research source: prior-art doc ~/workspace/scratch/atlas-ingestion-brief-2026-11-04/prior-art-research.md (2026-11-04). Follow-up 38 (Cluster 7). Builds on the staging tier #5669 (merge-on-close promotion exists today).

Finding (research, in substance)

lakeFS's write-audit-publish pattern maps exactly onto Atlas's needs: ingest onto a staging branch/shard, validate, publish to the live set only if checks pass. The gate sequence per batch:

  1. Write to a staging shard (never directly to the searchable corpus).
  2. Classify — classification scan (family under task(atlas): classification revalidation scan — verify nothing sensitive sits at the wrong tier #6021) assigns/verifies tier before anything lands.
  3. Dedup — exact + near-duplicate edges recorded (ingest-time dedup pipeline, Atlas search: Jaccard as a third signal (rescore + ingest dedup); SPLADE as a triggered follow-on #5733 family).
  4. Provenance-check — every chunk carries a parseable source mark (sibling grammar design under atlas ingestion program: semi-automated updates, versioning, provenance, feedback — long-term design + tasks (2026-11-04 brief) #6018) + attestation (sibling under design(atlas): semi-automated ingestion operations — source set, usefulness filter, disk/IO + plan-spend guardrails #6019).
  5. Publish — promote to the live shard set; a failed batch never touches the searchable corpus, and retry is safe (content-addressed landing per atlas: provenance registry (chunk occurrences), content-addressed extracts, multi-DB vector resolution #3125).

Done looks like

A gate design: stage contracts, per-stage pass/fail semantics, failure/quarantine handling, publish atomicity against fan-out search (#5755).

Activity

  1. added
    area/infraInfrastructure, deployment, and operations
    kind/designA design proposal (design-architect): multi-step, phased, decision-bearing
    on Nov 5, 2026
  2. developing-today commented on Nov 5, 2026

    @developing-today
    Contributor
  3. added
    task/triageQueue packet kind: verify, reproduce, and route this item
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    and removed on Nov 5, 2026
  4. dezren39 commented on Nov 5, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · done (triage)

    Triage findings for issue #6057 (task 10423)

    Verified current (2026-11-05, fresh gh reads): issue #6057 is OPEN, filed 2026-11-05T05:27:46Z, carrying only task/triage + queue/queued + area/infra + kind/design at claim time — no hard-stop labels (held, user/owned, do-not-merge, do-not-auto-edit), no competing PR or branch, and no other issue references issue #6057 yet (search of 6057 in:body returns nothing), so no duplicate or superseding work exists.

    Routing: gate design whose stage contracts are defined by still-open sibling work. The five gate stages are each another family's contract, and every one of those families is still open (all verified fresh today):

    1. Write — staging tier issue atlas staging tier: versioned schema, registry, aggregator with merge-on-close promotion into three-level core #5669 (OPEN, status/needs-triage, queued): the foundation exists today (merge-on-close promotion), but its versioned schema/registry design has not been triaged yet; the gate's write contract lands on it.
    2. Classify — classification family under issue task(atlas): classification revalidation scan — verify nothing sensitive sits at the wrong tier #6021 (OPEN, queued): the revalidation scan that assigns/verifies tiers has not run; the gate's classify stage consumes its tier semantics.
    3. Dedup — ingest-time dedup under issue Atlas search: Jaccard as a third signal (rescore + ingest dedup); SPLADE as a triggered follow-on #5733 (OPEN): exact + near-duplicate edge recording is that family's work.
    4. Provenance-check — source-mark grammar is a sibling design under programme tracker issue atlas ingestion program: semi-automated updates, versioning, provenance, feedback — long-term design + tasks (2026-11-04 brief) #6018 (OPEN, parked, work/assigned) and attestation a sibling under parent issue design(atlas): semi-automated ingestion operations — source set, usefulness filter, disk/IO + plan-spend guardrails #6019 (OPEN, kind/design); the chunk provenance registry is issue atlas: provenance registry (chunk occurrences), content-addressed extracts, multi-DB vector resolution #3125 (OPEN, priority/high).
    5. Publish — atomicity must be specified against fan-out search issue atlas core consumer wiring: fleet atlas-search fan-out over the TursoDB shard core (tier ceilings, merge, --expand hydration) #5755 (OPEN, queued).

    Ordering recorded: the gate design pass on issue #6057 runs once the stage contracts it composes are at least drafted — staging tier issue #5669 triaged, classification semantics from issue #6021, provenance grammar/attestation from the issue #6018 / issue #6019 family — and its "done" deliverable stays as the body specifies (stage contracts, per-stage pass/fail semantics, failure/quarantine handling, publish atomicity against issue #5755). Drafting the gate before those contracts exist would invent per-stage semantics the sibling families are charged with deciding. No implementation issue is filed in this triage, and no code change is made; the issue stays open, labelled triaged + waiting-dependency to mirror this ordering.

  5. added
    status/triagedTriaged and routed (see agent note)
    and removed
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    on Nov 5, 2026
  6. 34 remaining items

  7. dezren39 commented on Nov 8, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · done (design record produced)

    What the record covers

    • Stage contracts for all five stages (write → classify → dedup → provenance-check → publish), each stated as a pure function of the batch returning (verdict, reason_codes, counts, artifacts), with the fail-closed rule that no verdict means not passed.
    • Per-stage pass/fail semantics in one table (§4): what skip may mean (only empty batch at write, zero survivors at publish — never a pass, never a snapshot bump) and the failure class for each stage.
    • Failure/quarantine handling (§5): quarantine is a state, not a deletion; retry resumes at the failing stage; content-addressed landing makes retry safe; epic units promote in increments so one bad increment cannot stall or smuggle the rest; three strikes on the same reason code escalates to review instead of retrying forever (spend guardrail, atlas ingestion program: semi-automated updates, versioning, provenance, feedback — long-term design + tasks (2026-11-04 brief) #6018 S3).
    • Publish atomicity against fan-out search (§6): the reader-visible invariant (pre-batch set or post-batch set, never a mixture), per-snapshot visibility ordered write → manifest → snapshot bump, and the honest position on the cache.

    Packet note — #5755 is closed

    The packet lists #5755 as an open atomicity constraint. Fresh read: #5755 CLOSED 2026-11-07. Its surface moved to #6662 (live verification), #6664 (--expand), #6665 (filters/FTS), #6666 (serve-mode snapshot id) and the successor Worker + Durable Object cache #6788 (closed, eviction follow-up #6805). §6 addresses atomicity against those successors. The DO cache stores results indefinitely and is not yet keyed on the snapshot id, so §6.3 records it as a known staleness window for newly published batches rather than claiming an atomicity the gate cannot enforce from the publish side.

    Sibling decisions consumed, not re-decided

    #6026 (versioning — landed design), #3125 (keep-all; dedup adds occurrences, never deletes), #5733 (findings are data, not deletions; ≈0.9 Jaccard), #5669 (staging tier, ≤500-row transactions, merge-on-close). Three obligations this note adds that those designs did not state — per-row tier split at publish, snapshot-id carried in the merge manifest, three-strikes quarantine bound — are called out explicitly in §7 as gate requirements to reflect back into #5669 and #6666, not as changes to their decisions.

    Follow-ons (§9)

    Six implementation follow-ons, each filed against the sibling it depends on: gate record + state machine (first, against #5669), stage 1–2 wiring (#5669/#6021), stage 3 wiring (#5733), stage 4 wiring (#6018/#3125), stage 5 wiring + atomicity (#5669/#6666), quarantine + retry. The gate is not "done" until follow-on 1 exists as an issue against #5669.

    Four open questions are recorded with the defaults taken (§10) rather than blocking: classifier threshold ownership, whether a near-duplicate edge suppresses by default (no — publish + record), quarantined-DB retention, and whether the DO cache needs a snapshot-id dimension in v1 (deferred to #6805, staleness recorded instead).

    Expectation: PR #7707 is docs-only and awaits CI + merge under the standing criteria; merging it lands the design record. Issue stays OPEN until the design is accepted and follow-on 1 is filed.

  8. added a commit that references this issue on Nov 8, 2026
  9. dezren39 commented on Nov 8, 2026

    @dezren39
    MemberAuthor

    Atomicity correction (PR #7707 follow-up commit 3d3f996). Review of the first draft found that writing rows into an active shard and bumping its snapshot hash afterward does not prevent fan-out from observing rows mid-write. The revised record now requires immutable hidden candidate shards/occurrence overlays and one per-tier catalog commit as the visibility point; fresh fan-out pins the committed manifest generation once. Snapshot ids derive from committed manifests, not changing physical row counts. It explicitly does not claim a cross-tier transaction, and treats indefinite DO cache hits as potentially stale (separate #6666/#6805 freshness work). This is a required extension to #5669/#6666, called out as such rather than as existing behavior.

  10. added this to the Atlas program milestone on Nov 12, 2026
  11. added 2 commits that reference this issue on Nov 16, 2026
  12. dezren39 commented on Nov 17, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    Agent: repo-worker-code / any-f
    state: done (triaged — deliverable landed, closing) (task 18434, lane any-f)
    issue: #6057

    Verdict: the design this issue asks for exists and is merged — closing as completed

    Bulk-intake re-triage (2026-11-16 reload). Verified fresh 2026-11-17:

    The stale review labels (status/needs-review, status:in-review, task/triage) are being removed with this close: the review they waited on is the merge of PR #7707.

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

Metadata

Metadata

Assignees

Labels

area/infraInfrastructure, deployment, and operationsepic/atlas-programReprioritization program epic (2026-11-12)kind/designA design proposal (design-architect): multi-step, phased, decision-bearingstatus:done

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions