Desk wire, part 1: Libby's answer documents, the one n<seq> conversion, the projection and Mind::desk_answer #31

Merged
eureka merged 14 commits from eureka-substrate/desk-wire into main 2026-11-10 19:44:17 +00:00
Owner

Cut desk-wire (spec eureka-substrate:cut_spec:cut-desk-wire.r5), part 1: Libby's answer-side documents as Rust types, the one n<seq> conversion, the projection of stored answers with derived counts, the refusal mapping, the showability gate and Mind::desk_answer. Huginn builds no card. Nothing is deployed; no decider, door, socket, envelope, schema file or read is touched.

  • crates/huginn-mind/src/desk_wire.rs (new, pub mod): ForkAnswerRequest, ForkAnswer, ForkDeskAnswer, ForkRefusal, ForkAnswerCode (+ ForkRefusalCode and three single-variant schema enums that const-check schemaVersion), DeskResponse; private answer_key/answer_seq pair (the only spelling and parsing of a desk answer key), request_of, project, door_refusal, showable; Mind::desk_answer(deciders, subject, attribution, request, now) -> (DeskResponse, replayed). Her nullable keys are required on decode (present, null if empty).
  • desk.rs: answer_desk's (answerer, request_id) lookup is now bound_answer, pub(crate), called by answer_desk and by desk_answer, so the showability gate runs only when nothing is stored for that request and a stored answer replays whatever the decider list is now. The dead-code allowance on answer_desk is deleted; vectors() reads the optionsHash array of the vendored file.
  • Vendored vectors/fork-card-vectors.json at CultLib 6231ecad (blob 7701ff02, 943,940 bytes); fork-card-options-hash.json deleted.
  • Tests: huginn-mind 338 -> 365 passed (26 in desk_wire): her request, refusal and answer vectors byte for byte, 61 of her 63 scenarios replayed with counted_answer_id, the refused target and a one-to-one id map checked, the bodyDigests goldens, the gate for every request form, as_of on every answered response, pass-through of request id, retracts, note, choice and Unavailable in padded and trailing-junk spellings, a key outside its fork's form projecting Unavailable.
  • Mutation: cargo-mutants on desk_wire.rs at bc6be42, 45 mutants, 32 caught, 13 unviable, 0 missed, 0 timeouts; Soul's survivors S1 S2 S3 S5 S8 S9 S10 S11 S12 each applied by hand and seen to fail.

Fixes after Soul's verdict cut-desk-wire.s1 (report cut-desk-wire.h3): desk-wire-gate-shadows-replay, desk-wire-required-keys-optional, desk-wire-long-fork-id-body-invalid, desk-wire-asof-and-gate-thinly-pinned, desk-wire-pass-through-unpinned, desk-wire-second-converter-evades-grep, desk-wire-replay-id-map-not-injective.

Deviations: an over-long (over 200 bytes) fork_id is fork_unknown (her vectors and schema do not say; pinned); her answer ids are still mapped to the Mind's sequence in 19 scenarios whose fixtures number arbitrarily (the map is one-to-one and the identity where hers are sequential); the 2 changed-card scenarios are not replayed (questions are immutable); the ygg mutation harness was unavailable, so cargo-mutants ran directly.

🤖 Generated with Claude Code

Cut desk-wire (spec eureka-substrate:cut_spec:cut-desk-wire.r5), part 1: Libby's answer-side documents as Rust types, the one `n<seq>` conversion, the projection of stored answers with derived counts, the refusal mapping, the showability gate and `Mind::desk_answer`. Huginn builds no card. Nothing is deployed; no decider, door, socket, envelope, schema file or read is touched. - `crates/huginn-mind/src/desk_wire.rs` (new, `pub mod`): `ForkAnswerRequest`, `ForkAnswer`, `ForkDeskAnswer`, `ForkRefusal`, `ForkAnswerCode` (+ `ForkRefusalCode` and three single-variant schema enums that const-check `schemaVersion`), `DeskResponse`; private `answer_key`/`answer_seq` pair (the only spelling and parsing of a desk answer key), `request_of`, `project`, `door_refusal`, `showable`; `Mind::desk_answer(deciders, subject, attribution, request, now) -> (DeskResponse, replayed)`. Her nullable keys are required on decode (present, null if empty). - `desk.rs`: `answer_desk`'s `(answerer, request_id)` lookup is now `bound_answer`, `pub(crate)`, called by `answer_desk` and by `desk_answer`, so the showability gate runs only when nothing is stored for that request and a stored answer replays whatever the decider list is now. The dead-code allowance on `answer_desk` is deleted; `vectors()` reads the `optionsHash` array of the vendored file. - Vendored `vectors/fork-card-vectors.json` at CultLib 6231ecad (blob 7701ff02, 943,940 bytes); `fork-card-options-hash.json` deleted. - Tests: huginn-mind 338 -> 365 passed (26 in desk_wire): her request, refusal and answer vectors byte for byte, 61 of her 63 scenarios replayed with counted_answer_id, the refused target and a one-to-one id map checked, the bodyDigests goldens, the gate for every request form, as_of on every answered response, pass-through of request id, retracts, note, choice and Unavailable in padded and trailing-junk spellings, a key outside its fork's form projecting Unavailable. - Mutation: cargo-mutants on desk_wire.rs at bc6be42, 45 mutants, 32 caught, 13 unviable, 0 missed, 0 timeouts; Soul's survivors S1 S2 S3 S5 S8 S9 S10 S11 S12 each applied by hand and seen to fail. Fixes after Soul's verdict cut-desk-wire.s1 (report cut-desk-wire.h3): desk-wire-gate-shadows-replay, desk-wire-required-keys-optional, desk-wire-long-fork-id-body-invalid, desk-wire-asof-and-gate-thinly-pinned, desk-wire-pass-through-unpinned, desk-wire-second-converter-evades-grep, desk-wire-replay-id-map-not-injective. Deviations: an over-long (over 200 bytes) fork_id is `fork_unknown` (her vectors and schema do not say; pinned); her answer ids are still mapped to the Mind's sequence in 19 scenarios whose fixtures number arbitrarily (the map is one-to-one and the identity where hers are sequential); the 2 changed-card scenarios are not replayed (questions are immutable); the ygg mutation harness was unavailable, so cargo-mutants ran directly. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Vendors fork-card-vectors.json at CultLib 8ca1d184 and retires the options-hash file it contains.
answer_desk's dead-code allowance goes: desk_answer is its live caller. No card is built here.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
answer_desk's (answerer, request_id) lookup is now bound_answer, pub(crate) in desk.rs, and
Mind::desk_answer asks it so the gate runs only when nothing is stored. Finding
desk-wire-gate-shadows-replay.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Finding desk-wire-required-keys-optional.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Her vectors hold no over-long fork id (deviation recorded). Finding desk-wire-long-fork-id-body-invalid.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Kills Soul's S2, S3 and S5 (each applied and seen to fail). Finding desk-wire-asof-and-gate-thinly-pinned.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Padded, cased and trailing-junk spellings added to the existing tables; Soul's S1, S8, S9, S10 each applied and seen to fail. Finding desk-wire-pass-through-unpinned.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Soul's S12 (a second converter that agrees on every legal key) applied and seen to fail. Finding desk-wire-second-converter-evades-grep.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
S11 applied with the sequential check off and seen to fail on it. Finding desk-wire-replay-id-map-not-injective.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
eureka merged commit 664be6e77a into main 2026-11-10 19:44:17 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
GameCult/Huginn!31
No description provided.