Accept explicit inline response formats at completion

Co-authored-by: Paperclip <noreply@paperclip.ing>
This commit is contained in:
DottaandPaperclip committed 2026-10-03 03:29:09 -05:00
1 parent 062902cea2
commit 63e5d6443f
4 files changed
+12 -1

No files matched your search

@@ -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
@@ -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);
});
@@ -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);
@@ -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));