Desk answers, Huginn half 1: desk_answer kind and the Mind counting door #29
Loading…
Reference in a new issue
No description provided.
Delete branch "eureka-substrate/desk-answer-record"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Cut
eureka-substrate:cut_spec:cut-desk-answer-record.r1: Huginn half 1 of the fork desk's answers. Rulings: desk-answer-kind-tagged-outcome, desk-retraction-is-revision, desk-deciders-outside-mind, desk-second-peer-checked-door. Binding spec: /opt/commons/handoff/fork-desk-answer-binding-20261110.md.options_hash is filled from CultLib PR #72 (no longer stubbed). It was stubbed in the first commit and filled in
5785c0cafter Heimdall's verdict and Libby's go, at the bytes of PR #72 head 7aec4961 (the spec named c2668509; the branch has moved, A-G are unchanged): NFC every string, JCS through a struct declared in key order, SHA-256, lowercase hex. One owner:huginn_mind::options_hash. Libby's 15 vectors (A-G of the binding file plus eight) run as tests (vectors/fork-card-options-hash.json); E equals D, and a second test shows E differs from D without NFC.What lands:
desk_answerkind (epiphany.pipeline.desk_answer.v2, epoch stays v2), taggedDeskOutcome(Counted, Revision, Retraction, Refused), key<campaign>:desk_answer:<question label>.n<seq>; published schema, index row, golden line,huginn schema desk_answer.Mind::answer_desk(stamp, request, now): rules 3-8, R1, R2, R4; refusals 4-7 and R1 are stored; unknown fork, shape fault, moved campaign are refused and not stored.counted_answerderives the counted answer on every read.Door::Desk:admit, import and derivation refuse adesk_answer(DeskAnswerOutsideDesk); matrix is unchanged, so no resolution closes an answer.rests_onfield (follow-up desk-operator-cites-answer), the daemon door, Bifrost, deploy. V10b/ruledis dropped; onlyfork_closedis producible.Deviations: unknown fork or shape fault stores nothing (spec's own deviation from 1.3b).
dependshashed as stored prose lines. Wire request/response schemas regenerate becausePipelineDocumentridesAdmit. New dependencyunicode-normalization(plustinyvec,tinyvec_macros) in huginn-mind only.selection_schema_matches_cultlibneeds network (cargo fetch offline) and was not run here; the clippy-D warningsrun fails on three lines in files this cut does not touch (move_tests.rs,import.rs).Verification:
cargo test -p eureka-pipeline -p huginn-mindgreen (75 + 307);cargo check -p huginn-daemon -p eureka-state -p mind-body --all-targetsgreen; hand mutants per rule probed, all killed except one equivalent (the post-derivation Door check, since no derivation emits a desk_answer).Fix batch (attempt 2, head
368217a, cut_report eureka-substrate:cut_report:cut-desk-answer-record.h2)Contract: CultLib PR #72 head 2dea6c56.
DeskStamp.deciders); membership alone decides rule 5.authorityis an attribution (Operator, Steward, Member), stored on every answer including refused ones.answer_deskandDeskStampare crate-private. Receipt faculty is Operator only for the operator account (othersSelfFaculty, placeholder, needs a ruling).counted_answerand R1 consideroptions_hash.received_atandclaim_in_futureare stored;answered_atmust be UTC.Words: 1..=4000 bytes, not blank. Decomposed-character tests for context, option text and depends. Closed-fork retraction test.request_id(lowercase D-format UUID) on everydesk_answer; key (answerer, request_id); same body replays the stored outcome and writes nothing, another body isrequest_id_conflict(stored: no). A replayedstale_forkcarries no card from Huginn.cargo test -p eureka-pipeline -p huginn-mind75 + 321 green; check of daemon, eureka-state, mind-body green. 25 hand mutants, all killed (listed in the report).desk_answer, vector file is a byte slice of PR #72's array, not a whole file. Not merged, not deployed.Fix batch 3 (attempt 3, head
3a16772, cut_report eureka-substrate:cut_report:cut-desk-answer-record.h3)Heimdall's rulings (follow-up chat-s5422-5422).
FacultygainsMemberandSteward: attribution, not authority. Admission reads no faculty; a test admits ordinary and desk_answer batches under every variant and gets Hands' outcome. Desk receipts now name Operator, Steward or Member per the stamp; the SelfFaculty placeholder is gone. Published request/response schemas and the faculty row alias carry the new values.body_sha256stays: Huginn computes it over the canonical body (answered_at and the retraction target included), never from the client. It is the only "same body" comparison in the code. The digest form is frozen with a golden-hex test.cargo test -p eureka-pipeline -p huginn-mind75 + 325 green; check of daemon, eureka-state, mind-body green.Fix batch 4 (attempt 4, head
e70a0fe, cut_report eureka-substrate:cut_report:cut-desk-answer-record.h4)Libby's read (divergences 3, 4, 5) and Heimdall's rulings (follow-up chat-s5449-5450).
DeskBody::IllegalRetraction(a retraction carrying an answer, lackingretracts, or a plain answer carryingretracts) is storedRefused bad_retractionafter steps 4-6, binds its request_id and replays unchanged.choiceis the person's text (1..=200 bytes): one that is no option label, grammar or not, is storedRefused choice_invalid(the record keeps no choice then). Unknown fork or malformed body stays unstored and binds nothing. The body digest carries a flag for the illegal form only, so existing digests are unchanged.claim_in_futureis decided against the whole-secondreceived_atwritten to the record, not the clock reading.Facultyserde name is in the faculty row alias values.cargo test -p eureka-pipeline -p huginn-mind75 + 331 green; check of daemon, eureka-state, mind-body green; schema tests green; no schema or golden changed.🤖 Generated with Claude Code