|
2 | 2 | import { describe, expect, it } from "vitest"; |
3 | 3 | import { buildBootstrapPromptWarning } from "./bootstrap-budget-warning.js"; |
4 | 4 | import { |
5 | | - appendBootstrapPromptWarning, |
6 | 5 | analyzeBootstrapBudget, |
7 | 6 | buildBootstrapBudgetState, |
8 | 7 | buildBootstrapInjectionStats, |
@@ -298,36 +297,6 @@ describe("bootstrap prompt warnings", () => { |
298 | 297 | expect(lines.join("\n")).toContain("10 raw -> 1 injected"); |
299 | 298 | }); |
300 | 299 |
|
301 | | - it("appends warning details to the turn prompt instead of mutating the system prompt", () => { |
302 | | - const prompt = appendBootstrapPromptWarning("Please continue.", [ |
303 | | - "AGENTS.md: 200 raw -> 0 injected", |
304 | | - ]); |
305 | | - expect(prompt.startsWith("Please continue.")).toBe(true); |
306 | | - expect(prompt).toContain("[Bootstrap truncation warning]"); |
307 | | - expect(prompt).toContain("Treat Project Context as partial"); |
308 | | - expect(prompt).toContain("- AGENTS.md: 200 raw -> 0 injected"); |
309 | | - expect(prompt.endsWith("- AGENTS.md: 200 raw -> 0 injected")).toBe(true); |
310 | | - }); |
311 | | - |
312 | | - it("preserves raw prompt whitespace when appending warning details", () => { |
313 | | - const prompt = appendBootstrapPromptWarning(" indented\nkeep tail ", [ |
314 | | - "AGENTS.md: 200 raw -> 0 injected", |
315 | | - ]); |
316 | | - |
317 | | - expect(prompt).toContain(" indented\nkeep tail "); |
318 | | - expect(prompt.indexOf(" indented\nkeep tail ")).toBe(0); |
319 | | - }); |
320 | | - |
321 | | - it("preserves exact heartbeat prompts without warning suffixes", () => { |
322 | | - const heartbeatPrompt = "Follow the scheduled monitor context. If quiet, reply NO_REPLY."; |
323 | | - |
324 | | - expect( |
325 | | - appendBootstrapPromptWarning(heartbeatPrompt, ["AGENTS.md: 200 raw -> 0 injected"], { |
326 | | - preserveExactPrompt: heartbeatPrompt, |
327 | | - }), |
328 | | - ).toBe(heartbeatPrompt); |
329 | | - }); |
330 | | - |
331 | 300 | it("builds a concise agent notice without raw truncation diagnostics", () => { |
332 | 301 | const notice = buildBootstrapPromptWarningNotice([ |
333 | 302 | "AGENTS.md: 200 raw -> 0 injected", |
|
0 commit comments