This repository has been archived on 2026-10-29. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
- **Operator, 2026-09-17** (Epiphany map, "Operator rulings on the read side"):
- the generic vocabulary lives in CultNet, and the organ consumes it;
- receipt ordinals: yes. The stored type changes, the store takes a new
version, and an existing store refuses to open rather than being misread;
-`open_items` and `history` are deleted, not kept as presets;
-`question` and `ruling` gain a `Short` title in the leaf, and it rides the
same store version as the ordinal.
- **R-3 (selection map §16):** `admitted_after` and `admitted_before` are deleted
from the organ's wire. The latest N is `descending, limit: N`.
- **Q13 A (Epiphany map, 2026-09-16):** the wire types live in `huginn-mind`,
and the client depends on that crate for types only.
- **What stays with the organ:** the row and reference implementations, the
roles, in force, the summary, the snapshot restriction and the deletions.
- **S6 (Cut 10 residue, recorded 2026-09-22) is owned here:**
- declared names used only as read filters are never checked against the
grammar;
-`OrgRepo` claims a format it does not enforce.
## Pins
| Repo | Branch | HEAD | State |
|---|---|---|---|
| Huginn | `eureka/memory-organ` | `4f7e3b5` | **Dirty: the Cut 10 residue batch is in Hands.** It modifies seven files: `huginn-mind/Cargo.toml` (+8, a `test-support` feature), `mind.rs` (+74), `admission.rs` (±6), `daemon.rs`, `serve.rs`, `huginn-daemon/Cargo.toml` and the cut10 entries file. Anchors below are against `4f7e3b5`. **Hands re-takes them after the residue lands:**`mind.rs` lines shift, and `admission.rs` lines may shift. This map was not written against the uncommitted diff. |
| Epiphany | `codex/eureka-pipeline-state` | `b3ae787b` | Clean. The leaf changed after `9d3a3efd` only in tests (+32 lines at `lib.rs:2484`), so leaf anchors hold at both. Huginn pins the leaf at `9d3a3efd`. |
| CultLib | `main` | `070fac0` | The selection branch is not merged. `origin/main` is 14 commits past the merge base `b3d9cf7`. |
| CultLib | `cultnet/selection-cut1` | `00f4c02` | Selection Cut 1 finished executing. Its final Soul pass is running. Rust anchors are against `git show 00f4c02:packages/cultnet-rs/src/selection.rs`. |
**Pins in use:**
- Huginn: `cultcache-rs` and `cultnet-rs` at `a0813c6`, and the leaf at `9d3a3efd`.
- The leaf: `cultcache-rs` at `a0813c6`.
`git diff --stat a0813c6 00f4c02 -- packages/cultcache-rs` is **empty**. In the
same range, `cultnet-rs` gains selection (+3,111/−21 over 6 files).
## 0b. Model page: identity, lifecycle and authority
Every persistent or long-lived kind this cut touches has a row. No cell is empty.
| **Commit receipt** (`huginn.mind_commit_receipt.v2`) | `receipt_id` = `mind-commit-` + sha256 of `(instance, strong_reads, writes)`. **`ordinal` is not part of the identity.** It is excluded from the digest, as `committed_at` and `provenance` are (`receipt.rs:10-14`), so an exact replay still finds its stored receipt (A9). | Written once in its batch's own swap. It never changes and is never deleted. A replay answers `AlreadyAdmitted` with the stored receipt. | `receipt.rs`. `candidate` (`:160-178`) is the one construction site. `commit` (`:211-245`) is the one swap. |
| **Admission ordinal** (a field on the receipt) | A `u64` position in this mind's admission history. It starts at 1 and is dense: the receipts carry exactly `{1..=N}`. **Head** means `N`, the number of receipts. | Assigned when a batch is admitted, as `head + 1`, under the single writer: `&mut Mind` plus redb's lifetime lock. It is never reused. A lost swap lands nothing, so it leaves no gap. | `receipt.rs` owns both `head()` and assignment. Admission asks it for `head + 1`. The read side asks it for `head` as the current `asOf`. Both refuse a chain that is not dense, with `Unavailable`. No other code computes an ordinal. |
| **Store version** | The epoch record `huginn.mind_epoch.v1`, keyed by and naming the leaf's `PIPELINE_SCHEMA_EPOCH` (`mind.rs:25-42`), together with every stored type id. Each id carries its own version. | The epoch moves when the leaf breaks its schema. A type id moves when its owner breaks that type. An old store is refused by the opener and never migrated. That is the operator's ruling, and it costs nothing today (F5). | The leaf owns the epoch string and its thirteen type ids. Huginn owns the receipt's type id and the gates. **The epoch gate runs first** (RS-1), so a store written at an old epoch is refused as `ForeignEpoch`. A foreign type in a store at the current epoch stays `ForeignStore`. |
| **Question and ruling title** | The field `title` on `PipelineQuestion` and `PipelineRuling`. Its type depends on Q-RS1. | Written by the author, immutable like every leaf field, and required. | The leaf owns the field and its bound. Admission validates it through `PipelineDocument::validate`, as it does every other field. |
| **Selection cursor** | An opaque string minted by `cultnet_rs::Cursor::mint`. It carries `asOf`, the last `(ordinal, schemaId, recordKey)`, and a digest of the selection with `cursor` and `limit` cleared. | One per page that has a next page. It lives as long as the client keeps it. **It never goes stale on Huginn:** the mind is append-only with one writer, so the organ can always present rows as of any `asOf ≤ head`. | The substrate mints it, parses it and checks its digest. The organ decides which `asOf` to answer at: the cursor's own, and never `head`, because the substrate refuses `cursor_stale` whenever the two differ (F7). An `asOf > head` is refused `CursorInvalid`: this mind could not have minted it. |
| **Snapshot image** (the rows as of `asOf`) | `asOf`. | Built per read call and thrown away with it. Nothing is stored. | `query.rs``Reader::at(mind, as_of)` builds it. It holds the documents whose writing receipt has `ordinal ≤ asOf`, and **every derivation runs over that restricted image**: in force, the closing resolution, citations and base. |
| **Declared vocabulary**: aliases, roles and their value domains | Alias and role names, which are the organ's closed lists (RS-3 §"Vocabulary"). | Changes only with code. There is no catalog. A new alias or role is a normal change. | `huginn-mind``rows.rs`, through `RowSet`. The substrate door checks the **names**. The organ's door checks the **values**, which is S6. |
| **Citation edge** | `(from: PipelineRef, role: CitationRole, to: PipelineRef)`. | Derived from the leaf fields each time it is read. Never stored. | `docs.rs``citations()` is the one edge list. Admission's A7 (`admission.rs:242-285` today) and the read side's `Row::references` both read it. |
| **Header (summary)** | `PipelineDocumentSummary`, keyed by the row's `id`. | Derived each time it is read, and bounded by `SUMMARY_MAX_BYTES`. | `query.rs`. It is the organ's meaning of `projection: header` (selection §2 "Projection"). |
| **Published schemas** | The leaf's thirteen `epiphany.pipeline.<kind>.v2.schema.json` files plus `index.json`. Huginn's `huginn.mind_request.v1` and `huginn.mind_response.v1`. | They are regenerated whenever the derivation changes, and pinned byte for byte by a test (leaf `lib.rs:2324`; Huginn `wire.rs:210-216`). The request schema `$ref`s CultLib's published selection schema by its `$id` (F9). | The leaf owns its thirteen. Huginn owns its two. CultLib owns `cultnet.selection.schema.json`, and nothing copies it. |
| **Mutation suites** | Files: `tools/eureka-cut9-mutations.psd1` (V entries), `tools/eureka-cut10-mutations.psd1` (D/S entries), and the new `tools/eureka-readside-mutations.psd1` (Huginn) and `tools/eureka-readside-leaf-mutations.psd1` (Epiphany). | The entries whose rule died with a deletion are **deleted** (RS-2). The entries whose rule survives under a new spelling are **re-authored** in the readside suite (RS-3). Every file keeps its M0 control. | Hands writes them. The harness is `~/.claude/skills/eureka/tools/eureka-mutations.ps1`. |
Forks this page surfaced: **Q-RS1** (what a title is) and **Q-RS2** (whether
`huginn-mind` may link `cultnet-rs`). Both are in §9.
## 1. Body facts
Each fact comes from a source read at a named HEAD, and wherever a mechanism
claim needed it, from a run. The probes are in the session scratchpad:
-`readside-probe/` was built against `cultnet-rs@00f4c02` and `huginn-mind` by
path. That path was the `4f7e3b5` tree plus the residue batch's uncommitted
edits, read only; see "Not probed".
-`storev2/` holds copies of the leaf and of `huginn-mind`, emulating the
version bump.
-`schemaprobe/`.
The target directory is `C:\Users\Meta\.cargo-target-codex\imag-readside`: 941
files, 0.37 GiB, cold build 3m07s. Nothing was cleaned.
### F1. The four reads today (`query.rs` at `4f7e3b5`)
**What every read shares.** Every read builds `Reader::new`
(`query.rs:206-209`). That decodes **the whole image**
(`docs.rs:42-52`) and **every receipt** (`mind.rs:186-196`, then
`AdmissionIndex::build`, `query.rs:134-150`), on every call. A document that no
receipt wrote refuses as `Unavailable`. A document that two receipts wrote
refuses the same way.
**`view`** (`:323-327`). It asks `validate_ref` first (V24), then finds the
`(kind, key)` by a linear search, then joins the facts and the status.
**`query`** (`:331-350`):
- It refuses `semantic` before the reader exists (V8/V8L).
- It scans every held document.
-`Reader::matches` (`:249-290`) applies these filters:
-`campaign` = the key's root segment (V18/V18L: the root, not a field);
-`repo` and `cut`, read through `base()` (`:237-246`), which walks
resolutions down to their subject;
-`kinds`;
-`in_force`;
-`faculty`;
-`admitted_after` and `admitted_before`, compared as strings.
- It orders by `(admitted_at, id)` (`:307-311`).
- It clamps `limit` into `1..=200` (`QUERY_LIMIT_MAX`, `:32`), and reports
`matched` before the cap.
**`open_items`** (`:355-391`). It filters all views to the campaign root, then
builds five lists:
- in-force questions, findings and follow-ups;
- in-force cut specs that no `cut_report.cut_spec` names;
- cut reports that no `verdict.cut_report` names.
It is uncapped.
**`history`** (`:401-435`):
-`Subject(ref)` asks `validate_ref`, reads `resolutions_of`, and orders by
sequence.
-`Repo(org_repo)` reads `assignments_of(mind, repo)` and orders by sequence.
**Nothing checks the `OrgRepo`.** The doc comment at `:399-400` claims "the
type already holds [it] to its own format". It does not: `Bounded` is
crate-private to the leaf, and a deserialised `OrgRepo` is never validated.
This is S6.
**Wire.** `HuginnMindRequest` (`wire.rs:42-50`) and `HuginnMindResponse`
(`:81-90`) carry one variant each per read. **Daemon.** The arms are at
`daemon.rs:84-99`. The instance gate at `:66-71` runs for every read.
**Probe, run.** A real redb mind built through the organ's public API
reproduces the `open_items` scenario of `query.rs:943-1003` and three answer
cycles for `history`. Every list the organ answered was then re-answered
through `cultnet_rs::select` over rows built from the organ's own views. **All
seven relations match, in members and in order:** the five open lists,
`history(Subject)` and `history(Repo)`.
`specs_without_report` came back `[cut-9.r2, cut-12.r2]`. That is admission
order, because the probe's clock advances per batch. The Cut 9 test pins
`[cut-12.r2, cut-9.r2]`, the id order that results when every batch shares one
`now()`. **Tests that pin id order under a single clock change their
expectation once the order becomes the ordinal.** Hands expects this; it is
not a regression.
### F2. Where receipt ordinals come from
There is no ordinal today.
-`candidate` (`receipt.rs:160-178`) is the one place a receipt is constructed.
`commit` (`:211-245`) makes one compare-and-swap. Its expectation is the
strong reads, and its insert-only replacements are the writes plus the
receipt.
- **The swap does not guard an ordinal.** Receipts are insert-only under their
digest key, so two receipts claiming one ordinal would both insert (the store
semantics are at `store.rs:135-159`). Uniqueness therefore rests on the single
writer: `admit` takes `&mut self`, and the owned store holds a lifetime lock
(ruling 15). F7 of the Cut 10 pass already recorded that the store is not
sealed.
- The map's answer is to derive the ordinal as `head + 1` and to **validate
density wherever it is read**. It does not add an insert-only ordinal row,
which would be a new persistent kind that guards only against this organ's own
code. Sealing the store is the recorded follow-up that closes the gap
structurally.
**Probe, run: the order cannot be recovered from the clock.** A real store,
| `fn history\b` | prose uses "history" in comments |
| `admitted_after`, `admitted_before` | — |
- mutations: cut9 (27 remaining) and cut10 (65 remaining) rerun, with every
M0 green.
- **Subtraction estimate:** about −110 source lines and about −330 test lines.
17 entries are removed and 2 re-anchored. No dependency or format changes.
### Cut RS-1. Huginn: the receipt ordinal, receipt v2, and the epoch gate first
- **Repo/branch:** Huginn, after RS-2. No pin move. The leaf is still at
epoch v1 here. Its epoch arrives with BP-2, before any mind is deployed:
Cut 14 is unbuilt. The one store version any deployed mind ever carries is
therefore (leaf epoch v2, receipt v2), which is the ruling's single migration.
- **Deletes first:** none.
- **Changes (anchors at `4f7e3b5`):**
- **`receipt.rs`:**
-`:27` and `:95` change `v1 → v2`. `HuginnCommitReceipt` (`:94-111`)
gains `#[cultcache(key = 7)] pub ordinal: u64`.
-`candidate` (`:160-178`) takes `ordinal: u64`.
-`digest` (`:116-120`) is **unchanged**: the ordinal is not digested. The
header doc (`:10-14`) names the ordinal beside `committed_at` and
`provenance`.
-`validate` (`:122-142`) refuses `ordinal == 0`.
- New: `pub(crate) fn head(mind) -> Result<u64, MindRefusal>` decodes the
receipts and requires their ordinals to be exactly `{1..=N}`. Anything
else is `Unavailable { detail: "receipt ordinals are not 1..=N: …" }`.
Admission calls it for `head + 1`. Nothing else computes an ordinal.
- **`admission.rs`:** the one `candidate(…)` call passes `head(self)? + 1`.
- **`query.rs`:** `AdmissionFacts` (`:36-41`) gains `ordinal: u64`, and
`AdmissionIndex::build` (`:134-150`) fills it. **The order is not switched
here.** `ordered` (`:307-311`) is deleted in RS-3, not rewritten twice.
- **`mind.rs:137-138`:** swap to `refuse_foreign_epoch`, then
`refuse_foreign_types`. The doc at `:129-133` is updated to match.
- **`wire.rs`:** regenerate the response schema, because `AdmissionFacts`
changes.
- **Authority map:**
- **Owner:** `receipt.rs` owns the ordinal, meaning both its assignment and
its validity.
- **Inputs:** the image's receipts.
- **Outputs:** `head`; and `ordinal` on each receipt and on `AdmissionFacts`.
- **Derived state:** `AdmissionFacts.ordinal`, which is display-only until
RS-3 makes it the order.
- **Forbidden writers:** no code outside `receipt.rs` counts receipts to
produce an ordinal. `MindStatus.receipts` (`wire.rs:106-114`) counts them
for display and is not an ordinal.
- **Shared paths:** `admit` and `admit_prepared`, and so the daemon's sink
and Cut 12's import, all end in the one `candidate` call.
- **Deletion line:** none. The ordinal is new.
- **Verification (tests; each rule has a revert and a loosening that fail):**
| Test | Rule it pins | Mutants that must die |
|---|---|---|
| `ordinals_are_admission_order_not_clock_or_id_order` | ordinal is `head + 1` at admission. The fixture has **three batches admitted at the same `now`**, whose receipt ids sort opposite to admission order; the probe's real store shows 31 receipts in 5 seconds, so this is the live case | revert `ordinal: 1` for every receipt (dies on the density check); **function-of-input loosening:** the ordinal is the rank of `(committed_at, receipt_id)` among receipts, which the same-second fixture kills; off-by-one `head` |
| `an_exact_replay_keeps_its_ordinal` | the ordinal is not digested (A9) | the ordinal inside the digest makes the replay commit again or refuse, and must die |
| `a_chain_that_is_not_dense_refuses_admission_and_reads_alike` | density is validated wherever the ordinal is read. The fixture plants a duplicate and a gap through `MemoryStore` | `head` returns `len()` without checking; the check runs only in admission |
| `a_v1_receipt_store_is_refused_at_open` | receipt v2 is a new type. The fixture plants a v1-shaped 7-slot receipt under `huginn.mind_commit_receipt.v1` | adding the field with `#[serde(default)]` and keeping the v1 id; F3 shows that this decodes to 0 silently |
| `a_store_written_at_the_previous_epoch_is_refused_by_the_epoch_gate` | epoch first. The fixture has an epoch record at `epoch.v0` and type ids at `.v0` | swapping the gates back makes it `ForeignStore`, which must die. The existing eight cases in `mind.rs:345-413` stay green unchanged, and that is part of the check |
- Entries: `tools/eureka-readside-mutations.psd1`, R1-R5 with L variants
and an M0.
- Cut8's A9 replay entries rerun, because `candidate`'s signature changed.
- **Subtraction estimate:** about +45 source lines and +160 test lines. No
dependency changes. **Formats:** one moves, receipt v1 → v2.
### Cut RS-3. Huginn: the consumer
- **Repo/branch:** Huginn, after BP-2 (pins at X, leaf at RS-L's tip) and after
RS-1. Depends on Q-RS2, and on P-1 and P-2 being in X.
- **Commits, in order.** Each builds and passes on its own.
1.**The edge list moves to its owner (ownership only).** It moves from
`admission.rs:175-178` (`kind_of_id`) and `:223-285`
(`outcome_references`, `references`) into
`docs.rs::citations(document) -> Vec<(CitationRole, PipelineRef)>` and
`CitationRole`: the fifteen roles of the earlier read-side spec's D3 (list
below).
- Admission's `references` becomes a map over `citations`, carrying the
`Missing` classification (`:203-207`) and the hand-off source-side
filter. It has the same refusals in the same order.
- Cut8's `H17` entry (`refs.extend(outcome_references(…))`) is
re-anchored into `docs.rs`, with the rule unchanged.
- Verified by: the cut8 suite 67 of 67 (plus H17 re-anchored) and the
full admission test set, unchanged.
2.**Deletes first:**
-`PipelineQuery` (`query.rs:77-97`) and `PipelineQueryPage` (`:101-105`);
-`QUERY_LIMIT_MAX` (`:32`), which is replaced by
`cultnet_rs::LIMIT_MAX`, the substrate's clamp;
-`Reader::matches` (`:249-290`) and `ordered` (`:307-311`);
-`root_and_local`'s role as a filter. It survives as the row's value
source for `root` and `cut`;
-`repo_matches` (`:178-195`), which moves to the row's `repo` values;
-`lib.rs:40-43`, the re-exports of all of the above.
3.**The consumer:**`rows.rs` (new), `query.rs` rewritten around it,
`wire.rs`, `refusal.rs`, and `daemon.rs:88-91`. Details below.
- **Schemas.** These are the thirteen leaf type ids. `schemas` entries are
matched exactly: Rust carries no alias matching (`selection.rs:438-440`).
- **Aliases.** Each row answers `values(alias)` with strings. Every value is
checked at the organ's door against the domain in the last column.
| Alias | Declared on | Value | Door (domain) |
|---|---|---|---|
| `root` | all | the key's root segment. This is V18/V18L's rule, renamed from `campaign` because a stewardship's root is an instance and a resolution's is its subject's | `Slug::validate_slug` |
| `in_force` | all | `"true"`/`"false"` | exactly those two |
| `faculty` | all | `Faculty` variant name | the closed set |
- adds one total mapping from `SelectionRefusal`, **with no wildcard arm**:
-`Invalid` becomes `SelectionInvalid`;
-`CursorInvalid` becomes `CursorInvalid`;
-`CursorStale` becomes `Unavailable` ("the organ answers at the cursor's
asOf; a stale refusal is an organ defect"). A test proves it
unreachable;
-`ReferenceOutsideTarget` becomes `Unavailable`, as integrity: A7 admits
only referents of the declared kind.
- **`daemon.rs:88-91`:** the arm passes `selection` and `semantic` through, and
the refusal crosses unchanged. The existing D entries for this arm are
re-anchored.
- **Authority map:**
- **Owners:**
- The substrate owns the grammar of a selection's names, the order, the
cursor, the hop and paging.
- The organ owns the rows, their ordinals and values, the vocabulary, the
value domains, the snapshot, the header, and the mapping of refusals.
- The leaf owns every value grammar.
- **Inputs:** the image, the receipts, and `head` (from `receipt.rs`).
- **Outputs:** `PipelineSelectionPage` and typed refusals.
- **Derived state:**
-`in_force`, `base` and the edges are derived per read, over the snapshot;
- the summary is derived per read;
-`matched` is the substrate's.
- **Forbidden writers:**
- no filter, order or paging logic in `huginn-mind`, beyond the as-of
restriction;
- no second copy of the selection's schema;
- no refusal of a selection name that the substrate already refuses. If
the substrate ever starts refusing unknown `schemas`, the organ's copy
of that rule is deleted (§10);
-`cultnet_rs::select`'s result is never re-filtered.
- **Shared paths:**
-`view` and `query` share `Reader::at`;
- admission and reads share `citations` and `head`.
- **Deletion line:** commit 2 above.
- **The relations, re-pinned by name** (R-B and D6 of Cut 9, and V9-V15):
| Test | Relation |
|---|---|
| `a_subjects_history_is_one_cites_hop` | `schemas:[resolution], cites{target: S, role: subject}`, in ordinal order, with withdrawn records included with their status. The ten-cycle fixture of the deleted test is used, so n10 lands after n9 |
| `open_work_is_five_selections` | the probe's five selections (F1), with the `query.rs:943-1003` fixture: the exact-id citation (V13L, V14L), and the superseded revision not open (V13) |
Each is a positive answer **and** a fixture that fails when the relation is
weakened. For example, `role` omitted from the subject history must return
the `resolved_by` edges too, and the test must see that.
- **Verification (tests and mutations).** The file is
`tools/eureka-readside-mutations.psd1`, with target
`crates/huginn-mind/src/{rows.rs,query.rs,docs.rs,refusal.rs}`. The rows run
in this order: snapshot, order, value door, edges and refusals, summary and
wire.
| Rule | Test | Revert | Loosening (at least one a function of the input where the rule is "derived from") |
|---|---|---|---|
| A page is exact as of `asOf`: rows **and** every derivation | `a_walk_reads_the_snapshot_its_cursor_names`. Mint at N; admit a batch that closes a page-2 item and adds a match; page 2 still shows the item in force, the new match is absent, and `matched` is unchanged | use `head` instead of the cursor's `asOf` (the substrate refuses stale, and the test must see `CursorStale` → `Unavailable`) | restrict rows but build `Docs` over the full image, so in force leaks; `ordinal < as_of` (the boundary batch is dropped: the fixture's last page-1 row lands at exactly `asOf`) |
| `asOf > head` is refused | `a_cursor_from_the_future_is_invalid` | skip the check | `>=` in place of `>` (a cursor at exactly `head` must answer) |
| The order is the ordinal | `the_page_order_is_admission_order` (same-second batches, ids opposite to admission) | `Row::ordinal` returns 0 | the ordinal from the rank of `admitted_at` |
| `root` is the key root, in the Slug grammar (S6) | `a_root_outside_the_grammar_is_refused_not_empty` | skip | check only the first value (the fixture is `["eureka-state", "a/../b"]`) |
| `repo` is an OrgRepo (S6) | `a_repo_outside_org_repo_is_refused` (`"GameCult/"`, `"a/b/c"`) | skip | `contains('/')` |
| `cut` is a Label | `a_cut_outside_label_is_refused` (`"1.2"`) | skip | the Slug door in place of the Label door |
| Enum domains are exact | `enum_values_are_the_variant_names` (`"high"` refused, `"High"` accepted) | skip | a case-folded comparison |
| `schemas` and `keys` name things this organ holds | `an_unknown_schema_or_malformed_key_is_refused` | skip | accept any id that starts with `epiphany.pipeline.` |
| `cites.target` passes the leaf's ref grammar (V24) | `a_cites_target_whose_kind_disagrees_is_refused` | skip | check the schema id only, not `validate_ref` |
| V17/V17L: through base, to the first non-resolution | `repo_and_cut_reach_a_resolution_through_its_base` | values from the row itself | one step of `base` (the fixture is a withdrawal of a resolution) |
| One edge list | `every_role_yields_its_edge` (a fixture per role, 15) | drop one role's arm | `resolved_by` from `Answered` only (a `Fixed { by: Some }` fixture) |
| Refusals cross typed (D19/D23's successor) | `a_selection_refusal_crosses_the_dispatch_as_itself` | rewrap as `Unavailable` | swallow into an empty page |
| The header is bounded | `a_summary_is_bounded_whatever_the_lists` (maximal cut spec) | drop the bound test's constant | measure the facts without `admission` |
| Wire schemas equal derivation, and `selection` is CultLib's `$ref` | the existing `published_wire_schemas_match_derivation` | — | — |
- builds:
-`cargo test -p huginn-mind -p huginn-daemon`;
-`cargo tree -p huginn-daemon -e normal -d`, which must show no
| `Cursor::parse` is public and exposes `as_of` | `:1301-1346` | **Load-bearing.** Huginn reads `as_of` before `select` to restrict rows. If Soul makes the cursor private, the substrate must expose `cursor_as_of(&str) -> Result<u64, SelectionRefusal>` instead. It must not become an organ-side parse of an opaque format. |
| `select` refuses `CursorStale` exactly when `cursor.as_of != as_of` | `:1131-1136` | Huginn passes the cursor's own `asOf`, so equality holds under any comparison rule. |
| `select` does not call `validate` | `:1089-1114` | Huginn calls it first. If `select` starts validating, Huginn's call becomes redundant: delete it, and keep one owner. |
| `validate` does not refuse unknown `schemas` | `:864-873` | Huginn's door refuses them. If the substrate starts refusing, **delete Huginn's copy.** |
| `target_leaves(role)` has no schema parameter, and empty means unrestricted | `:747`, `:1204` | Huginn's roles are unique and "any" is spelled as the 13 ids, so it is unaffected either way. |
| Rows are indexed by record key alone | `:1095` | Huginn's keys are unique across kinds (F12), so it is unaffected. |
| `Row::ordinal -> i64`, `as_of: u64` | `:699`, `:1093` | A cast in `rows.rs`. |
| Glob re-export: `select`, `validate`, `matches`, `Cursor` at the crate root | `lib.rs@00f4c02` (`pub use selection::*`) | If they move under `cultnet_rs::selection::`, only spelling changes. Huginn always calls them qualified. |
| `projection` is a `String` with two constants | `:374-376`, `:462` | Huginn matches the constants. An enum would be a spelling change. |
| The published `$id` of `cultnet.selection.schema.json` | `contracts/cultnet/…@00f4c02` | RS-3's `$ref` names it. A move of the `$id` fails Huginn's byte-for-byte schema test, which is the intended tripwire. |
## 11. What was probed, what was only read, and what is not settled
- **Probed by running code:**
- F1: all seven old relations equal a `select` over rows. Organ answers and
substrate answers match in members and in order.
- F2: the real store has 31 receipts in 5 seconds.
- F3: the receipt is a positional 7-slot array; a v2 strict decode fails;
a v2 decode with a default gives a silent 0.
- F5: the real v1 store is refused by today's gate order as `ForeignStore`
and by epoch-first order as `ForeignEpoch`.
- F6: `CursorStale` on an `asOf` mismatch.
- F7: the substrate door accepts malformed values.
- F9: `E0117`, and the `$ref` via `schema_with` works.
- F10: `E0277` on `Eq`.
- F12: key uniqueness.
- The duplicate `cultcache-rs` when revisions differ (the body-plane map's F5)
was seen in the probe build.
- **Read only:**
-`Evaluation` lacking `matched` (F8). It is certain from the struct but not
exercised.
- That a required leaf field fails an old payload with "missing field". This
follows from serde. It is not probed, because the opener refuses such a
store first in any case.
- The `$defs` layout of CultLib's response schema.
- The Cut 8 grep text.
- **Not probed:**
- **The probe's `huginn-mind` was the working tree at `4f7e3b5` plus the
residue batch's uncommitted edits.** It was read through a path dependency
and was never modified. The relations it exercised (`open_items`,
`history`, `query`, `receipts`, `open`) are outside the residue's scope
(the gate fixtures, `path_for`, the `open_with` door), so the results
should hold at the post-residue HEAD. Hands re-runs the equivalence as
RS-3's re-pinned tests in any case.
- C# decoding anything Huginn emits. Huginn's wire is its own; only
`Selection` is shared, and the selection campaign's parity vectors own it.
- Performance. Every read still decodes the whole image and every receipt
per call (F1), and RS-3 adds a row build. That is fine at campaign scale
and is not measured at a thousand-document mind.
- **Not settled here:** Q-RS1 and Q-RS2 are the operator's; Q-BP1 and Q-BP2 are
already open. P-1 and P-2 are the selection campaign's to accept.
- **Substrate missing, recorded per the skill:** typed pipeline state. This map,
its model page and its questions live in markdown, and the durable summary
spec (earlier read-side D1) lives in another session's scratchpad. Huginn is
the organ that would hold both, and it is the thing being built.
## Appendix A. The summary type (carried here from cut10b-read-side-spec.md D1, 2026-09-17)
Copied verbatim by Self on 2026-09-22 from a session scratchpad that will not survive. It predates the move of selection into CultNet: `PipelineQuery`/`Projection` here are the organ's own vocabulary and are superseded by CultNet's `Selection` and `projection`. What remains authoritative is `PipelineDocumentSummary`, `PipelineStatusSummary`, `PipelineFacts`, the field table and the size bound. Q-RS1 decides whether question and ruling facts gain a `title`.
### D1. Projection: a summary is the default, the document is asked for
`PipelineQuery` gains `projection: Projection` with
Each field, by the question it answers for a caller deciding what to work on:
| Field | Question |
|---|---|
| `id` | what to `view`, cite, or resolve; the key already carries campaign, cut and label, so those are not repeated. |
| `admission` | who landed it, when, under which faculty (ruling 18: attribution). The type is Cut 9's, unchanged, so there is one admission shape. |
| `status` | is it open, and if not, what closed it and how (`Answered by`, `Superseded by`, `Withdrawn { reason }`). The closing record's `rationale` (Para) and `resolved_on` are the one thing dropped: the caller who wants why opens the resolution. |
| Campaign `title, repos` | which repos are in jurisdiction. |
| Target `revision, invariants` | which invariant labels findings and verdicts may cite; whether this is the standing revision (with `status`). |
| Question `label, options, recommended, raised_in, asked_on` | is it open, what are the choices, what raised it, how old it is. The question text is `Para` and not carried. |
| Ruling `label, answers, choice, authority, ruled_on` | did it answer a question and with which option; was it the operator's, standing, or defaulted. The ruling text is `Para` and not carried. |
| CutSpec `cut, revision, title, repo, branch, base, depends_on` | which cut, which revision, where it lands, what it waits on. |
| CutReport `cut_spec, attempt, repo, branch, range` | which spec it reports, which attempt, what range to check out. |
| Verdict `cut_report, pass, range, outcomes` | which report, which pass, and whether any claim was falsified or unproven, one enum per claim in claim order. |
| Finding `verdict, label, confidence, severity, origin, claim, invariants, range` | the triage row: how sure, how bad, whether it was introduced, which invariant it breaks, and its one-line claim. `claim` is the leaf's own `Line` and is carried whole, not projected; `failure_scenario` (Para), `locations`, `evidence` are not. |
| FollowUp `label, source, repo, owner, item` | who owns it, where, and its one-line item (the leaf's `Line`). |
| Resolution `subject, sequence, outcome, resolved_on` | what it closed, its place in the subject's history, how. |
| Instance | the whole document: four short fields. |
| Stewardship `instance, repo, sequence, assigned_on, note` | which assignment, and the note, which on a derived assignment carries the hand-off key (`docs.rs:136-140`). |
| HandOff `from, to, repo, handed_on` | who moved what where; `documents` (256 Shorts, 51 KB) and `reason` (Para) are not carried. |
**Rule the summary obeys, and the test pins:** a summary's encoded size is
bounded by a named constant independent of the document's lists.
`SUMMARY_MAX_BYTES = 8_192`. Arithmetic from the leaf's bounds: `id` 230,