From 581b29b58fe9b9c7296ba1ca87150f0ab9a8a0ff Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sat, 28 Nov 2026 04:20:45 +0100 Subject: [PATCH] resolve intake: a failed resolve still holds the interests it read --- crates/thing-core/tests/intake.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/crates/thing-core/tests/intake.rs b/crates/thing-core/tests/intake.rs index 3dca202..f172b5c 100644 --- a/crates/thing-core/tests/intake.rs +++ b/crates/thing-core/tests/intake.rs @@ -244,3 +244,11 @@ fn interests_follow_what_the_held_trees_read() { assert_eq!(rig.interest_calls().last(), Some(&(false, one))); assert_eq!(rig.interest_calls().len(), 4); } + +#[test] +fn a_surface_that_fails_still_holds_the_interests_it_read() { + let mut rig = Rig::new(); + let bad = surface("main", 1, vec![use_of("ghost-use", "ghost"), command_button("go", "undeclared")]); + assert_eq!(codes(&rig.offer(&bad)), vec![Code::UnresolvedUse, Code::UndeclaredCommand]); + assert_eq!(rig.interest_calls(), vec![(true, comp_address("ghost"))]); +}