Skip to content

Commit c610a15

Browse files
egavrindevagent
andcommitted
refactor(runtime): remove dead prompt test helpers
- Drop deprecated no-op prompt cache testing exports - Remove the stale test that only exercised those helpers Co-Authored-By: devagent <devagent@egavrin>
1 parent e290eb9 commit c610a15

2 files changed

Lines changed: 0 additions & 35 deletions

File tree

packages/runtime/src/engine/agent-prompt.test.ts

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ import { join } from "node:path";
44
import { afterEach, expect, it } from "vitest";
55

66
import {
7-
__getCommonPromptReadCountForTesting,
8-
__resetCommonPromptCacheForTesting,
97
assembleAgentSystemPrompt,
108
clearPromptCache,
119
} from "./agent-prompt.js";
@@ -113,29 +111,6 @@ it("preserves strong delegation rules in the role prompt when provided", () => {
113111
expect(prompt).toContain("Delegation is required when task instructions explicitly require it.");
114112
});
115113

116-
it("caches the shared common prompt across prompt assemblies", () => {
117-
repoRoot = join(tmpdir(), `devagent-agent-prompt-${Date.now()}-cache`);
118-
mkdirSync(repoRoot, { recursive: true });
119-
__resetCommonPromptCacheForTesting();
120-
121-
assembleAgentSystemPrompt({
122-
agentType: AgentType.EXPLORE,
123-
repoRoot,
124-
rolePrompt: "You are an Explore agent.",
125-
availableTools: readonlyTools,
126-
});
127-
assembleAgentSystemPrompt({
128-
agentType: AgentType.REVIEWER,
129-
repoRoot,
130-
rolePrompt: "You are a Reviewer agent.",
131-
availableTools: readonlyTools,
132-
});
133-
134-
// Prompts are now embedded constants — read count is always 0
135-
expect(__getCommonPromptReadCountForTesting()).toBe(0);
136-
__resetCommonPromptCacheForTesting();
137-
});
138-
139114
it("omits delegation guidance when the child does not actually have delegate", () => {
140115
repoRoot = join(tmpdir(), `devagent-agent-prompt-${Date.now()}-general`);
141116
mkdirSync(repoRoot, { recursive: true });

packages/runtime/src/engine/agent-prompt.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -273,16 +273,6 @@ export function loadAgentProjectInstructions(repoRoot: string): string | null {
273273
.join("\n\n");
274274
}
275275

276-
/** @deprecated Prompts are now embedded constants — cache reset is a no-op. */
277-
export function __resetCommonPromptCacheForTesting(): void {
278-
// No-op: prompts are embedded constants, no filesystem cache to reset.
279-
}
280-
281-
/** @deprecated Prompts are now embedded constants — always returns 0. */
282-
export function __getCommonPromptReadCountForTesting(): number {
283-
return 0;
284-
}
285-
286276
/** Format the deferred tools prompt section. Shared by CLI and engine prompt assemblers. */
287277
export function formatDeferredToolsSection(
288278
tools: ReadonlyArray<{ name: string; description: string }>,

0 commit comments

Comments
 (0)