MCPcopy Create free account
hub / github.com/AI45Lab/Code / snapshot_reports_remaining

Function snapshot_reports_remaining

core/src/orchestration/workflow_budget.rs:191–198  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

189
190 #[tokio::test]
191 async fn snapshot_reports_remaining() {
192 let budget = WorkflowBudget::new(Some(100));
193 budget.record_after_llm("a", &usage(30)).await;
194 let snap = budget.snapshot();
195 assert_eq!(snap.consumed_tokens, 30);
196 assert_eq!(snap.remaining_tokens(), Some(70));
197 assert!(!snap.is_exhausted());
198 }
199
200 #[tokio::test]
201 async fn delegates_to_inner_guard() {

Callers

nothing calls this directly

Calls 3

usageFunction · 0.70
record_after_llmMethod · 0.45
snapshotMethod · 0.45

Tested by

no test coverage detected