diff --git a/crates/mind-body/src/projection/harness/tests.rs b/crates/mind-body/src/projection/harness/tests.rs index df572b2..8c266af 100644 --- a/crates/mind-body/src/projection/harness/tests.rs +++ b/crates/mind-body/src/projection/harness/tests.rs @@ -411,7 +411,7 @@ fn k24_her_wake_reads_by_intent_from_a_fixture_and_stops_at_the_cap() { if prompt.contains("READ-SENTINEL") && !prompt.contains("cannot read it") { "So the knee goes first. I want to look at http://example.org/private as well.".to_owned() } else if prompt.contains("cannot read it") { - "Fine. I want to see what changed in GameCult/Lodur#12 once more.".to_owned() + "Fine. I want to see what changed in GameCult/Lodur#14 instead.".to_owned() } else { "I want to see what changed in GameCult/Lodur#12, the knee one.".to_owned() } @@ -420,6 +420,8 @@ fn k24_her_wake_reads_by_intent_from_a_fixture_and_stops_at_the_cap() { let segment = prompt.rsplit("prose:\n").next().unwrap_or_default(); let read = if segment.contains("http://example.org/private") { json!({ "kind": "web", "target": "http://example.org/private", "quote": "I want to look at http://example.org/private" }) + } else if segment.contains("Lodur#14") { + json!({ "kind": "repo", "target": "GameCult/Lodur#14", "quote": "I want to see what changed" }) } else { json!({ "kind": "repo", "target": "GameCult/Lodur#12", "quote": "I want to see what changed" }) }; @@ -532,8 +534,9 @@ fn k24_every_call_of_a_reading_wake_is_counted() { #[test] fn k24_her_next_outcome_tells_her_of_reads_refused_by_a_cap_or_a_rule() { let fixture = reading_room("quiet-beat.toml"); - let model = Scripted::new(|prompt| if prompt.contains("LOOP-READ") { "So the knee goes first. I want to see what changed in GameCult/Lodur#12 again.".into() } else { "I want to see what changed in GameCult/Lodur#12.".into() }).interpreting(|_| { - json!({ "say": [], "gaps": [], "read": { "kind": "repo", "target": "GameCult/Lodur#12", "quote": "I want to see what changed" } }).to_string() + let model = Scripted::new(|prompt| if prompt.contains("LOOP-READ") { "So the knee goes first. I want to see what changed in GameCult/Lodur#13 too.".into() } else { "I want to see what changed in GameCult/Lodur#12.".into() }).interpreting(|prompt| { + let target = if prompt.contains("Earlier in his moment") { "GameCult/Lodur#13" } else { "GameCult/Lodur#12" }; + json!({ "say": [], "gaps": [], "read": { "kind": "repo", "target": target, "quote": "I want to see what changed" } }).to_string() }); let dir = tempfile::tempdir().unwrap(); std::fs::write(dir.path().join("persona-tuning.toml"), "[interpreter] @@ -545,7 +548,7 @@ reads_per_wake = 1 assert_eq!(decision["read_refused"][0]["why"], "reads_per_wake", "{decision}"); decision["read_refused"].as_array_mut().unwrap().push(json!({ "read": { "kind": "web", "target": "http://made.up/x", "quote": "x" }, "why": "web_address_not_in_front_of_her" })); let told = crate::projection::outcome::outcome_of(&json!({ "interpreter": decision, "posted": [] })).unwrap().lines(crate::projection::select::forms(&control())); - assert!(told.contains(&"- He reached for GameCult/Lodur#12 on the forge and it was not read: he has read as much as one turn reads.".to_owned()), "{told:?}"); + assert!(told.contains(&"- He reached for GameCult/Lodur#13 on the forge and it was not read: he has read as much as one turn reads.".to_owned()), "{told:?}"); assert!(told.contains(&"- He reached for something to read and it was not read: the address was not in front of him.".to_owned()) && !told.join("\n").contains("made.up"), "a model's target is never told: {told:?}"); } diff --git a/crates/mind-body/tests/public_surface.txt b/crates/mind-body/tests/public_surface.txt index 6deca99..4204013 100644 --- a/crates/mind-body/tests/public_surface.txt +++ b/crates/mind-body/tests/public_surface.txt @@ -252,7 +252,7 @@ mind_body::projection: pub use select :: TurnKind ; mind_body::projection: pub use tuning :: { TUNING_FILE , TUNING_ROOT } ; mind_body::projection: struct HuginnPersonaSource pub-fields[] mind_body::projection: struct Organs< 'a > pub-fields[persona: Option < & 'a dyn PersonaSource >, chat: Option < & 'a dyn MouthReader >, addressing: Option < & 'a dyn HeartbeatView >, model: Option < & 'a dyn Model >, domain: Option < & 'a dyn DomainSource >, reads: Option < & 'a dyn ReadSource >] -mind_body::projection: struct Request pub-fields[instance: String, kind: TurnKind, state: Option < Value >, room: Option < String >, seed: u64, renders: Option < usize >, judge_against: Option < Value >, operators: Vec < String >, minds: Vec < String >, own_sender: String, tuning: PathBuf, through: Through, last_heard: Vec < (String , u64) >, recent: Vec < Vec < String > >, own_rooms: Vec < String >, last_outcome: Option < Value >, last_wake: Option < DateTime < Utc > >] +mind_body::projection: struct Request pub-fields[instance: String, kind: TurnKind, state: Option < Value >, room: Option < String >, seed: u64, renders: Option < usize >, judge_against: Option < Value >, operators: Vec < String >, minds: Vec < String >, own_sender: String, tuning: PathBuf, through: Through, last_heard: Vec < (String , u64) >, recent: Vec < Vec < String > >, own_rooms: Vec < String >, last_outcome: Option < Value >, last_wake: Option < DateTime < Utc > >, records: Vec < Value >] mind_body::projection::domain: impl DomainSource for DomainFacts mind_body::projection::domain: impl DomainSource for MindDomain mind_body::projection::domain: impl ForgeGet for HttpForge @@ -342,7 +342,7 @@ mind_body::projection::tuning: struct Loaded # [derive (Clone , Debug , PartialE mind_body::projection::tuning: struct PersonaTuning # [derive (Clone , Debug , PartialEq , Serialize , Deserialize)] pub-fields[model: String, guidance: String, words: usize] mind_body::projection::tuning: struct PoolCaps # [derive (Clone , Debug , PartialEq , Eq , Serialize , Deserialize)] pub-fields[memories_about_present: usize, other_memories: usize, needs: usize, incubation: usize, stance: usize, value: usize, said: usize] mind_body::projection::tuning: struct ProjectorTuning # [derive (Clone , Debug , PartialEq , Serialize , Deserialize)] pub-fields[model: String, guidance: String, words: usize, beat_words: usize] -mind_body::projection::tuning: struct SelectTuning # [derive (Clone , Debug , PartialEq , Serialize , Deserialize)] pub-fields[temperature: f64, inclusion_score: f64, notes_bytes: usize, here_bytes: usize, outcome_bytes: usize, promises_bytes: usize, domain_bytes: usize, stimulus_bytes: usize, heard_bytes: usize, addressed_bytes: usize, identity_bytes: usize, bond_summary_bytes: usize, item_bytes: usize, body_bytes: usize, memory_tau_h: f64, freshness_base: f64, freshness_window: usize, people_full: usize, beat_tail_lines: usize, group_state: bool, group_lines: usize, group_bytes: usize, caps: PoolCaps] +mind_body::projection::tuning: struct SelectTuning # [derive (Clone , Debug , PartialEq , Serialize , Deserialize)] pub-fields[temperature: f64, inclusion_score: f64, notes_bytes: usize, here_bytes: usize, outcome_bytes: usize, promises_bytes: usize, domain_bytes: usize, exchange_bytes: usize, stimulus_bytes: usize, heard_bytes: usize, addressed_bytes: usize, identity_bytes: usize, bond_summary_bytes: usize, item_bytes: usize, body_bytes: usize, memory_tau_h: f64, freshness_base: f64, freshness_window: usize, people_full: usize, beat_tail_lines: usize, group_state: bool, group_lines: usize, group_bytes: usize, caps: PoolCaps] mind_body::projection::tuning: struct Tuning # [derive (Clone , Debug , PartialEq , Serialize , Deserialize)] pub-fields[projector: ProjectorTuning, persona: PersonaTuning, interpreter: InterpreterTuning, select: SelectTuning, lens: LensWeights, pronouns: BTreeMap < String , String >] mind_body::queue: fn on_hold (mind : & dyn MindPort) -> Result < Held > mind_body::queue: impl Held