K21 fix-up 1: a withheld quote claims nothing about where its words came from (Soul at 964ee50)

The placeholder "(words that repeat what she had been sent)" told Eureka her own
posted promise was an echo when Meta quoted it back, and she confessed a false
echo. It is now "(her words, not shown here)" in her pronouns: every quote an
outcome shows is hers, and the guard cannot tell her words repeating someone's
from someone repeating hers. The guard acts only on a shared run of three words;
a quote under three words is never withheld. A withheld promise row keeps its
promise clause, so she can still take it back.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-11-20 17:51:49 +01:00
commit 906ed8b01e
3 changed files with 63 additions and 14 deletions

View file

@ -297,33 +297,48 @@ impl Part {
}
/// The line she is told: what reached the room, then why and what will not happen by itself, her words held to
/// `quote_max` bytes. A quote that repeats any run of words she was sent, on the turn the record is from (`heard`)
/// or this turn (`sent`), is shown as "(words that repeat what she had been sent)" (`repeats`), so no one else's
/// words reach the Projector through her outcome (16.20.4, I16.7).
/// `quote_max` bytes. A quote that repeats a run of words she was sent, on the turn the record is from (`heard`) or
/// this turn (`sent`), is shown as "(her words, not shown here)" (`repeats`, `WITHHELD`), so no one else's words
/// reach the Projector through her outcome (16.20.4, I16.7). The rest of the line is told as it is: a withheld
/// promise is still told as a promise she has no way to keep, which she can add to.
fn line(&self, her: Forms, quote_max: usize, heard: &[String], sent: &[String]) -> String {
let sent: Vec<&str> = heard.iter().chain(sent).map(String::as_str).collect();
let quoted = |text: &str| if repeats(text, &sent) { format!("(words that repeat what {} had been sent)", her.subj) } else { spoken(&clip(text, quote_max)) };
let quoted = |text: &str| if repeats(text, &sent) { withheld(her) } else { spoken(&clip(text, quote_max)) };
format!("- {}{}", self.reached(her, &quoted), self.rest(her, &quoted))
}
}
/// Whether `text` repeats a run of the words in any of `sent`: a word trigram they share, or, for a text under three
/// words, the text's whole run of words. Words as `heard_overlap` reads them, lowercase.
/// What she is shown in place of a quote of hers the guard withholds: that the words are hers, which every quote in an
/// outcome is (a draft, a passage of her thought, a line or an addition of hers, a note), and that they are not shown.
/// It says nothing of where the words came from or why they are not shown: the guard cannot tell her words that repeat
/// someone else's from someone repeating hers back to her (Soul at 964ee50: Meta quoted her "the render tonight" back,
/// and the old "(words that repeat what she had been sent)" told her that her own promise had been an echo, which she
/// then confessed to).
fn withheld(her: Forms) -> String {
format!("({} words, not shown here)", her.poss)
}
/// The shortest run of words the quote guard withholds a quote for sharing.
const REPEAT_RUN: usize = 3;
/// Whether `text` repeats a run of the words in any of `sent`: a run of `REPEAT_RUN` words they share. Words as
/// `heard_overlap` reads them, lowercase. A text shorter than the run shares none: "Hi." is not withheld for "hi
/// everyone", as no short reply is anyone's words rather than common vocabulary.
///
/// Any shared run, not a share of them (Soul's K16 probe leaked a sentinel through a quote whose trigrams were 0.38 the
/// words she was sent): a quote is her words shown back to her through the Projector, which sees no one else's
/// (I16.7), and a share lets a run of someone else's words through inside a quote long enough to dilute it. A trigram
/// is the shortest run that is someone's words rather than common vocabulary; bigrams would withhold nearly every quote
/// ("of the", "I think"). What it gives up: a quote of hers that shares three words in a row with what she was sent is
/// withheld, and she is told it repeated what she was sent instead of its words.
/// ("of the", "I think"). What it gives up: a quote of hers that shares three words in a row with what she was sent,
/// or with what was said to her this turn (her own words quoted back included), is withheld; and someone's words of
/// one or two words reach the Projector inside a short quote of hers.
fn repeats(text: &str, sent: &[&str]) -> bool {
let tokens = |text: &str| -> Vec<String> { text.split(|c: char| !c.is_alphanumeric() && c != '\'').filter(|word| !word.is_empty()).map(str::to_lowercase).collect() };
let mine = tokens(text);
let run = mine.len().min(3);
run > 0
mine.len() >= REPEAT_RUN
&& sent.iter().any(|body| {
let theirs = tokens(body);
mine.windows(run).any(|words| theirs.windows(run).any(|other| other == words))
mine.windows(REPEAT_RUN).any(|words| theirs.windows(REPEAT_RUN).any(|other| other == words))
})
}

View file

