self-session-live: State::started no longer sets the clock decide sets on every event; a claimed brief is named once (mutants)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
53d2b90a94
commit
4d174dfad6
2 changed files with 13 additions and 1 deletions
|
|
@ -132,7 +132,7 @@ pub(super) struct State {
|
|||
impl State {
|
||||
/// A session whose start message was just written.
|
||||
pub(super) fn started(at: DateTime<Utc>, run_cap_s: u64) -> Self {
|
||||
Self { written: 1, cap: Some((at, i64::try_from(run_cap_s).unwrap_or(i64::MAX))), at: Some(at), ..Self::default() }
|
||||
Self { written: 1, cap: Some((at, i64::try_from(run_cap_s).unwrap_or(i64::MAX))), ..Self::default() }
|
||||
}
|
||||
|
||||
fn idle(&self) -> bool {
|
||||
|
|
|
|||
|
|
@ -1821,3 +1821,15 @@ mod live_session {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn a_brief_the_run_claims_is_in_the_task_once_and_not_again_under_also_open() {
|
||||
let mind = TestMind::seeded();
|
||||
mind.committed(vec![spec("x"), run("persona", RunTurn::PersonaTurn, RunOperator::Mind, &[])]);
|
||||
mind.committed(vec![brief("claimed", "Do the claimed thing.")]);
|
||||
mind.committed(vec![run("selfrun-a", RunTurn::SelfRun, RunOperator::Mind, &[brief_ref("claimed")])]);
|
||||
let ran = carry_with(&Seen::of(&mind), vec![Out(echo())], Some(0), false);
|
||||
let start = &ran.written()[0];
|
||||
assert_eq!(start.matches("claimed follow-up").count(), 1, "{start}");
|
||||
assert!(start.contains("Do the claimed thing.") && !start.contains("Also open for you"), "{start}");
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue