fix(13-13): assert the seed screen with a real mnemonic, not a stale shape fixture

secret_shaped_content_never_reaches_the_stub was RED because its fixture was
the first twelve wordlist entries — not a parseable mnemonic. The 2026-08-06
precision rewrite of screen_outbound moved from a word-run shape rule to BIP-39
checksum validation (the shape rule had blocked legitimate turns on a live node
twice); egress.rs's own test was updated to a checksum-valid fixture and this
copy was not, so it asserted behaviour that had been deliberately retired.

The named behaviour was intact throughout: screen_outbound runs on the Routstr
paid leg before any body is sent, a real mnemonic is blocked, and
checksum-invalid runs of 20+ wordlist members are still caught by
IMPLAUSIBLE_MEMBER_RUN. Fixture is now a checksum-valid mnemonic, asserted as
parseable so it cannot silently rot the same way again.

Also records the operator's rendering contract in the surfaces todo: chat gets
the mini version, the content/context surfaces expand it, nothing rich may
overflow the bubble at mobile width.
This commit is contained in:
archipelago
2026-08-06 20:16:48 -04:00
parent 36574c0230
commit 3d4d329787
2 changed files with 60 additions and 12 deletions
@@ -1052,8 +1052,22 @@ mod tests {
async fn secret_shaped_content_never_reaches_the_stub() {
let stub = StubRoutstr::start(chat_response_text("ok")).await;
let backend = backend_for(&stub.base_url, 1_000);
let secret_seed =
"abandon ability able about above absent absorb abstract absurd abuse access accident";
// A CHECKSUM-VALID mnemonic — what a real leak looks like, and what
// the screen actually keys on. The earlier fixture was the first
// twelve wordlist entries, which is not a parseable mnemonic: the
// 2026-08-06 precision rewrite of `screen_outbound` moved from a
// shape rule to checksum validation (the shape rule blocked every
// legitimate turn on a live node, twice), `egress.rs`'s own test was
// updated to match, and this copy was not — so it failed here while
// the behaviour it names was intact. Checksum-invalid runs are
// deliberately allowed below `IMPLAUSIBLE_MEMBER_RUN`; see
// `assistant::egress`.
let secret_seed = "abandon abandon abandon abandon abandon abandon \
abandon abandon abandon abandon abandon about";
assert!(
bip39::Mnemonic::parse_normalized(secret_seed).is_ok(),
"the fixture must be a real mnemonic or this test proves nothing"
);
let history = vec![ChatMessage {
role: Role::User,
text: Some(format!("my seed is: {secret_seed}")),