From dae21f31fdee4e6ef7fd7513d0ada90042d3ef57 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sat, 31 Oct 2026 17:10:32 +0100 Subject: [PATCH] self-session-live tests: a brief's closure is admitted under the run's label Co-Authored-By: Claude Sonnet 5.5 --- crates/mind-body/src/self_run/tests.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/crates/mind-body/src/self_run/tests.rs b/crates/mind-body/src/self_run/tests.rs index e4d49e9..9f672be 100644 --- a/crates/mind-body/src/self_run/tests.rs +++ b/crates/mind-body/src/self_run/tests.rs @@ -1587,6 +1587,15 @@ fn a_brief_told_mid_turn_by_the_hook_is_closed_by_that_turns_result_and_never_to assert!(tells(&ran).is_empty(), "the hook told it; the actuator did not: {:?}", ran.written()); let closures = resolutions_of(&mind, &brief_ref("b2")); assert_eq!((closures.len(), closures[0].rationale.0.as_str()), (1, answer_text().as_str())); + // The closure is admitted under the run's own label. + let sessions: Vec = mind + .ids(K::Resolution) + .iter() + .filter_map(|resolution| mind.view(K::Resolution, resolution)) + .filter(|view| matches!(&view.document, PipelineDocument::Resolution(document) if document.subject == brief_ref("b2"))) + .map(|view| view.admission.provenance.session) + .collect(); + assert_eq!(sessions, vec!["selfrun-a".to_string()]); } #[test]