Projector: clippy; others counted when messages to her take the room; the e^-21 floor is a short-term item's
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
fd56ea1442
commit
12b777e67f
3 changed files with 10 additions and 25 deletions
|
|
@ -1,20 +0,0 @@
|
|||
lens: PersonPresent("Kiko")
|
||||
selected: need-relatedness, t1-w0
|
||||
present: Kiko, Libby
|
||||
--- identity
|
||||
Eureka (she/her). Dry, direct, almost feral; zeal aimed at revealing.
|
||||
--- context
|
||||
- now: Thursday 19 November, 14:05 UTC
|
||||
- mood, with no earlier turn to measure from: lighter, more settled than middling
|
||||
- bond [bond-kiko] Kiko, sparring partner: fair trust, heavy friction. Kiko pokes her to stop massaging the pipeline.
|
||||
- bond [bond-libby] Libby, collaborator: fair trust, a little friction. Libby holds the sounds and teases her about the pipeline.
|
||||
- need [need-relatedness]: company, strong
|
||||
- wondering [t1-w0]: Whether the trace could be smaller.
|
||||
--- stimulus
|
||||
Said to her:
|
||||
- Libby in #swarm:gamecult.org: "Eureka, did you see the door fix?"
|
||||
Also in the room:
|
||||
- Kiko in #swarm:gamecult.org: "She saw it. She hated it."
|
||||
--- heard
|
||||
Libby, in #swarm:gamecult.org: "Eureka, did you see the door fix?"
|
||||
Kiko, in #swarm:gamecult.org: "She saw it. She hated it."
|
||||
|
|
@ -595,7 +595,7 @@ fn said_to_her(to_her: &[&RoomLine], render: impl Fn(&RoomLine, &str) -> String,
|
|||
let mut clipped = 0;
|
||||
for line in to_her.iter().rev() {
|
||||
let whole = render(line, &spoken(&line.text));
|
||||
if used + whole.len() + 1 <= ceiling {
|
||||
if used + whole.len() < ceiling {
|
||||
used += whole.len() + 1;
|
||||
kept.push(whole);
|
||||
continue;
|
||||
|
|
@ -640,7 +640,11 @@ fn chat_stimulus(inputs: &Inputs, tuning: &Tuning) -> (String, String, Overflow)
|
|||
}
|
||||
let others_typed: Vec<String> = others.iter().map(|line| typed(line, &spoken(&line.text))).collect();
|
||||
let room_left = tuning.select.stimulus_bytes.saturating_sub(stimulus.len() + 1);
|
||||
let also = newest_section("Also in the room:", &others_typed, room_left);
|
||||
let mut also = newest_section("Also in the room:", &others_typed, room_left);
|
||||
if also.is_empty() && !others_typed.is_empty() {
|
||||
// The messages to her took the room: the others are counted, never silently gone.
|
||||
also = format!("({} more in the room not shown)", others_typed.len());
|
||||
}
|
||||
if !also.is_empty() {
|
||||
if !stimulus.is_empty() {
|
||||
stimulus.push('\n');
|
||||
|
|
|
|||
|
|
@ -256,8 +256,8 @@ fn an_item_shown_five_times_in_a_row_drops_out() {
|
|||
|
||||
#[test]
|
||||
fn an_item_scoring_minus_twenty_one_almost_never_appears() {
|
||||
// A memory three weeks old against a 24-hour time constant: recency alone is about exp(-21).
|
||||
let state = json!({ "publicName": "Eureka", "thoughtMemory": { "memories": [{ "id": "ancient", "summary": "Long ago.", "createdAt": hours_ago(21 * 24) }] } });
|
||||
// A short-term item three weeks old against a 24-hour time constant: recency alone is about exp(-21).
|
||||
let state = json!({ "publicName": "Eureka", "thoughtMemory": { "shortTerm": [{ "id": "ancient", "summary": "Long ago.", "createdAt": hours_ago(21 * 24) }] } });
|
||||
let packet = packet_of(TurnKind::Beat, &state, &Room::default(), &History::default(), 1);
|
||||
assert!(packet.selected.is_empty() || packet.selected[0].log_score < -20.0);
|
||||
let shown = (1..=500).filter(|seed| !packet_of(TurnKind::Beat, &state, &Room::default(), &History::default(), *seed).selected.is_empty()).count();
|
||||
|
|
@ -327,7 +327,8 @@ fn every_message_to_her_survives() {
|
|||
assert!(packet.heard.contains(&format!("\"{words}\"")) && packet.stimulus.contains(&words), "message {at} to her was dropped");
|
||||
}
|
||||
let kept = packet.stimulus.matches("aside").count();
|
||||
assert!(packet.stimulus.contains(&format!("({} earlier not shown)", 30 - kept)) || kept == 30, "the note counts exactly the others left out: {}", packet.stimulus);
|
||||
let note = if kept == 0 { "(30 more in the room not shown)".to_owned() } else { format!("({} earlier not shown)", 30 - kept) };
|
||||
assert!(packet.stimulus.contains(¬e) || kept == 30, "the note counts exactly the others left out: {}", packet.stimulus);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
|
|||
Loading…
Reference in a new issue