diff --git a/crates/huginn-mind/tests/desk_feed_fixtures.rs b/crates/huginn-mind/tests/desk_feed_fixtures.rs index 9c6b64a..fc74f4f 100644 --- a/crates/huginn-mind/tests/desk_feed_fixtures.rs +++ b/crates/huginn-mind/tests/desk_feed_fixtures.rs @@ -21,6 +21,11 @@ use huginn_mind::envelope::{OperationFailure, encode_desk_failure, encode_desk_r use huginn_mind::eureka_pipeline::{DeskAuthority, Short, Slug}; const RUNTIME: &str = "huginn-eureka"; +/// Account ids as Bifrost sends them: `UserAccount.Id` rendered lowercase D-format +/// (`DeskEndpoints.cs` `accountId.Value.ToString("D")`; `StartupConfigurationValidator` refuses any +/// other decider). Synthetic values. +const READER: &str = "5f0c2b1e-8a4d-4c3b-9e7f-1a2b3c4d5e6f"; +const OTHER_DECIDER: &str = "0b9d7e3a-6c21-4f58-a0d4-9e8f7a6b5c4d"; /// A question Eureka's mind holds (asked 2026-11-11). The answers, notes and hash in `record()` are /// synthetic: the hash is CultLib's sample digest, not this question's. const FORK: &str = "eureka-substrate:question:desk-listing-authority"; @@ -32,8 +37,8 @@ fn s(text: &str) -> Short { fn forks(status: Option, cursor: Option, limit: u8) -> DeskRequest { DeskRequest::Forks { mind: Slug("eureka".into()), - subject: s("7"), - deciders: vec![s("7"), s("12")], + subject: s(READER), + deciders: vec![s(READER), s(OTHER_DECIDER)], status, cursor: cursor.and_then(ForkCursor::new), limit: ForkLimit::new(limit).unwrap(), @@ -41,7 +46,7 @@ fn forks(status: Option, cursor: Option, limit: u8) -> DeskRequ } fn read() -> DeskRequest { - DeskRequest::Fork { mind: Slug("eureka".into()), subject: s("7"), deciders: vec![s("7"), s("12")], fork_id: FORK.into() } + DeskRequest::Fork { mind: Slug("eureka".into()), subject: s(READER), deciders: vec![s(READER), s(OTHER_DECIDER)], fork_id: FORK.into() } } fn list(open_count: u64, recorded_count: u64) -> DeskResponse { @@ -93,8 +98,8 @@ fn record() -> ForkRecord { options_hash: "7d95fc87d532420611fe415c1def27a3447617bb68235f46e3af130aea361c48".into(), counted_answer_id: Some("n1".into()), answers: vec![ - answer("n1", "Counted", None, "7", "The asker lists her own forks.", "2026-11-11T17:00:00Z"), - answer("n2", "Revision", Some("n1"), "12", "Agreed.", "2026-11-11T17:05:00Z"), + answer("n1", "Counted", None, READER, "The asker lists her own forks.", "2026-11-11T17:00:00Z"), + answer("n2", "Revision", Some("n1"), OTHER_DECIDER, "Agreed.", "2026-11-11T17:05:00Z"), ], } } @@ -190,3 +195,32 @@ fn desk_feed_fixtures_are_what_the_encoders_write() { } } } + +/// The one grammar for `subject`, every `deciders` entry and every `answerer`: a lowercase +/// D-format UUID (8-4-4-4-12 lowercase hex), the grammar Huginn already names for `RequestId` +/// (`eureka-pipeline` `uuid_text`). A Matrix id, an email or a handle never fits it. +fn account_id(text: &str) -> bool { + text.len() == 36 + && text.bytes().enumerate().all(|(at, byte)| match at { + 8 | 13 | 18 | 23 => byte == b'-', + _ => matches!(byte, b'0'..=b'9' | b'a'..=b'f'), + }) +} + +/// Every account id the fixtures carry is a Bifrost account id, never a Matrix id, email or +/// handle. The door does not refuse other shapes yet (`Short`, any 200 bytes); that refusal is owed +/// by `cut-desk-feed-listing.r4`, and this pins the grammar it must enforce. +#[test] +fn every_account_id_in_the_fixtures_is_a_lowercase_d_format_uuid() { + for request in [forks(Some(ListStatus::Open), None, 50), read()] { + let subject = match &request { + DeskRequest::Forks { subject, .. } | DeskRequest::Fork { subject, .. } | DeskRequest::Answer { subject, .. } => subject, + }; + assert!(account_id(&subject.0), "subject"); + assert!(request.deciders().iter().all(|decider| account_id(&decider.0)), "deciders"); + } + assert!(record().answers.iter().all(|answer| account_id(&answer.answerer)), "answerer"); + for shape in ["@heimdall:gamecult.org", "meta@gamecult.org", "heimdall", "7", "5F0C2B1E-8A4D-4C3B-9E7F-1A2B3C4D5E6F", "{5f0c2b1e-8a4d-4c3b-9e7f-1a2b3c4d5e6f}", ""] { + assert!(!account_id(shape), "{shape} is not an account id"); + } +} diff --git a/crates/huginn-mind/tests/fixtures/desk-feed/list-counts.request.frame.bin b/crates/huginn-mind/tests/fixtures/desk-feed/list-counts.request.frame.bin index b5c855d..87fae5a 100644 Binary files a/crates/huginn-mind/tests/fixtures/desk-feed/list-counts.request.frame.bin and b/crates/huginn-mind/tests/fixtures/desk-feed/list-counts.request.frame.bin differ diff --git a/crates/huginn-mind/tests/fixtures/desk-feed/list-counts.request.frame.hex b/crates/huginn-mind/tests/fixtures/desk-feed/list-counts.request.frame.hex index d0554ad..f11745c 100644 --- a/crates/huginn-mind/tests/fixtures/desk-feed/list-counts.request.frame.hex +++ b/crates/huginn-mind/tests/fixtures/desk-feed/list-counts.request.frame.hex @@ -1 +1 @@ -0000011287a96d6573736167654964a36d2d33a96f7065726174696f6ea5666f726b73a77061796c6f6164d9606761564762334a726334616b62576c755a4b5a6c64584a6c6132476e63335669616d566a644b45337147526c59326c6b5a584a7a6b7145336f6a4579706e4e30595852316336527663475675706d4e31636e4e766373436c62476c7461585141af7061796c6f6164456e636f64696e67b26d6573736167657061636b2d626173653634ad7061796c6f6164536368656d61b6687567696e6e2e6465736b5f726571756573742e7631ad736368656d6156657273696f6ebc63756c746e65742e6f7065726174696f6e5f726571756573742e7630a9736572766963654964ab687567696e6e2e6465736b +000001a287a96d6573736167654964a36d2d33a96f7065726174696f6ea5666f726b73a77061796c6f6164d9f06761564762334a726334616b62576c755a4b5a6c64584a6c6132476e63335669616d566a644e6b6b4e575977597a4a694d5755744f4745305a433030597a4e694c546c6c4e3259744d574579596a4e6a4e4751315a545a6d7147526c59326c6b5a584a7a6b746b6b4e575977597a4a694d5755744f4745305a433030597a4e694c546c6c4e3259744d574579596a4e6a4e4751315a545a6d32535177596a6c6b4e32557a59533032597a49784c54526d4e5467745954426b4e4330355a54686d4e324532596a566a4e47536d633352686448567a704739775a57366d5933567963323979774b5673615731706441413daf7061796c6f6164456e636f64696e67b26d6573736167657061636b2d626173653634ad7061796c6f6164536368656d61b6687567696e6e2e6465736b5f726571756573742e7631ad736368656d6156657273696f6ebc63756c746e65742e6f7065726174696f6e5f726571756573742e7630a9736572766963654964ab687567696e6e2e6465736b diff --git a/crates/huginn-mind/tests/fixtures/desk-feed/list-counts.request.payload.hex b/crates/huginn-mind/tests/fixtures/desk-feed/list-counts.request.payload.hex index 60cb15a..804b47e 100644 --- a/crates/huginn-mind/tests/fixtures/desk-feed/list-counts.request.payload.hex +++ b/crates/huginn-mind/tests/fixtures/desk-feed/list-counts.request.payload.hex @@ -1 +1 @@ -81a5466f726b7386a46d696e64a6657572656b61a77375626a656374a137a8646563696465727392a137a23132a6737461747573a46f70656ea6637572736f72c0a56c696d697400 +81a5466f726b7386a46d696e64a6657572656b61a77375626a656374d92435663063326231652d386134642d346333622d396537662d316132623363346435653666a8646563696465727392d92435663063326231652d386134642d346333622d396537662d316132623363346435653666d92430623964376533612d366332312d346635382d613064342d396538663761366235633464a6737461747573a46f70656ea6637572736f72c0a56c696d697400 diff --git a/crates/huginn-mind/tests/fixtures/desk-feed/list-counts.request.payload.msgpack b/crates/huginn-mind/tests/fixtures/desk-feed/list-counts.request.payload.msgpack index 931ad8d..d79df5f 100644 Binary files a/crates/huginn-mind/tests/fixtures/desk-feed/list-counts.request.payload.msgpack and b/crates/huginn-mind/tests/fixtures/desk-feed/list-counts.request.payload.msgpack differ diff --git a/crates/huginn-mind/tests/fixtures/desk-feed/list-open-cursor.request.frame.bin b/crates/huginn-mind/tests/fixtures/desk-feed/list-open-cursor.request.frame.bin index 55963c3..f2479d5 100644 Binary files a/crates/huginn-mind/tests/fixtures/desk-feed/list-open-cursor.request.frame.bin and b/crates/huginn-mind/tests/fixtures/desk-feed/list-open-cursor.request.frame.bin differ diff --git a/crates/huginn-mind/tests/fixtures/desk-feed/list-open-cursor.request.frame.hex b/crates/huginn-mind/tests/fixtures/desk-feed/list-open-cursor.request.frame.hex index 74bfc3c..466d859 100644 --- a/crates/huginn-mind/tests/fixtures/desk-feed/list-open-cursor.request.frame.hex +++ b/crates/huginn-mind/tests/fixtures/desk-feed/list-open-cursor.request.frame.hex @@ -1 +1 @@ -0000011687a96d6573736167654964a36d2d32a96f7065726174696f6ea5666f726b73a77061796c6f6164d9646761564762334a726334616b62576c755a4b5a6c64584a6c6132476e63335669616d566a644b45337147526c59326c6b5a584a7a6b7145336f6a4579706e4e30595852316336527663475675706d4e31636e4e7663714e6a4e444b6c62476c7461585179af7061796c6f6164456e636f64696e67b26d6573736167657061636b2d626173653634ad7061796c6f6164536368656d61b6687567696e6e2e6465736b5f726571756573742e7631ad736368656d6156657273696f6ebc63756c746e65742e6f7065726174696f6e5f726571756573742e7630a9736572766963654964ab687567696e6e2e6465736b +000001a687a96d6573736167654964a36d2d32a96f7065726174696f6ea5666f726b73a77061796c6f6164d9f46761564762334a726334616b62576c755a4b5a6c64584a6c6132476e63335669616d566a644e6b6b4e575977597a4a694d5755744f4745305a433030597a4e694c546c6c4e3259744d574579596a4e6a4e4751315a545a6d7147526c59326c6b5a584a7a6b746b6b4e575977597a4a694d5755744f4745305a433030597a4e694c546c6c4e3259744d574579596a4e6a4e4751315a545a6d32535177596a6c6b4e32557a59533032597a49784c54526d4e5467745954426b4e4330355a54686d4e324532596a566a4e47536d633352686448567a704739775a57366d59335679633239796f324d304d715673615731706444493daf7061796c6f6164456e636f64696e67b26d6573736167657061636b2d626173653634ad7061796c6f6164536368656d61b6687567696e6e2e6465736b5f726571756573742e7631ad736368656d6156657273696f6ebc63756c746e65742e6f7065726174696f6e5f726571756573742e7630a9736572766963654964ab687567696e6e2e6465736b diff --git a/crates/huginn-mind/tests/fixtures/desk-feed/list-open-cursor.request.payload.hex b/crates/huginn-mind/tests/fixtures/desk-feed/list-open-cursor.request.payload.hex index cd0c5b0..4004719 100644 --- a/crates/huginn-mind/tests/fixtures/desk-feed/list-open-cursor.request.payload.hex +++ b/crates/huginn-mind/tests/fixtures/desk-feed/list-open-cursor.request.payload.hex @@ -1 +1 @@ -81a5466f726b7386a46d696e64a6657572656b61a77375626a656374a137a8646563696465727392a137a23132a6737461747573a46f70656ea6637572736f72a3633432a56c696d697432 +81a5466f726b7386a46d696e64a6657572656b61a77375626a656374d92435663063326231652d386134642d346333622d396537662d316132623363346435653666a8646563696465727392d92435663063326231652d386134642d346333622d396537662d316132623363346435653666d92430623964376533612d366332312d346635382d613064342d396538663761366235633464a6737461747573a46f70656ea6637572736f72a3633432a56c696d697432 diff --git a/crates/huginn-mind/tests/fixtures/desk-feed/list-open-cursor.request.payload.msgpack b/crates/huginn-mind/tests/fixtures/desk-feed/list-open-cursor.request.payload.msgpack index d9b0991..c0349ca 100644 --- a/crates/huginn-mind/tests/fixtures/desk-feed/list-open-cursor.request.payload.msgpack +++ b/crates/huginn-mind/tests/fixtures/desk-feed/list-open-cursor.request.payload.msgpack @@ -1 +1 @@ -�¥Forks†¤mind¦eureka§subject¡7¨deciders’¡7¢12¦status¤open¦cursor£c42¥limit2 \ No newline at end of file +�¥Forks†¤mind¦eureka§subjectÙ$5f0c2b1e-8a4d-4c3b-9e7f-1a2b3c4d5e6f¨deciders’Ù$5f0c2b1e-8a4d-4c3b-9e7f-1a2b3c4d5e6fÙ$0b9d7e3a-6c21-4f58-a0d4-9e8f7a6b5c4d¦status¤open¦cursor£c42¥limit2 \ No newline at end of file diff --git a/crates/huginn-mind/tests/fixtures/desk-feed/list-open.request.frame.bin b/crates/huginn-mind/tests/fixtures/desk-feed/list-open.request.frame.bin index 0da51f3..8ea0611 100644 Binary files a/crates/huginn-mind/tests/fixtures/desk-feed/list-open.request.frame.bin and b/crates/huginn-mind/tests/fixtures/desk-feed/list-open.request.frame.bin differ diff --git a/crates/huginn-mind/tests/fixtures/desk-feed/list-open.request.frame.hex b/crates/huginn-mind/tests/fixtures/desk-feed/list-open.request.frame.hex index 304b63b..c351ca8 100644 --- a/crates/huginn-mind/tests/fixtures/desk-feed/list-open.request.frame.hex +++ b/crates/huginn-mind/tests/fixtures/desk-feed/list-open.request.frame.hex @@ -1 +1 @@ -0000011287a96d6573736167654964a36d2d31a96f7065726174696f6ea5666f726b73a77061796c6f6164d9606761564762334a726334616b62576c755a4b5a6c64584a6c6132476e63335669616d566a644b45337147526c59326c6b5a584a7a6b7145336f6a4579706e4e30595852316336527663475675706d4e31636e4e766373436c62476c7461585179af7061796c6f6164456e636f64696e67b26d6573736167657061636b2d626173653634ad7061796c6f6164536368656d61b6687567696e6e2e6465736b5f726571756573742e7631ad736368656d6156657273696f6ebc63756c746e65742e6f7065726174696f6e5f726571756573742e7630a9736572766963654964ab687567696e6e2e6465736b +000001a287a96d6573736167654964a36d2d31a96f7065726174696f6ea5666f726b73a77061796c6f6164d9f06761564762334a726334616b62576c755a4b5a6c64584a6c6132476e63335669616d566a644e6b6b4e575977597a4a694d5755744f4745305a433030597a4e694c546c6c4e3259744d574579596a4e6a4e4751315a545a6d7147526c59326c6b5a584a7a6b746b6b4e575977597a4a694d5755744f4745305a433030597a4e694c546c6c4e3259744d574579596a4e6a4e4751315a545a6d32535177596a6c6b4e32557a59533032597a49784c54526d4e5467745954426b4e4330355a54686d4e324532596a566a4e47536d633352686448567a704739775a57366d5933567963323979774b5673615731706444493daf7061796c6f6164456e636f64696e67b26d6573736167657061636b2d626173653634ad7061796c6f6164536368656d61b6687567696e6e2e6465736b5f726571756573742e7631ad736368656d6156657273696f6ebc63756c746e65742e6f7065726174696f6e5f726571756573742e7630a9736572766963654964ab687567696e6e2e6465736b diff --git a/crates/huginn-mind/tests/fixtures/desk-feed/list-open.request.payload.hex b/crates/huginn-mind/tests/fixtures/desk-feed/list-open.request.payload.hex index e8564d6..2006332 100644 --- a/crates/huginn-mind/tests/fixtures/desk-feed/list-open.request.payload.hex +++ b/crates/huginn-mind/tests/fixtures/desk-feed/list-open.request.payload.hex @@ -1 +1 @@ -81a5466f726b7386a46d696e64a6657572656b61a77375626a656374a137a8646563696465727392a137a23132a6737461747573a46f70656ea6637572736f72c0a56c696d697432 +81a5466f726b7386a46d696e64a6657572656b61a77375626a656374d92435663063326231652d386134642d346333622d396537662d316132623363346435653666a8646563696465727392d92435663063326231652d386134642d346333622d396537662d316132623363346435653666d92430623964376533612d366332312d346635382d613064342d396538663761366235633464a6737461747573a46f70656ea6637572736f72c0a56c696d697432 diff --git a/crates/huginn-mind/tests/fixtures/desk-feed/list-open.request.payload.msgpack b/crates/huginn-mind/tests/fixtures/desk-feed/list-open.request.payload.msgpack index 90f32b7..0b18a68 100644 --- a/crates/huginn-mind/tests/fixtures/desk-feed/list-open.request.payload.msgpack +++ b/crates/huginn-mind/tests/fixtures/desk-feed/list-open.request.payload.msgpack @@ -1 +1 @@ -�¥Forks†¤mind¦eureka§subject¡7¨deciders’¡7¢12¦status¤open¦cursorÀ¥limit2 \ No newline at end of file +�¥Forks†¤mind¦eureka§subjectÙ$5f0c2b1e-8a4d-4c3b-9e7f-1a2b3c4d5e6f¨deciders’Ù$5f0c2b1e-8a4d-4c3b-9e7f-1a2b3c4d5e6fÙ$0b9d7e3a-6c21-4f58-a0d4-9e8f7a6b5c4d¦status¤open¦cursorÀ¥limit2 \ No newline at end of file diff --git a/crates/huginn-mind/tests/fixtures/desk-feed/read.request.frame.bin b/crates/huginn-mind/tests/fixtures/desk-feed/read.request.frame.bin index 9b114db..181317a 100644 Binary files a/crates/huginn-mind/tests/fixtures/desk-feed/read.request.frame.bin and b/crates/huginn-mind/tests/fixtures/desk-feed/read.request.frame.bin differ diff --git a/crates/huginn-mind/tests/fixtures/desk-feed/read.request.frame.hex b/crates/huginn-mind/tests/fixtures/desk-feed/read.request.frame.hex index 64c88a6..f581179 100644 --- a/crates/huginn-mind/tests/fixtures/desk-feed/read.request.frame.hex +++ b/crates/huginn-mind/tests/fixtures/desk-feed/read.request.frame.hex @@ -1 +1 @@ -0000013987a96d6573736167654964a36d2d34a96f7065726174696f6ea4666f726ba77061796c6f6164d9886761524762334a72684b52746157356b706d5631636d56725961647a64574a715a574e306f54656f5a47566a6157526c636e4f536f5465694d544b6e5a6d3979613139705a4e6b775a5856795a5774684c584e31596e4e30636d46305a5470786457567a64476c76626a706b5a584e724c57787063335270626d6374595856306147397961585235af7061796c6f6164456e636f64696e67b26d6573736167657061636b2d626173653634ad7061796c6f6164536368656d61b6687567696e6e2e6465736b5f726571756573742e7631ad736368656d6156657273696f6ebc63756c746e65742e6f7065726174696f6e5f726571756573742e7630a9736572766963654964ab687567696e6e2e6465736b +000001ca87a96d6573736167654964a36d2d34a96f7065726174696f6ea4666f726ba77061796c6f6164da01186761524762334a72684b52746157356b706d5631636d56725961647a64574a715a574e30325351315a6a426a4d6d49785a5330345954526b4c54526a4d3249744f5755335a69307859544a694d324d305a44566c4e6d616f5a47566a6157526c636e4f53325351315a6a426a4d6d49785a5330345954526b4c54526a4d3249744f5755335a69307859544a694d324d305a44566c4e6d625a4a4442694f5751335a544e684c545a6a4d6a45744e4759314f4331684d4751304c546c6c4f47593359545a694e574d305a4b646d62334a7258326c6b3254426c64584a6c6132457463335669633352795958526c4f6e46315a584e30615739754f6d526c6332737462476c7a64476c755a7931686458526f62334a7064486b3daf7061796c6f6164456e636f64696e67b26d6573736167657061636b2d626173653634ad7061796c6f6164536368656d61b6687567696e6e2e6465736b5f726571756573742e7631ad736368656d6156657273696f6ebc63756c746e65742e6f7065726174696f6e5f726571756573742e7630a9736572766963654964ab687567696e6e2e6465736b diff --git a/crates/huginn-mind/tests/fixtures/desk-feed/read.request.payload.hex b/crates/huginn-mind/tests/fixtures/desk-feed/read.request.payload.hex index 68e7538..efe17b0 100644 --- a/crates/huginn-mind/tests/fixtures/desk-feed/read.request.payload.hex +++ b/crates/huginn-mind/tests/fixtures/desk-feed/read.request.payload.hex @@ -1 +1 @@ -81a4466f726b84a46d696e64a6657572656b61a77375626a656374a137a8646563696465727392a137a23132a7666f726b5f6964d930657572656b612d7375627374726174653a7175657374696f6e3a6465736b2d6c697374696e672d617574686f72697479 +81a4466f726b84a46d696e64a6657572656b61a77375626a656374d92435663063326231652d386134642d346333622d396537662d316132623363346435653666a8646563696465727392d92435663063326231652d386134642d346333622d396537662d316132623363346435653666d92430623964376533612d366332312d346635382d613064342d396538663761366235633464a7666f726b5f6964d930657572656b612d7375627374726174653a7175657374696f6e3a6465736b2d6c697374696e672d617574686f72697479 diff --git a/crates/huginn-mind/tests/fixtures/desk-feed/read.request.payload.msgpack b/crates/huginn-mind/tests/fixtures/desk-feed/read.request.payload.msgpack index bda8f77..27941b5 100644 --- a/crates/huginn-mind/tests/fixtures/desk-feed/read.request.payload.msgpack +++ b/crates/huginn-mind/tests/fixtures/desk-feed/read.request.payload.msgpack @@ -1 +1 @@ -�¤Fork„¤mind¦eureka§subject¡7¨deciders’¡7¢12§fork_idÙ0eureka-substrate:question:desk-listing-authority \ No newline at end of file +�¤Fork„¤mind¦eureka§subjectÙ$5f0c2b1e-8a4d-4c3b-9e7f-1a2b3c4d5e6f¨deciders’Ù$5f0c2b1e-8a4d-4c3b-9e7f-1a2b3c4d5e6fÙ$0b9d7e3a-6c21-4f58-a0d4-9e8f7a6b5c4d§fork_idÙ0eureka-substrate:question:desk-listing-authority \ No newline at end of file diff --git a/crates/huginn-mind/tests/fixtures/desk-feed/record-whole.payload.hex b/crates/huginn-mind/tests/fixtures/desk-feed/record-whole.payload.hex index ecf6f3f..aa5f793 100644 --- a/crates/huginn-mind/tests/fixtures/desk-feed/record-whole.payload.hex +++ b/crates/huginn-mind/tests/fixtures/desk-feed/record-whole.payload.hex @@ -1 +1 @@ -85ad736368656d6156657273696f6eb767616d6563756c742e666f726b2e7265636f72642e7630a7666f726b5f6964d930657572656b612d7375627374726174653a7175657374696f6e3a6465736b2d6c697374696e672d617574686f72697479ac6f7074696f6e735f68617368d94037643935666338376435333234323036313166653431356331646566323761333434373631376262363832333566343665336166313330616561333631633438b1636f756e7465645f616e737765725f6964a26e31a7616e737765727392de0010ad736368656d6156657273696f6eb767616d6563756c742e6465736b5f616e737765722e7630a9616e737765725f6964a26e31a7666f726b5f6964d930657572656b612d7375627374726174653a7175657374696f6e3a6465736b2d6c697374696e672d617574686f72697479a76f7574636f6d65a7436f756e746564a26f66c0a87265747261637473c0a4636f6465c0ac6f7074696f6e735f68617368d94037643935666338376435333234323036313166653431356331646566323761333434373631376262363832333566343665336166313330616561333631633438a663686f696365ab61736b696e672d6d696e64a46e6f7465be5468652061736b6572206c6973747320686572206f776e20666f726b732eab616e7377657265645f6174b4323032362d31312d31315431373a30303a30305aab72656365697665645f6174b4323032362d31312d31315431373a30303a30305aaf636c61696d5f696e5f667574757265c2a8616e737765726572a137a9617574686f72697479a64d656d626572aa726571756573745f6964d92430303030303030302d303030302d343030302d383030302d303030303030303030303031de0010ad736368656d6156657273696f6eb767616d6563756c742e6465736b5f616e737765722e7630a9616e737765725f6964a26e32a7666f726b5f6964d930657572656b612d7375627374726174653a7175657374696f6e3a6465736b2d6c697374696e672d617574686f72697479a76f7574636f6d65a85265766973696f6ea26f66a26e31a87265747261637473c0a4636f6465c0ac6f7074696f6e735f68617368d94037643935666338376435333234323036313166653431356331646566323761333434373631376262363832333566343665336166313330616561333631633438a663686f696365ab61736b696e672d6d696e64a46e6f7465a74167726565642eab616e7377657265645f6174b4323032362d31312d31315431373a30353a30305aab72656365697665645f6174b4323032362d31312d31315431373a30353a30305aaf636c61696d5f696e5f667574757265c2a8616e737765726572a23132a9617574686f72697479a64d656d626572aa726571756573745f6964d92430303030303030302d303030302d343030302d383030302d303030303030303030303032 +85ad736368656d6156657273696f6eb767616d6563756c742e666f726b2e7265636f72642e7630a7666f726b5f6964d930657572656b612d7375627374726174653a7175657374696f6e3a6465736b2d6c697374696e672d617574686f72697479ac6f7074696f6e735f68617368d94037643935666338376435333234323036313166653431356331646566323761333434373631376262363832333566343665336166313330616561333631633438b1636f756e7465645f616e737765725f6964a26e31a7616e737765727392de0010ad736368656d6156657273696f6eb767616d6563756c742e6465736b5f616e737765722e7630a9616e737765725f6964a26e31a7666f726b5f6964d930657572656b612d7375627374726174653a7175657374696f6e3a6465736b2d6c697374696e672d617574686f72697479a76f7574636f6d65a7436f756e746564a26f66c0a87265747261637473c0a4636f6465c0ac6f7074696f6e735f68617368d94037643935666338376435333234323036313166653431356331646566323761333434373631376262363832333566343665336166313330616561333631633438a663686f696365ab61736b696e672d6d696e64a46e6f7465be5468652061736b6572206c6973747320686572206f776e20666f726b732eab616e7377657265645f6174b4323032362d31312d31315431373a30303a30305aab72656365697665645f6174b4323032362d31312d31315431373a30303a30305aaf636c61696d5f696e5f667574757265c2a8616e737765726572d92435663063326231652d386134642d346333622d396537662d316132623363346435653666a9617574686f72697479a64d656d626572aa726571756573745f6964d92430303030303030302d303030302d343030302d383030302d303030303030303030303031de0010ad736368656d6156657273696f6eb767616d6563756c742e6465736b5f616e737765722e7630a9616e737765725f6964a26e32a7666f726b5f6964d930657572656b612d7375627374726174653a7175657374696f6e3a6465736b2d6c697374696e672d617574686f72697479a76f7574636f6d65a85265766973696f6ea26f66a26e31a87265747261637473c0a4636f6465c0ac6f7074696f6e735f68617368d94037643935666338376435333234323036313166653431356331646566323761333434373631376262363832333566343665336166313330616561333631633438a663686f696365ab61736b696e672d6d696e64a46e6f7465a74167726565642eab616e7377657265645f6174b4323032362d31312d31315431373a30353a30305aab72656365697665645f6174b4323032362d31312d31315431373a30353a30305aaf636c61696d5f696e5f667574757265c2a8616e737765726572d92430623964376533612d366332312d346635382d613064342d396538663761366235633464a9617574686f72697479a64d656d626572aa726571756573745f6964d92430303030303030302d303030302d343030302d383030302d303030303030303030303032 diff --git a/crates/huginn-mind/tests/fixtures/desk-feed/record-whole.payload.msgpack b/crates/huginn-mind/tests/fixtures/desk-feed/record-whole.payload.msgpack index 2405433..1c8b4ed 100644 Binary files a/crates/huginn-mind/tests/fixtures/desk-feed/record-whole.payload.msgpack and b/crates/huginn-mind/tests/fixtures/desk-feed/record-whole.payload.msgpack differ diff --git a/docs/desk-feed-door.md b/docs/desk-feed-door.md index 8f233ec..9be005c 100644 --- a/docs/desk-feed-door.md +++ b/docs/desk-feed-door.md @@ -94,6 +94,22 @@ Request (`huginn.desk_request.v1`): Huginn keeps no copy. `subject` is the verified Bifrost account id of the reader. The reads carry no `authority`, and a payload that names it is refused whole. +**Account ids.** `subject`, every `deciders` entry and every stored `answerer` are Bifrost account ids: +`UserAccount.Id` in lowercase D-format, 8-4-4-4-12 lowercase hex (Bifrost renders it in +`DeskEndpoints.cs` with `accountId.Value.ToString("D")`, and `StartupConfigurationValidator.cs` +refuses any decider not in that form). That is the same grammar Huginn names for `RequestId` +(`uuid_text`). These ids are opaque random UUIDs. A Matrix id, an email, a display name or any other +handle is never one of them. Bifrost enforces the grammar; Huginn's door does not yet: it reads these +fields as `Short` (any text up to 200 bytes) and would accept `@x:server` or an email. A subject +is stored as `answerer` on an answer, so a wrong value would enter the mind. Refusing every other +shape at decode is owed by `cut-desk-feed-listing.r4`. The test +`every_account_id_in_the_fixtures_is_a_lowercase_d_format_uuid` pins the grammar. The fixtures use +synthetic UUIDs. + +`card.deciders` echoes the call's decider list on every card to every reader. Bifrost masks +`answerer` for a reader who is not a decider (X3), but it must also mask `card.deciders`, or the +same account ids reach that reader through the card. + Response (`huginn.desk_response.v1`): | variant | meaning | Bifrost answers |