test: require current task briefs in adapter resume prompts

Update Claude ACP and Hermes assertions to require the brief exactly once on resumed calls.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
Dotta 2026-09-12 17:46:28 -05:00
parent 73105e3f7b
commit ac4ad78a5f
2 changed files with 6 additions and 6 deletions

View File

@ -1196,7 +1196,7 @@ describe("claude_local ACP lane", () => {
});
});
it("delivers the issue description exactly once per prompt and compacts non-assignment resume deltas", async () => {
it("delivers the current issue description exactly once on fresh and resumed prompts", async () => {
const root = await makeTempRoot("paperclip-claude-acp-brief-");
const runtimes: FakeRuntime[] = [];
const execute = createClaudeAcpExecutor({
@ -1264,9 +1264,9 @@ describe("claude_local ACP lane", () => {
}));
expect(second.exitCode).toBe(0);
const resumePrompt = runtimes[1]?.startInputs[0]?.text ?? "";
expect(resumePrompt).not.toContain(description);
expect(resumePrompt.split(description)).toHaveLength(2);
expect(resumePrompt).toContain("Paperclip task context:");
expect(resumePrompt).toContain(
expect(resumePrompt).not.toContain(
"- issue description: omitted from this resume delta; fetch the issue if you need the latest brief",
);
});

View File

@ -208,7 +208,7 @@ describe("execute", () => {
expect(prompt).not.toContain("Create child issues");
});
it("sends the task brief once on fresh runs and compacts it on stable-session resumes", async () => {
it("sends the current task brief once on fresh runs and stable-session resumes", async () => {
const description = "Update launch-card.svg and change the CTA to Try Team free.";
const fullTaskMarkdown = [
"Paperclip task context:",
@ -271,9 +271,9 @@ describe("execute", () => {
expect(runBodies).toHaveLength(2);
// Fresh run: brief exactly once (task markdown only; wake-prompt copy suppressed).
expect(runBodies[0]!.input.split(description)).toHaveLength(2);
// Stable-session resume: compact task markdown, no re-sent brief.
// Stable-session resume: current brief exactly once, with no duplicate wake copy.
expect(runBodies[1]!.input).toContain("Paperclip task context:");
expect(runBodies[1]!.input).not.toContain(description);
expect(runBodies[1]!.input.split(description)).toHaveLength(2);
});
it("routes a bare Hermes dashboard URL on port 9119 through the API prefix", async () => {