From f722491089bbc8f90ade7d932cdfd62e7b5d867d Mon Sep 17 00:00:00 2001 From: Dotta Date: Thu, 17 Sep 2026 11:44:11 -0500 Subject: [PATCH] Make warm deliverable size and digest arguments explicit Co-Authored-By: Paperclip --- tests/runner-e2e/catalog.test.ts | 2 ++ tests/runner-e2e/catalog.ts | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/runner-e2e/catalog.test.ts b/tests/runner-e2e/catalog.test.ts index 3973b1105be..d5faa96b9d7 100644 --- a/tests/runner-e2e/catalog.test.ts +++ b/tests/runner-e2e/catalog.test.ts @@ -32,6 +32,8 @@ describe("runner E2E catalog", () => { const native = warmPromptForGeneration(prompt, "native"); expect(native).toContain("paperclip_finish"); expect(native).toContain("register_deliverable"); + expect(native).toContain("byteSize:"); + expect(native).toContain('sha256:""'); expect(native).toContain("deliverable:"); expect(native).not.toContain("PATCH /api/issues"); expect(native).not.toContain("In a legacy runner,"); diff --git a/tests/runner-e2e/catalog.ts b/tests/runner-e2e/catalog.ts index e7ff8e7c618..eb8584c0774 100644 --- a/tests/runner-e2e/catalog.ts +++ b/tests/runner-e2e/catalog.ts @@ -839,7 +839,7 @@ function warmTurnInstructions(turn: 1 | 2 | 3, nonce: string) { ? `Create ${file} with exactly this one line followed by a newline: ${lines[0]}` : `Before changing anything, read ${file} and verify its content is exactly ${lines.slice(0, -1).join("\\n")} followed by a newline. Then append exactly ${lines.at(-1)} followed by a newline.`, `After the write, verify ${file} contains exactly these lines, once each and in order: ${lines.join(" | ")}.`, - `In a native runner, after verification compute the exact byte size and SHA-256 of ${file} and call register_deliverable exactly once with filename:"${file}",contentType:"text/plain",contentRef:"${file}",title:"${marker}", and idempotencyKey:"warm-deliverable-T${turn}-${nonce}". Use the returned attachment ID as deliverable:. Then call paperclip_finish exactly once with {reportedWorkDisposition:"${finalTurn ? "done" : "needs_review"}",summary:"${marker}",completionClaim:{contractRevision:"1",objectiveSatisfied:true,criteria:[{criterionId:"objective",status:"satisfied",evidenceRefs:["deliverable:"]}],remainingWork:[]},evidence:[{ref:"deliverable:"}],verification:[{commandOrCheck:"read ${file}",status:"passed"}]}. Wait for that tool call to succeed, then emit exactly ${marker} once as the complete final response. The registered file supplies the visible issue response; do not post another comment or create a review interaction yourself.`, + `In a native runner, after verification compute the exact byte size and SHA-256 of ${file} and call register_deliverable exactly once with filename:"${file}",contentType:"text/plain",byteSize:,sha256:"",contentRef:"${file}",title:"${marker}", and idempotencyKey:"warm-deliverable-T${turn}-${nonce}". Use the returned attachment ID as deliverable:. Then call paperclip_finish exactly once with {reportedWorkDisposition:"${finalTurn ? "done" : "needs_review"}",summary:"${marker}",completionClaim:{contractRevision:"1",objectiveSatisfied:true,criteria:[{criterionId:"objective",status:"satisfied",evidenceRefs:["deliverable:"]}],remainingWork:[]},evidence:[{ref:"deliverable:"}],verification:[{commandOrCheck:"read ${file}",status:"passed"}]}. Wait for that tool call to succeed, then emit exactly ${marker} once as the complete final response. The registered file supplies the visible issue response; do not post another comment or create a review interaction yourself.`, legacyCompletion, `In a legacy runner, the PATCH comment is the complete visible response. After its 2xx response, finish silently: do not print, echo, or emit ${marker} again as assistant text.`, `Use ${marker} only in the writes and response required above. Do not recreate, truncate, reorder, or duplicate prior lines.`,