From 583d6f52b7819f111ac6ff5d16ba43c9d88010ed Mon Sep 17 00:00:00 2001 From: Eureka Date: Tue, 10 Nov 2026 17:38:36 +0000 Subject: [PATCH] desk: header facts derive whether an answer counts at the read's snapshot; refusals keep what was sent PipelineFacts::DeskAnswer gains counts, derived through counted_answer over the read's Docs::at(image, as_of); the stored outcome name stays the write-time record. DeskOutcome::Refused carries the retraction target as sent; the record's choice is a Short kept as sent (a choice_invalid choice is no label), and an illegal retraction form keeps its choice and note. body_sha256 form unchanged. Schemas regenerated. Co-Authored-By: Claude Sonnet 5.5 --- crates/eureka-pipeline/src/lib.rs | 17 +- .../eureka-state/src/bin/huginn/admit_hold.rs | 2 +- crates/huginn-mind/src/desk.rs | 166 +++++++++++++----- crates/huginn-mind/src/oracle.rs | 4 +- crates/huginn-mind/src/query.rs | 28 +-- ...iphany.pipeline.desk_answer.v2.schema.json | 20 ++- .../huginn.mind_request.v1.schema.json | 15 +- .../huginn.mind_response.v1.schema.json | 21 ++- 8 files changed, 201 insertions(+), 72 deletions(-) diff --git a/crates/eureka-pipeline/src/lib.rs b/crates/eureka-pipeline/src/lib.rs index 072bc37..8297c3e 100644 --- a/crates/eureka-pipeline/src/lib.rs +++ b/crates/eureka-pipeline/src/lib.rs @@ -879,9 +879,12 @@ value_types! { /// request it came with: the pair that makes a retry the same answer, never a new /// one; the key is `(answerer, request_id)`. A record holds no card: a replayed /// `stale_fork` is shown the current card. `sequence` is per question and is the - /// last part of the key (the answer id). + /// last part of the key (the answer id). `choice`, `note` and (for a retraction) the + /// target are kept as sent whether the request was counted or refused, so a refused + /// `choice_invalid` keeps a choice that is no option label; which answer counts now is + /// derived by the reader, never stored here. pub struct PipelineDeskAnswer { - campaign: Slug, fork: Short, sequence: u32, options_hash: Sha256Hex, choice: Option