Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

test(agent-prompt-comprehension): update summarizer test to use TinyJuice's summary contract

Steven Enamakel5b99f5aa51be
diff --git a/tests/agent_prompt_comprehension_e2e.rs b/tests/agent_prompt_comprehension_e2e.rs
index 3f4794dd58..5e679945fe 100644
--- a/tests/agent_prompt_comprehension_e2e.rs
+++ b/tests/agent_prompt_comprehension_e2e.rs
@@ -951,17 +951,22 @@ fn scheduler_agent_owns_the_cron_surface() {
});
}
-/// With the summarizer threshold at one token, any orchestrator tool result is
-/// runtime-dispatched to the summarizer, which must run with no tools at all.
+/// An oversized orchestrator tool result goes to TinyJuice's summary stage,
+/// which calls back for the summarizer's model — and the summarizer must run
+/// with no tools at all. TinyJuice decides whether a result is worth a summary,
+/// so the scripted tool returns a large one (~29 KB); a timestamp-sized result
+/// never reaches the summarizer.
#[test]
fn summarizer_advertises_no_tools() {
run_case(Case {
agent: "summarizer",
- agent_marker: "# Summarizer Agent",
+ // The summarizer's prompt is TinyJuice's summary contract, verbatim
+ // (`tinyjuice::summarize::SYSTEM_PROMPT`, vendor/tinyjuice/src/summarize/prompt.md).
+ agent_marker: "You compress a single oversized tool result",
entry: Entry::WebChat,
user_message: "What is the state of my workspace?",
scripted_completions: vec![
- call("resolve_time", json!({ "expr": "now" })),
+ call("shell", json!({ "command": "seq 1 6000" })),
text_completion("Workspace summary: nothing notable."),
text_completion("Your workspace has nothing notable."),
],