Desk: the training-notice receipt gates the chat token only; Bifrost no longer masks answerer ids (Huginn's door withholds them), notes stay stripped

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Heimdall 2026-11-11 17:53:33 +00:00
commit 17e46df690
4 changed files with 68 additions and 33 deletions

View file

@ -1,25 +1,14 @@
namespace Bifrost.Web.Features.Desk;
// What a caller who is not a decider of the Mind does not read, taken out at the door and nowhere else. For them
// every note is nil and every answerer is the sentinel; every key stays written (nil where absent, a string where a
// string is required), so the redacted body is still the contract's shape. Cards, outcomes, codes, counts and the
// number of answers are untouched; Huginn returns the full record and Bifrost drops and adds nothing.
//
// The sentinel is one fixed string for every answer: nothing derived from an account id (a hash or a per-reader
// alias would still let a reader link two answers to one person, or confirm a guess), and it is not a D-format
// UUID, so it cannot be mistaken for an account. The contract's `answerer` is a non-empty string and nothing more.
// What a caller who is not a decider of the Mind does not read, taken out at the door and nowhere else: every note is
// nil, with every key still written, so the body is still the contract's shape. Account ids are not Bifrost's to hide:
// Huginn's door withholds the decider ids and answerer ids from a non-decider and returns counts
// (eureka-substrate:ruling:desk-read-visibility-withheld-ids), and Bifrost cannot mask what it cannot read (the card is
// opaque to it). Cards, outcomes, codes, counts and the number of answers are untouched.
public static class DeskRedaction
{
public const string MaskedAnswerer = "masked";
public static ForkEntry ForNonDecider(ForkEntry entry) =>
entry with
{
Record = entry.Record with
{
Answers = [.. entry.Record.Answers.Select(a => a with { Note = null, Answerer = MaskedAnswerer })],
},
};
entry with { Record = entry.Record with { Answers = [.. entry.Record.Answers.Select(a => a with { Note = null })] } };
public static ForkList ForNonDecider(ForkList list) => list with { Forks = [.. list.Forks.Select(ForNonDecider)] };
}