mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-10-25 02:26:12 +02:00
Make warm deliverable size and digest arguments explicit
Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
1 parent
ad8d4581b9
commit
f722491089
2 files changed
+3
-1
No files matched your search
@@ -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:<computed byte size>");
|
||||
expect(native).toContain('sha256:"<computed SHA-256>"');
|
||||
expect(native).toContain("deliverable:<attachmentId>");
|
||||
expect(native).not.toContain("PATCH /api/issues");
|
||||
expect(native).not.toContain("In a legacy runner,");
|
||||
|
||||
@@ -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:<attachmentId>. 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:<attachmentId>"]}],remainingWork:[]},evidence:[{ref:"deliverable:<attachmentId>"}],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:<computed byte size>,sha256:"<computed SHA-256>",contentRef:"${file}",title:"${marker}", and idempotencyKey:"warm-deliverable-T${turn}-${nonce}". Use the returned attachment ID as deliverable:<attachmentId>. 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:<attachmentId>"]}],remainingWork:[]},evidence:[{ref:"deliverable:<attachmentId>"}],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.`,
|
||||
|
||||
Reference in new issue
Block a user