test(coding-agent): updated test suites and assertions for coding agent
- Updated eager compaction and plan reference tests to track call indices and task delegation markers instead of text strings. - Removed obsolete context message marker checks, vibe mode assertions, and prompt gating test cases. - Simplified prewalk, workflow, and Gemini instruction test expectations across agent modules. - Removed the system prompt personality test suite entirely.
This commit is contained in:
@@ -259,9 +259,8 @@ describe("runSubprocess soft request budget", () => {
|
||||
// wrap-up reminder; the second abort (after the terminal yield) is the
|
||||
// normal post-yield terminate.
|
||||
expect(abortCallsAtReminder).toBe(1);
|
||||
// The wrap-up reminder is the budget-stop variant with a forced tool choice.
|
||||
// The budget stop forces a synthetic terminal yield.
|
||||
expect(handle.prompts).toHaveLength(2);
|
||||
expect(handle.prompts[1]?.text).toMatch(/request budget/);
|
||||
expect(handle.prompts[1]?.options?.synthetic).toBe(true);
|
||||
expect(handle.prompts[1]?.options?.toolChoice).toEqual({ type: "tool", name: "yield" });
|
||||
// The forced yield finalizes as a normal completion, not an abort.
|
||||
|
||||
@@ -234,7 +234,7 @@ describe("runSubprocess yield reminders", () => {
|
||||
expect(systemPrompt).toHaveLength(4);
|
||||
expect(systemPrompt?.[0]).toBe("system");
|
||||
expect(systemPrompt?.[1]).toBe("project");
|
||||
expect(systemPrompt?.[2]).toMatch(/ROLE\n=+\n\ntest/);
|
||||
expect(systemPrompt?.[2]).toContain(baseAgent.systemPrompt);
|
||||
// The parent-conversation CONTEXT section is gone: subagents get their
|
||||
// background inside the assignment (or a local:// file), never a dump.
|
||||
expect(systemPrompt?.[2]).not.toMatch(/CONTEXT\n=+/);
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { afterEach, describe, expect, it, vi } from "bun:test";
|
||||
import { Settings } from "../../src/config/settings";
|
||||
import initAgentPrompt from "../../src/prompts/agents/init.md" with { type: "text" };
|
||||
import * as taskDiscovery from "../../src/task/discovery";
|
||||
import { TaskTool } from "../../src/task/index";
|
||||
import { isScoutSpawnable } from "../../src/task/spawn-policy";
|
||||
@@ -131,10 +130,3 @@ describe("task tool description scout gating", () => {
|
||||
expect(description).toContain("### reviewer");
|
||||
});
|
||||
});
|
||||
|
||||
describe("bundled agent prompt scout gating", () => {
|
||||
it("does not hard-code scout in the init agent prompt", () => {
|
||||
expect(initAgentPrompt.toLowerCase()).not.toContain("scout");
|
||||
expect(initAgentPrompt).toContain("multiple research agents");
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user