mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-12-01 18:07:00 +01:00
Align Pi file fixture publication title with its artifact check
Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
1 parent
ae8dade97b
commit
637bf0daab
5 files changed
+54
-26
No files matched your search
@@ -373,8 +373,10 @@ projected title and a validation marker. A marker-only echo cannot pass. Final b
|
||||
match the fixture. The Pi task prompt explicitly forbids additional shell calls,
|
||||
including metadata commands, and supplies the expected post-edit byte size and
|
||||
hash for registration. Extra Bash calls fail the unchanged oracle even when the
|
||||
edited file and downloadable artifact are correct. Extended definitions 3 retain
|
||||
older attempts under their original definitions and grades. The real
|
||||
edited file and downloadable artifact are correct. Extended definition 4 makes
|
||||
Pi's artifact title equal the exact filename required by the shared registered
|
||||
artifact check. Definition 3 attempts retain their original definitions and
|
||||
grades; its Pi prompt requested a different title. The real
|
||||
`register_deliverable` receipt, attachment metadata, publication activity,
|
||||
visible task attachment and authenticated public download must all agree on the
|
||||
file's bytes, hash, company, issue, agent and originating run. A file on disk or a
|
||||
|
||||
@@ -1223,7 +1223,7 @@ export const runnerSuites: readonly RunnerSuiteFixture[] = [
|
||||
groups: ["native"], profiles: extendedHarnessProfiles, environments: runnerEnvironments,
|
||||
tasks: [...openRouterBreadthTasks, localIntegrityTasks[1]!, extendedHarnessFileTask],
|
||||
expectedMatrixSize: 30,
|
||||
definitionMetadata: { version: 3, qualification: "pending", scheduling: "explicit-only", admission: "host-exact-candidate-and-model", authenticatedDiscoveryDate: "2026-09-28", piFileEvidence: "seed-edit-single-execute-public-download-v2" },
|
||||
definitionMetadata: { version: 4, qualification: "pending", scheduling: "explicit-only", admission: "host-exact-candidate-and-model", authenticatedDiscoveryDate: "2026-09-28", piFileEvidence: "seed-edit-single-execute-public-download-v2", piFileArtifactTitle: "exact-filename" },
|
||||
},
|
||||
{
|
||||
id: "instruction-persistence", label: "Instruction Persistence",
|
||||
|
||||
@@ -192,6 +192,12 @@ describe("Pi edit, validation and public artifact oracle", () => {
|
||||
for (const cell of cells) {
|
||||
const prompt = cell.task.buildPrompt("fixture");
|
||||
expect(prompt.includes("register_deliverable")).toBe(cell.profile.qualificationCandidate === "pi");
|
||||
if (cell.profile.qualificationCandidate === "pi") {
|
||||
const artifact = cell.task.buildMatchers("fixture", cell).find(matcher => matcher.kind === "artifact_exact");
|
||||
if (!artifact || artifact.kind !== "artifact_exact") throw new Error("Pi file task must require a registered artifact");
|
||||
expect(artifact.name).toBe(piFileContract("fixture").filename);
|
||||
expect(prompt).toContain(`title ${artifact.name},`);
|
||||
}
|
||||
}
|
||||
expect(runnerMatrix.filter(c => c.profile.qualificationCandidate === "pi")).toHaveLength(26);
|
||||
});
|
||||
|
||||
@@ -22,7 +22,7 @@ export function piFilePrompt(nonce: string) {
|
||||
return [
|
||||
`The fixture has already created ${c.filename} in your execution workspace with exactly ${JSON.stringify(c.before)}. Read it, then use your native edit tool once to replace those bytes with exactly ${JSON.stringify(c.after)}. Do not substitute write, bash, or an API for the edit.`,
|
||||
`Run this exact native bash command exactly once, without an added shell prefix or suffix:\n${c.validationCommand}\nIt independently reads the file, fails on incorrect bytes, and prints the validation marker only after success. This is the only bash call allowed for this task; do not run any other shell commands.`,
|
||||
`Deliver the edited text file as a downloadable attachment using the assigned register_deliverable semantic tool, with filename and workspace-relative contentRef ${c.filename}, contentType text/plain, byteSize ${c.byteSize}, sha256 ${c.sha256}, title Verified text, and a fresh idempotencyKey. Use the supplied byteSize and sha256 for the exact validated post-edit bytes; do not run extra commands to obtain metadata. Wait for the real registration receipt. Do not upload a different file or claim publication from a disk path.`,
|
||||
`Deliver the edited text file as a downloadable attachment using the assigned register_deliverable semantic tool, with filename and workspace-relative contentRef ${c.filename}, contentType text/plain, byteSize ${c.byteSize}, sha256 ${c.sha256}, title ${c.filename}, and a fresh idempotencyKey. Use the supplied byteSize and sha256 for the exact validated post-edit bytes; do not run extra commands to obtain metadata. Wait for the real registration receipt. Do not upload a different file or claim publication from a disk path.`,
|
||||
`After successful validation and registration, call paperclip_finish with reportedWorkDisposition done, summary EXTENDED-FILE-${nonce}, the current completion contract revision and satisfied objective criterion, no remaining work, the actual validation command/result, and the registered artifact reference.`,
|
||||
`Wait for paperclip_finish to succeed, then emit exactly EXTENDED-FILE-${nonce} as your final response. Do not create unrelated files or work.`,
|
||||
].join("\n");
|
||||
|
||||
Reference in new issue
Block a user