Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion doc/living/saas-service-id-atlas-fleet.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ P1 (ID), P2 (Atlas) and P3 (fleet) are binaries and local systems. None of them
- **Atlas face** — the hosted query/search service per A1.12: the Rust binary's serve mode, per-client tokens with sensitivity ceilings, read-only data tokens held server-side only. The service is distribution/hot copy; the canonical corpus stays local-first (local atlas.db), never service-only.
- **Fleet face** — coordination and control: agent workers/tasks/leases/events (the X8 `agent` schema pattern), CI event intake (the X8 `ci` schema + webhook pattern), and the PM-stack-facing status surfaces.
2. **Platform home (v1): the muse-dev Supabase project**, per X8/X7 — it already holds the agent/ci/ideas/ainventory schemas, the webhook, and the backup pipeline, inside the $30/mo ceiling. Turso remains the fleet coordination/ledger store where it already won (queue, Atlas hot copy); the T1-vs-X8 coordination-home pick is settled explicitly as a deliverable below, not left ambiguous.
3. **Data rules:** canonical data lives with the product's local-first store; the service holds hosted copies, coordination state, and non-secret snapshots. Secret-bearing rows never cross into edge/public surfaces (the A1.14 allowlist pattern). Every hosted dataset has a DIY backup path from day one (X7 pattern: content-addressed, restore-tested).
3. **Data rules:** canonical data lives with the product's local-first store; the service holds hosted copies, coordination state, and non-secret snapshots. Sensitive rows (the top sensitivity class) never cross into edge/public surfaces (the A1.14 allowlist pattern). Every hosted dataset has a DIY backup path from day one (X7 pattern: content-addressed, restore-tested).
4. **Identity & access:** per-client bearer tokens with per-product sensitivity ceilings (A1.12 Q1–Q3 pattern); per-worker credentials (already on X8's in-flight list); no shared broad keys in service secrets (Cloudflare credential architecture, C2, is the model).
5. **Cost doctrine:** Free tier first; the $30/mo total Supabase ceiling (X7) binds until Drew raises it; any new paid surface names its trigger before it is enabled.

Expand Down
2 changes: 1 addition & 1 deletion pkgs/atlas-search/book/concepts/consumers.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Source: written from `pkgs/fleet/crates/fleet-search/src/` (`cli.rs`, `client.rs`, `pyjson.rs`, `render.rs`), `pkgs/atlas-search/docs/memory-integration-design-8567.md`, `home/common/mcpx-settings.nix`, and the consumer inventory in the Atlas programme research, in https://github.com/developing-today/code/blob/main/. Provenance only — this chapter is complete without following it.

Atlas exists to be asked questions by other systems. This chapter names every class of consumer, the surface each one actually uses, and the sensitivity ceiling each one gets — because in Atlas the ceiling is part of the consumer's identity, not a per-query preference. A **ceiling** is the highest rung of the sensitivity ladder (`shareable`, then `personal`, then `local-only`, then `secret-bearing`) a search may touch; it is enforced inside the branch queries, before any ranking, and then clamped server-side to the calling client's cap, so `effective = min(requested, cap)` and no consumer can widen its own access by asking. The full model is in [Sensitivity tiers and client ceilings](sensitivity.md); the serving machinery behind every surface here is in [The service and the Worker](service-and-worker.md).
Atlas exists to be asked questions by other systems. This chapter names every class of consumer, the surface each one actually uses, and the sensitivity ceiling each one gets — because in Atlas the ceiling is part of the consumer's identity, not a per-query preference. A **ceiling** is the highest rung of the sensitivity ladder (canonically `public`, then `internal`, then `private`, then `sensitive`; in code spelled `shareable`, then `personal`, then `local-only`, then `secret-bearing`) a search may touch; it is enforced inside the branch queries, before any ranking, and then clamped server-side to the calling client's cap, so `effective = min(requested, cap)` and no consumer can widen its own access by asking. The full model is in [Sensitivity tiers and client ceilings](sensitivity.md); the serving machinery behind every surface here is in [The service and the Worker](service-and-worker.md).

One caveat applies to every consumer equally: the corpus they search is the frozen 2026-10-31 publish (18,325 sessions, 107,639 chunks) until automatic ingest lands. Agents routinely assume the corpus is current. It is not, and that gap — not latency, not ranking — is the largest consumer-facing problem Atlas has.

Expand Down
2 changes: 1 addition & 1 deletion pkgs/atlas-search/book/concepts/ingest.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ The v1 schema is exactly five tables, applied once to an empty database; re-prov

Two properties carry the design. First, a staging database never stores vectors. Embedding happens once, at promotion, so staging stays write-cheap and no producer needs the model or the runtime described in [Embeddings: Snowflake Arctic and the parity contract](embeddings.md). Second, writes are unmediated: sensitivity is recorded on each item, not enforced at write time. Enforcement belongs to classification and the promotion gate, below — staging's job is to accept work faithfully, not to judge it.

The staging vocabulary needs one warning. A unit's recorded sensitivity, and an item's default of `internal`, use the physical tier vocabulary — `public`, `internal`, `secret` — not the four-rung search ladder (`shareable`, `personal`, `local-only`, `secret-bearing`) of [Sensitivity tiers and client ceilings](sensitivity.md). The same column name carries disjoint value sets in staging and in the publish. The aggregator translates tier to ladder when it writes a promoted chunk; nothing else declares that mapping in code.
The staging vocabulary needs one warning. A unit's recorded sensitivity, and an item's default of `internal`, use the physical tier vocabulary — `public`, `internal`, `secret` — not the four-rung search ladder (canonically `public`, `internal`, `private`, `sensitive`; spelled in code `shareable`, `personal`, `local-only`, `secret-bearing`) of [Sensitivity tiers and client ceilings](sensitivity.md). The same column name carries disjoint value sets in staging and in the publish. The aggregator translates tier to ladder when it writes a promoted chunk; nothing else declares that mapping in code.

Staging helpers bound producer shapes: an artifact at or below 32 KiB stages as one whole-file unit; a single raw chunk has a hard ceiling of 64 KiB, split at line boundaries, never mid-line. `atlas-stage ingest` stages one artifact file with repository, path, and commit SHA as its source, plus kind (`prose`, `code`, or `config`) and language.

Expand Down
2 changes: 1 addition & 1 deletion pkgs/atlas-search/book/concepts/retrieval.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ The search mode selects the branches: `hybrid` (the default, both branches), `ft

Filters and the sensitivity ceiling are applied inside each branch's SQL, before any ranking — never as a post-filter over a ranked list. This ordering is a security property, not an optimisation. A chunk above the caller's ceiling does not merely get removed from the results; it never enters the candidate pool, so it cannot displace an allowed chunk from the pool, leak its existence through a rank gap, or influence fusion. The fixture corpus pins the point: a chunk carrying the query's exact vector and exact terms must be absent at the default ceiling, not down-ranked, and present at the top when the ceiling is raised to include it.

The filter dimensions are kind, topic, project, and client (each a comma-separated list on the CLI), plus a date range over the session's creation date: `--since` is inclusive, and `--until` is inclusive by being implemented as an exclusive bound one day later. The sensitivity ceiling is a rung on the ladder `shareable`, `personal`, `local-only`, `secret-bearing`, in that order; the default grant is `personal`, and a chunk passes only when its effective sensitivity — its own recorded sensitivity, falling back to its session label's — is at or below the ceiling. A chunk with no recorded sensitivity never passes. The two branches construct this filtering differently in detail — the vector scan branch carries the session-level conditions as an allowed-id subquery rather than the full join, for cost — but the admitted set is the same set by construction.
The filter dimensions are kind, topic, project, and client (each a comma-separated list on the CLI), plus a date range over the session's creation date: `--since` is inclusive, and `--until` is inclusive by being implemented as an exclusive bound one day later. The sensitivity ceiling is a rung on the ladder — canonically `public`, `internal`, `private`, `sensitive`, spelled in code `shareable`, `personal`, `local-only`, `secret-bearing` — in that order; the default grant is `personal`, and a chunk passes only when its effective sensitivity — its own recorded sensitivity, falling back to its session label's — is at or below the ceiling. A chunk with no recorded sensitivity never passes. The two branches construct this filtering differently in detail — the vector scan branch carries the session-level conditions as an allowed-id subquery rather than the full join, for cost — but the admitted set is the same set by construction.

A second, destination-side narrowing happens after fusion, when chunk details are resolved: the disclosure context of the surface the results are going to intersects its own ceiling with the caller's, and only the permitted set is rendered in any output shape. That mechanism belongs to [Sensitivity tiers and client ceilings](sensitivity.md); the retrieval point is that branch filtering is the first gate, not the only one.

Expand Down
26 changes: 19 additions & 7 deletions pkgs/atlas-search/book/concepts/sensitivity.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,14 @@ stated at the end of this chapter.

**Client ceilings** — how much a caller may see. Four levels, in ascending
order, named in code (`SENS_ORDER`) `shareable < personal < local-only < secret-bearing`.
The canonical terminology for the four classes is
`public < internal < private < sensitive`, in the same order — `shareable`
is public, `personal` is internal, `local-only` is private, and
`secret-bearing` is sensitive. Where this book speaks of the classes
themselves it uses the canonical names; where it quotes a flag value, a
config cap, or a stored label it spells the value as the code does, because
the code spellings remain the literal values until the identifier rename
(#13506) lands with alias/migration handling for the stored values.
A *ceiling* is a maximum: a search run at ceiling `personal` may return
chunks classified `shareable` or `personal`, and nothing above. The default
ceiling is `personal` — a caller who asks for nothing gets `personal`, and
Expand All @@ -43,12 +51,12 @@ above the default is both requested and granted.

The mapping between the ladders is fixed:

| Client ceiling | Corpus tier it reaches |
|---|---|
| `shareable` | `public` |
| `personal` | `internal` |
| `local-only` | `internal` |
| `secret-bearing` | `secret` |
| Client ceiling (code spelling) | Canonical name | Corpus tier it reaches |
|---|---|---|
| `shareable` | `public` | `public` |
| `personal` | `internal` | `internal` |
| `local-only` | `private` | `internal` |
| `secret-bearing` | `sensitive` | `secret` |

Note the deliberate pinch in the middle: two ceiling levels map to the
internal tier. The ceiling ladder is finer-grained than physical placement,
Expand All @@ -58,7 +66,11 @@ staging database's `sensitivity` column speaks tier words and defaults to
`internal`, while the published `chunks` and `session_labels` columns speak
ceiling words — and the translation happens at promotion, in the aggregator,
in one direction, and at shard selection, in the other. No schema declares
the mapping; the two code points above are where it lives.
the mapping; the two code points above are where it lives. Whether the tier
vocabulary and the ceiling vocabulary are one ladder or two is a deliberate
open decision, recorded on #13506: the canonical ceiling names now share
`public` and `internal` with the tiers, which makes the question sharper,
not settled.

A third, related vocabulary appears at the output boundary: the
*disclosure context*, which names the destination surface rather than the
Expand Down
2 changes: 1 addition & 1 deletion pkgs/atlas-search/book/design/automatic-ingest.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Two memory connectors from the memory-integration programme belong to this pass'

### Gmail — a future source only

Gmail is named here for exactly one reason: so that its absence from the pipeline is a recorded decision, not an oversight. Drew has paused all Gmail background checks (2026-11-22), regardless of connection state. This design therefore does not design a Gmail pipeline — no collection shape, no cadence, no classification rule beyond naming it a future source that would be personal or local-only tier by default if it were ever unpaused. Any future mail ingest needs both reconnection and Drew lifting the pause, as its own decision.
Gmail is named here for exactly one reason: so that its absence from the pipeline is a recorded decision, not an oversight. Drew has paused all Gmail background checks (2026-11-22), regardless of connection state. This design therefore does not design a Gmail pipeline — no collection shape, no cadence, no classification rule beyond naming it a future source that would sit at the internal or private rung by default (code spellings `personal` / `local-only`) if it were ever unpaused. Any future mail ingest needs both reconnection and Drew lifting the pause, as its own decision.

### Standing constraints on every source

Expand Down
2 changes: 1 addition & 1 deletion pkgs/atlas-search/book/design/query-planning.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ The classifier's route decides where retrieval happens:

- **By source and corpus** — a query about code goes to the code shards, a memory-recall query to the memory corpora, a statistics question to the statistics source. Routing is a recall *and* a cost decision: shards outside the route are not scanned.
- **By intent** — an exact-fact lookup, an error investigation, and a conceptual question demand different branch weights, pool depths, and transforms. The route carries those choices; the branches themselves stay generic.
- **By sensitivity tier** — routing respects the caller's ceiling as a hard boundary, exactly as retrieval does today: filters and ceilings are applied inside the branch queries, before ranking. The planner may narrow a route below the caller's ceiling (a public-surface answer routes only to shareable material); it may never widen one. The planner is not a place where tier discipline can leak — it inherits the ceiling from the request and can only intersect with it.
- **By sensitivity tier** — routing respects the caller's ceiling as a hard boundary, exactly as retrieval does today: filters and ceilings are applied inside the branch queries, before ranking. The planner may narrow a route below the caller's ceiling (a public-surface answer routes only to public material — the lowest rung, spelled `shareable` in code); it may never widen one. The planner is not a place where tier discipline can leak — it inherits the ceiling from the request and can only intersect with it.

### Structured filter extraction

Expand Down
3 changes: 2 additions & 1 deletion pkgs/atlas-search/book/development/add-a-source.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ offsets and effective sensitivity, in the item's metadata.
**Sensitivity defaults.** A staged item's sensitivity defaults to the
tier word `internal` (the staging tier vocabulary is
`public` / `internal` / `secret`); per-chunk classification uses the
four-rung ladder (`shareable`, `personal`, `local-only`,
four-rung ladder (canonically `public`, `internal`, `private`,
`sensitive`; spelled in code `shareable`, `personal`, `local-only`,
`secret-bearing`). Defaults exist so an undeclared unit can be staged —
they confer no right to be promoted or served. Where several
classification records cover one chunk, the effective classification is
Expand Down
5 changes: 3 additions & 2 deletions pkgs/atlas-search/book/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,9 @@ after:
classification, and a follow-up fetch returns one chunk with that same
provenance attached. A result that cannot say where it came from is not a
result Atlas serves.
- **Tiered sensitivity.** Sensitivity is a four-step ladder,
`shareable < personal < local-only < secret-bearing`. A caller searches
- **Tiered sensitivity.** Sensitivity is a four-step ladder —
canonically `public < internal < private < sensitive`, spelled in code
today `shareable < personal < local-only < secret-bearing`. A caller searches
under a _ceiling_ — the highest sensitivity it may see — and the ceiling is
applied inside the branch queries, so material above the ceiling is absent
from the results, not merely down-ranked. The default ceiling is
Expand Down
4 changes: 2 additions & 2 deletions pkgs/atlas-search/book/operations/glossary.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ The per-batch ingest record (#6045): an in-toto-shaped statement binding a batch

### ceiling

Short for sensitivity ceiling: the highest sensitivity a caller may be shown, enforced **before ranking**, never after. The ladder is `shareable &lt; personal &lt; local-only &lt; secret-bearing`. A search's effective ceiling is a minimum of independent caps — the caller's grant, the client token's cap on the service, and the disclosure context's ceiling — and neither side can widen the other. Content above the ceiling is absent from results, not down-ranked. The full model is in [Sensitivity tiers and client ceilings](../concepts/sensitivity.md).
Short for sensitivity ceiling: the highest sensitivity a caller may be shown, enforced **before ranking**, never after. The ladder's canonical names are `public &lt; internal &lt; private &lt; sensitive`; in code the rungs are still spelled `shareable &lt; personal &lt; local-only &lt; secret-bearing` (rename: #13506). A search's effective ceiling is a minimum of independent caps — the caller's grant, the client token's cap on the service, and the disclosure context's ceiling — and neither side can widen the other. Content above the ceiling is absent from results, not down-ranked. The full model is in [Sensitivity tiers and client ceilings](../concepts/sensitivity.md).

### chunk

Expand All @@ -26,7 +26,7 @@ The chunk identity every store shares: a hash of the chunk's content, `UNIQUE NO

### corpus tier

The **physical** sensitivity vocabulary: `public` / `internal` / `secret` — the tiers shards, staging registries, and gate records are labelled with. It is a different vocabulary from the ceiling ladder (`shareable` / `personal` / `local-only` / `secret-bearing`), and the two are two namings of one ladder by prose, not by any schema-encoded mapping. The working correspondence: `shareable` → public; `personal` and `local-only` → internal; `secret-bearing` → secret. At the frozen census the corpus held 28 internal shards, 1 secret shard, and zero public shards.
The **physical** sensitivity vocabulary: `public` / `internal` / `secret` — the tiers shards, staging registries, and gate records are labelled with. It is a different vocabulary from the ceiling ladder (canonically `public` / `internal` / `private` / `sensitive`, spelled in code `shareable` / `personal` / `local-only` / `secret-bearing`), and the two are two namings of one ladder by prose, not by any schema-encoded mapping. The working correspondence, in canonical names: public → public; internal and private → internal; sensitive → secret (in code spellings: `shareable` → public; `personal` and `local-only` → internal; `secret-bearing` → secret). At the frozen census the corpus held 28 internal shards, 1 secret shard, and zero public shards.

### delta DB

Expand Down
Loading