chore: cleanup dumb tests

This commit is contained in:
can1357
2026-08-02 20:38:32 +02:00
parent 212f0b1e00
commit a872d77068
32 changed files with 45 additions and 245 deletions
@@ -1,13 +1,9 @@
import { describe, expect, it } from "bun:test";
import { buildCoordinationAdvisory, composeSpawnAdvisory } from "@oh-my-pi/pi-coding-agent/task";
import type { TaskItem } from "@oh-my-pi/pi-coding-agent/task/types";
import { prompt } from "@oh-my-pi/pi-utils";
import subagentSystemPromptTemplate from "../../src/prompts/system/subagent-system-prompt.md" with { type: "text" };
// Contract: a multi-sibling spawn with spawn capacity and IRC available draws
// a proactive coordinate-via-irc suggestion, and the subagent COOP prompt
// actively tells peers to coordinate before overlapping edits.
// a proactive coordinate-via-irc suggestion.
const item = (): TaskItem => ({ task: "do the thing" });
describe("buildCoordinationAdvisory", () => {
@@ -30,18 +26,6 @@ describe("buildCoordinationAdvisory", () => {
});
});
describe("subagent COOP irc guidance", () => {
it("prompts coordination before overlapping edits when peers are present", () => {
const out = prompt.render(subagentSystemPromptTemplate, {
agent: "Base worker.",
ircPeers: "- `Sib` — task (sub, running)",
ircSelfId: "Self",
});
expect(out).toContain("before you edit");
expect(out).toMatch(/overlapping edits collide/i);
});
});
// Contract: TaskTool.execute composes the specialization nudge with the
// coordination suggestion, gating the latter to the async path (sync siblings
// have already finished). composeSpawnAdvisory is the seam that decision flows
@@ -194,7 +194,6 @@ describe("runSubprocess async quiescence fresh-yield contract", () => {
// Run did not terminate on the parked yield: the barrier noticed, the
// job settled, and the ladder demanded exactly one more prompt.
expect(harness.prompts).toHaveLength(3);
expect(harness.prompts[1]).toContain("yield was recorded");
expect(harness.settleCalls()).toBe(1);
// The parked yield stopped the turn without killing the run.
expect(harness.abortCalls()).toBeGreaterThanOrEqual(1);
@@ -1,23 +0,0 @@
import { describe, expect, it } from "bun:test";
import { prompt } from "@oh-my-pi/pi-utils";
import "../../src/config/prompt-templates";
import subagentSystemPromptTemplate from "../../src/prompts/system/subagent-system-prompt.md" with { type: "text" };
describe("subagent system prompt", () => {
it("revokes native output labels when caller schema overrides the agent", () => {
const out = prompt.render(subagentSystemPromptTemplate, {
agent: 'Use incremental yield with type: ["findings"].',
outputSchemaOverridesAgent: true,
outputSchema: {
properties: {
issue_key: { type: "string" },
verdict: { enum: ["clean", "blockers"] },
},
},
});
expect(out).toContain("Caller schema overrides agent-native output instructions");
expect(out).toContain("Ignore ROLE-provided output/yield labels");
expect(out).toContain("omit `type` and terminal-yield the full `result.data` object");
});
});