From c57cc985d17a22654f44462acc791044bff1ca39 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sat, 31 Oct 2026 08:51:25 +0100 Subject: [PATCH] mind-body tests: delete the billing and dial helpers the teardown left unused Co-Authored-By: Claude Sonnet 5.5 --- crates/mind-body/src/control/tests.rs | 18 --------------- crates/mind-body/src/self_run/tests.rs | 4 ---- crates/mind-body/src/self_run/tests/lease.rs | 23 -------------------- 3 files changed, 45 deletions(-) diff --git a/crates/mind-body/src/control/tests.rs b/crates/mind-body/src/control/tests.rs index 0f5f37a..eee43a8 100644 --- a/crates/mind-body/src/control/tests.rs +++ b/crates/mind-body/src/control/tests.rs @@ -156,24 +156,6 @@ mod grant { } } -/// The swarm store: `/swarm.cc`, read by `read_envelope`. -mod swarm { - use super::*; - - fn swarm_file(dir: &Path) -> PathBuf { - swarm_path(dir) - } - - fn envelope_at(dir: &Path) -> SwarmEffective { - with_root(dir, read_envelope) - } - - fn slug(name: &str) -> Slug { - Slug(name.into()) - } - -} - /// The swarm store with its brake released, and nothing else in it. fn release_swarm(root: &Path) { SwarmWriter::open(swarm_path(root)).unwrap().set_brake(true, at(0), "op").unwrap(); diff --git a/crates/mind-body/src/self_run/tests.rs b/crates/mind-body/src/self_run/tests.rs index 0afb9bc..08aa222 100644 --- a/crates/mind-body/src/self_run/tests.rs +++ b/crates/mind-body/src/self_run/tests.rs @@ -343,10 +343,6 @@ impl Ran { .collect() } - fn count_all(&self, wanted: &Event) -> usize { - self.all.iter().filter(|event| *event == wanted).count() - } - fn count(&self, wanted: &Event) -> usize { self.events.iter().filter(|event| *event == wanted).count() } diff --git a/crates/mind-body/src/self_run/tests/lease.rs b/crates/mind-body/src/self_run/tests/lease.rs index 3841e46..0fb0888 100644 --- a/crates/mind-body/src/self_run/tests/lease.rs +++ b/crates/mind-body/src/self_run/tests/lease.rs @@ -6,19 +6,6 @@ use eureka_pipeline::ResolutionOutcome; use super::*; -/// A real assistant record with all four counters of its usage set. -fn billed(id: &str, input: u64, read: u64, write: u64, output: u64) -> String { - let mut event: Value = serde_json::from_str(&request(id, input, read, write)).unwrap(); - event["message"]["usage"]["output_tokens"] = json!(output); - event.to_string() -} - -fn subagent_billed(id: &str, input: u64, read: u64, write: u64, output: u64) -> String { - let mut event: Value = serde_json::from_str(&billed(id, input, read, write, output)).unwrap(); - event["parent_tool_use_id"] = json!("toolu_0001"); - event.to_string() -} - fn never_spawns() -> Fake { Fake { child: RefCell::new(None), spawns: RefCell::new(Vec::new()), refuse: false } } @@ -64,16 +51,6 @@ fn a_connector_that_cannot_be_reached_is_an_error_that_starts_nothing_and_closes assert!(matches!(&closure.outcome, ResolutionOutcome::Recorded { reason } if reason.0.contains("the actuator failed")), "{:?}", closure.outcome); } -fn result_stating(models: Value) -> String { - let mut event: Value = serde_json::from_str(&result_line()).unwrap(); - event["modelUsage"] = models; - event.to_string() -} - -fn stated(input: u64, read: u64, write: u64, output: u64) -> Value { - json!({"inputTokens": input, "cacheReadInputTokens": read, "cacheCreationInputTokens": write, "outputTokens": output, "costUSD": 0.5, "contextWindow": 200000}) -} - #[test] fn a_lease_is_asked_for_before_claude_starts_for_the_units_runtime_cap() { let ran = go(vec![Out(result_line())]);