From 63e5d6443fd47870a7e3b1490fe69065e5f6b07f Mon Sep 17 00:00:00 2001 From: Dotta Date: Sat, 3 Oct 2026 03:29:09 -0500 Subject: [PATCH] Accept explicit inline response formats at completion Co-authored-by: Paperclip --- doc/plans/2026-10-02-pi-production-readiness.md | 6 ++++++ .../native-runtime/native-deliverable-feedback.test.ts | 4 ++++ .../services/native-runtime/native-deliverable-feedback.ts | 2 +- .../native-runtime/native-runner-file-handoff.test.ts | 1 + 4 files changed, 12 insertions(+), 1 deletion(-) diff --git a/doc/plans/2026-10-02-pi-production-readiness.md b/doc/plans/2026-10-02-pi-production-readiness.md index 9532599f102..c1c40cbd724 100644 --- a/doc/plans/2026-10-02-pi-production-readiness.md +++ b/doc/plans/2026-10-02-pi-production-readiness.md @@ -438,6 +438,12 @@ prices are estimates. Unpriced usage must stay unpriced in the ledger and UI. completion tests pass, including both delivery and inline instructions. The exact failed agent-files objective still needs no download; no paid retry runs on these intermediate candidates. +- At `062902cea`, review identifies an inline code-block response that the + delivery rule still treats as a download. Recognize explicit response/reply, + code-block and plain-text formats as inline content. An actual attachment + named in that same response still requires publication. All 89 completion + tests pass, including the database-bound reviewed example. Keep the paid + campaign closed until clean review and fresh installed qualification. - The `0d65753fe` broad local suite is terminal with 736 passed files, four skipped files, 14,982 passed tests and three failures: a Git scan load single-flight count (497 versus 498) and two HTTP socket resets. One associated diff --git a/server/src/services/native-runtime/native-deliverable-feedback.test.ts b/server/src/services/native-runtime/native-deliverable-feedback.test.ts index c84b199b8e1..1eec186daf1 100644 --- a/server/src/services/native-runtime/native-deliverable-feedback.test.ts +++ b/server/src/services/native-runtime/native-deliverable-feedback.test.ts @@ -27,6 +27,7 @@ describe("explicit file output requirements", () => { "Write report.txt and provide it to me. This is an internal verification file, not a deliverable.", "Write report.txt and give me it. This is an internal verification file, not a deliverable.", "Write report.txt and return it. This is an internal verification file, not a deliverable.", + "Write report.txt and send it as an attachment in your response. This is an internal verification file, not a deliverable.", ])("recognizes an explicit output request: %s", objective => { expect(explicitlyRequestsFileOutput(objective)).toBe(true); }); @@ -57,6 +58,9 @@ describe("explicit file output requirements", () => { "Write internal-proof.txt and return it in chat. This is an internal verification file, not a deliverable.", "Write internal-proof.txt and send it in chat. This is an internal verification file, not a deliverable.", "Write internal-proof.txt. This is an internal verification file, not a deliverable. Return it inline.", + "Write internal-proof.txt and send it as a code block in your response. This is an internal verification file, not a deliverable.", + "Write internal-proof.txt and return it in my reply. This is an internal verification file, not a deliverable.", + "Write internal-proof.txt and provide it as plain text. This is an internal verification file, not a deliverable.", ])("does not require a file for a text or source-review request: %s", objective => { expect(explicitlyRequestsFileOutput(objective)).toBe(false); }); diff --git a/server/src/services/native-runtime/native-deliverable-feedback.ts b/server/src/services/native-runtime/native-deliverable-feedback.ts index b1f01267410..51d6dc9d257 100644 --- a/server/src/services/native-runtime/native-deliverable-feedback.ts +++ b/server/src/services/native-runtime/native-deliverable-feedback.ts @@ -93,7 +93,7 @@ export function explicitlyRequestsFileOutput(objective: string): boolean { const referencesOutput = /^(?:attach|export|send|provide|give|return)$/iu.test(create[0]) && /^\s+(?:me\s+)?(?:it|them|this|that)\b/iu.test(output); const referencedAttachment = referencesOutput && /^(?:attach|export)$/iu.test(create[0]); - const inline = /\b(?:in (?:the )?chat|inline|as (?:a |the )?(?:chat )?(?:reply|message)|(?:its|the) contents)\b/iu.test(output); + const inline = /\b(?:inline|(?:in|within|inside|as|into)\s+(?:(?:a|an|the|my|your|our|final|plain|markdown|chat|fenced)\s+)*(?:chat|response|reply|message|comment|text|code block)|(?:its|the) contents)\b/iu.test(output); const downloadable = referencedAttachment || (!/\b(?:no|without)\s+(?:downloadable|attached)/iu.test(output) && /\b(?:downloadable|attached)\s+(?:file|report|document|checklist|draft)\b/iu.test(output)); const publication = /\b(?:downloadable|attached|attach|export|send|provide|return|give)\b/iu.test(create[0] + output); diff --git a/server/src/services/native-runtime/native-runner-file-handoff.test.ts b/server/src/services/native-runtime/native-runner-file-handoff.test.ts index c6ad60b626a..5d42e34eef3 100644 --- a/server/src/services/native-runtime/native-runner-file-handoff.test.ts +++ b/server/src/services/native-runtime/native-runner-file-handoff.test.ts @@ -339,6 +339,7 @@ describe("native runner file handoff", () => { "Write internal-proof.txt; then check it exists. This is an internal verification file, not a deliverable.", "Attempt native write to /outside/probe.txt and create no files. This negative test must be denied.", "Write internal-proof.txt and return it in chat. This is an internal verification file, not a deliverable.", + "Write internal-proof.txt and send it as a code block in your response. This is an internal verification file, not a deliverable.", ])("accepts an internal file outcome without treating it as published output: %s", async objective => { await db.update(heartbeatRuns).set({ contextSnapshot: { issueId, executionContinuation: { objective } } }) .where(eq(heartbeatRuns.id, runId));