@ -267,6 +267,40 @@ fn a_quote_that_is_mostly_words_she_was_sent_this_turn_is_not_shown_to_the_proje
let said = "QUARTZ-HERON-SENTINEL is back at the door.";
let outcome = outcome_of(&record(&format!("<typed>{said}</typed>"), json!({ "say": [{ "draft": 1 }], "gaps": [] }), &[said])).unwrap();
let her = packet().forms;
assert_eq!(outcome.line(0, her, usize::MAX, &["Heimdall, QUARTZ-HERON-SENTINEL is back at the door.".to_owned()]), "- #minds:gamecult.org has, from him: (words that repeat what he had been sent).");
assert_eq!(outcome.line(0, her, usize::MAX, &["Heimdall, QUARTZ-HERON-SENTINEL is back at the door.".to_owned()]), "- #minds:gamecult.org has, from him: (his words, not shown here).");
assert_eq!(outcome.line(0, her, usize::MAX, &["Something else entirely, said today.".to_owned()]), format!("- #minds:gamecult.org has, from him: {}.", spoken(said)), "his own words are shown");
}
/// Soul's oposted case at 964ee50: Meta quoted his own posted promise back to him ("the render! tonight-tonight?"), the
/// guard withheld the quote, and the placeholder told him his own line had repeated what he had been sent, which he
/// then confessed as an echo. The placeholder says the words are his and are not shown, nothing of where they came
/// from; a withheld promise is still told as a promise he can add to; short quotes are never withheld.
#[test]
fn a_withheld_quote_claims_nothing_about_where_its_words_came_from() {
let her = packet().forms;
let posted = |text: &str, heard: &str, promise: bool| {
let gaps = if promise { json!([{ "kind": "missing_affordance", "from": "draft", "draft": 1, "words": text }]) } else { json!([]) };
let record = json!({ "interpreter": { "room": MINDS, "said": [{ "room": MINDS, "text": text }], "refused": [], "gaps": gaps, "heard": [heard] }, "posted": [{ "event": "40", "room": MINDS, "text": text }] });
outcome_of(&record).unwrap()
};
let mine = "Missed you too. I'll send the render tonight.";
let quoted_back = ["ooh, the render! tonight-tonight? I'll stay up for it".to_owned()];
let said = posted(mine, "missed you this week. you doing ok?", false);
assert_eq!(said.line(0, her, usize::MAX, &[]), format!("- #minds:gamecult.org has, from him: {}.", spoken(mine)), "nothing he was sent shares a run of three");
assert_eq!(said.line(0, her, usize::MAX, &quoted_back), "- #minds:gamecult.org has, from him: (his words, not shown here).");
let promised = posted(mine, "missed you this week. you doing ok?", true).line(0, her, usize::MAX, &quoted_back);
assert_eq!(promised, "- #minds:gamecult.org has, from him: (his words, not shown here). It promises something he has no way to do, now or later, and it will not happen by itself. The line stands as he wrote it; he can add to it.", "a withheld promise is still one he can take back");
for line in [said.line(0, her, usize::MAX, &quoted_back), promised] {
for claim in ["repeat", "sent", "echo", "someone"] {
assert!(!line.contains(claim), "{claim}: {line}");
}
}
let line = |text: &str, heard: &str| posted(text, heard, false).line(0, her, usize::MAX, &[]);
assert_eq!(line("I'll send the render tonight.", "can you send the render tonight?"), "- #minds:gamecult.org has, from him: (his words, not shown here).", "a shared run of four");
assert_eq!(line("I think it would, yes.", "I think it would help a lot."), "- #minds:gamecult.org has, from him: (his words, not shown here).", "a shared run of four");
assert_eq!(line("Hi.", "hi everyone"), "- #minds:gamecult.org has, from him: \"Hi.\".", "under three words: never withheld");
assert_eq!(line("Hi everyone.", "hi everyone"), "- #minds:gamecult.org has, from him: \"Hi everyone.\".", "a shared run of two");
assert_eq!(line("Hi everyone, again.", "hi everyone again"), "- #minds:gamecult.org has, from him: (his words, not shown here).", "a shared run of three");
let they = Forms { subj: "they", cap_subj: "They", obj: "them", poss: "their", ..her };
assert_eq!(said.line(0, they, usize::MAX, &quoted_back), "- #minds:gamecult.org has, from them: (their words, not shown here).");
}

View file

@ -2046,7 +2046,7 @@ fn k16_i16_7_holds_over_the_whole_projector_prompt_outcome_included() {
let packet = packet_of(TurnKind::Chat, &state(), &room, &with_last(&record), 1);
let projector = narrate::projector_prompt(&packet, &Tuning::default());
assert!(!projector.contains("QUARTZ-HERON-SENTINEL"), "{projector}");
assert!(projector.contains("- #swarm:gamecult.org has, from her: (words that repeat what she had been sent).") && projector.contains("In her thought: (words that repeat what she had been sent)."), "{projector}");
assert!(projector.contains("- #swarm:gamecult.org has, from her: (her words, not shown here).") && projector.contains("In her thought: (her words, not shown here)."), "{projector}");
}
/// Soul's GANNET probe at 0cfc386: last turn Libby told her a secret, her draft repeating it was refused as an echo, and a
@ -2090,7 +2090,7 @@ fn a_quote_repeating_part_of_what_she_was_sent_is_withheld_from_the_record_turn_
let record = json!({ "interpreter": { "room": "#swarm:gamecult.org", "said": [{ "room": "#swarm:gamecult.org", "text": said }], "refused": [], "gaps": [], "heard": [words] }, "posted": posted });
let elsewhere = Room { messages: vec![message("#swarm:gamecult.org", OPERATOR, "Meta", "Eureka, you there?", 1, true)], here: Some("#swarm:gamecult.org".into()), ..Room::default() };
let projector = narrate::projector_prompt(&packet_of(TurnKind::Chat, &state(), &elsewhere, &with_last(&record), 1), &Tuning::default());
assert!(!projector.contains(S) && projector.contains("has, from her: (words that repeat what she had been sent)."), "{projector}");
assert!(!projector.contains(S) && projector.contains("has, from her: (her words, not shown here)."), "{projector}");
// A record without them, and Libby's words this turn.
let record = json!({ "interpreter": { "room": "#swarm:gamecult.org", "said": [{ "room": "#swarm:gamecult.org", "text": said }], "refused": [], "gaps": [] }, "posted": posted });
let here = Room { messages: vec![libby], here: Some("#swarm:gamecult.org".into()), ..Room::default() };