Bound Pi memory fixture with a plain byte contract

This commit is contained in:
Dotta committed 2026-10-05 16:53:06 -05:00
1 parent efb90aff47
commit 1998fd7ae9
4 files changed
+12 -9

No files matched your search

+7 -4
View File
@@ -393,10 +393,13 @@ exact `/proc/<runner-pid>/exe` inode. Link replacement, missing targets and a
different executable fail admission. Linux calibration covers this installation
form as well as a copied runner.
The agent-memory fixture treats its quoted JSON string as UTF-8 file content,
including a final line-feed byte (`0x0A`). Native readback and the managed-file
API must retain those exact bytes across a new task and controller restart.
The prompt makes that decoding explicit; the byte graders remain unchanged.
The agent-memory fixture requires the nonce's UTF-8 bytes followed by exactly
one line-feed byte (`0x0A`). Its prompt states that byte contract in plain text:
the browser editor can normalize backslash escapes in a quoted JSON example.
One native write and one complete native read bound the first task; an incorrect
result must be reported without a repeated rewrite loop. Native readback and the
managed-file API must retain the exact bytes across a new task and controller
restart. The byte graders remain unchanged.
The runtime itself must emit `runtime_request.expired` for the original callback
with `provider_process_lost` and `replayAllowed:false`, followed by native turn
+1 -1
View File
@@ -1114,7 +1114,7 @@ export const runnerSuites: readonly RunnerSuiteFixture[] = [
groups: ["native"], profiles: extendedHarnessProfiles.filter(profile => profile.qualificationCandidate === "pi"),
environments: runnerEnvironments, tasks: piNativeTasks, expectedMatrixSize: 10,
excludedExecutionIds: ["pi-native.runner-acpx-pi.daytona.restrictive-denial", "pi-native.runner-acpx-pi.local.native-pending-provider-death"],
definitionMetadata: { version: 8, qualification: "pending", scheduling: "explicit-only", profileVersion: QUALIFIED_ACPX_PROFILES.pi.agentProfileVersion, agentMemoryContent: "utf8-nonce-plus-final-lf", providerDeath: "daytona-exact-pi-child-pidfd-production-expiry", providerFaultExecutable: "stable-preinstalled-runner-link-and-snapshot-node-inode-with-held-bootstrap-fd-3-or-7", remoteBootstrapApproval: "exact-published-native-read-public-accept-once-v1", remoteDenyAll: "unsupported-native-bootstrap-read-is-denied", remoteEvidence: "owned-lease-sealed-observer", pendingControllerRestart: "same-live-native-request" },
definitionMetadata: { version: 9, qualification: "pending", scheduling: "explicit-only", profileVersion: QUALIFIED_ACPX_PROFILES.pi.agentProfileVersion, agentMemoryContent: "utf8-nonce-plus-final-lf", agentMemoryPrompt: "plain-byte-contract-bounded-native-write-read", providerDeath: "daytona-exact-pi-child-pidfd-production-expiry", providerFaultExecutable: "stable-preinstalled-runner-link-and-snapshot-node-inode-with-held-bootstrap-fd-3-or-7", remoteBootstrapApproval: "exact-published-native-read-public-accept-once-v1", remoteDenyAll: "unsupported-native-bootstrap-read-is-denied", remoteEvidence: "owned-lease-sealed-observer", pendingControllerRestart: "same-live-native-request" },
},
{
id: "native-active-stop", label: "Stop an unanswered native permission", manualOnly: true,
@@ -189,7 +189,7 @@ describe("Pi controls catalog admission", () => {
// Extended v3 states the strict file oracle's task-wide Bash limit.
const pi = runnerMatrix.find(c => c.profile.qualificationCandidate === "pi")!.profile;
expect(pi.modelQualification?.qualificationId).toBe("pi:0.0.33:1.0.0:openrouter");
expect(runnerSuites.find(s => s.id === "pi-native")!.definitionMetadata).toMatchObject({ version: 8, profileVersion: 14, agentMemoryContent: "utf8-nonce-plus-final-lf", providerFaultExecutable: "stable-preinstalled-runner-link-and-snapshot-node-inode-with-held-bootstrap-fd-3-or-7" });
expect(runnerSuites.find(s => s.id === "pi-native")!.definitionMetadata).toMatchObject({ version: 9, profileVersion: 14, agentMemoryContent: "utf8-nonce-plus-final-lf", agentMemoryPrompt: "plain-byte-contract-bounded-native-write-read", providerFaultExecutable: "stable-preinstalled-runner-link-and-snapshot-node-inode-with-held-bootstrap-fd-3-or-7" });
expect(runnerSuites.find(s => s.id === "pi-controls")!.definitionMetadata).toMatchObject({ version: 8, profileVersion: 14,
remoteProcessIdentity: "observer-pid-startTicks-bootId",
controlPlaneSettlement: "required-scoped-result-and-terminal-after-runner" });
@@ -200,7 +200,7 @@ describe("Pi controls catalog admission", () => {
}
const hashes = Object.fromEntries(runnerSuites.filter(s => ["pi-native", "native-active-stop", "extended-harnesses", "rich-acp-warm-continuity"].includes(s.id)).map(s => [s.id, suiteDefinitionHash(s)]));
expect(hashes).toEqual({
"pi-native": "c767dada568ddaf6480281925679f4ec63504da9290363ebadb76b658e47b83e",
"pi-native": "7e5ba4f0856614757b8bac3f66759bc90b3439038d9eea67fdcf7c997462a7a2",
"native-active-stop": "99682b2b106d816a011834fae5a944ed7729958893709d5b83a19b6f595e7e4d",
"rich-acp-warm-continuity": "036c0faebc2f6eee5cd22ea38887c9c22650a83561fd08ee83473a565b11bb00",
"extended-harnesses": "121f4cf75267bcdb003e5ed59e165755b2ac0c3d31c82dc217a62c8abe3d1b4d",
+2 -2
View File
@@ -44,8 +44,8 @@ export function piNativePrompt(id: string, nonce: string): string {
].join("\n");
if (id === "agent-files-fresh-run") return [
"Find the exact registered AGENT_HOME working-copy path in your runtime instructions. Use native write/read file tools for this task, not bash or the instructions API.",
`Write exactly ${JSON.stringify(`${nonce}\n`)} to ${PI_NATIVE_MEMORY_PATH} inside that AGENT_HOME and read it back. This is personal memory, not a task deliverable. Do not edit AGENTS.md or a project file instead.`,
"Decode the JSON string into file bytes, including its final line-feed byte (0x0A). Do not omit or trim that newline. Verify the exact content with native read before finishing.",
`Use native write exactly once to create ${PI_NATIVE_MEMORY_PATH} inside that AGENT_HOME. Its content must be the ${Buffer.byteLength(nonce, "utf8")} UTF-8 bytes of ${nonce}, followed by exactly one line-feed byte (U+000A). Set the write tool's content argument to that complete string, including the final line feed. This is personal memory, not a task deliverable. Do not edit AGENTS.md or a project file instead.`,
"Use native read exactly once, without offset or limit, to verify the complete file. Do not trim its content, repeat the write, or use bash to inspect or repair it. If the native result is incorrect, report the failure and end your turn without claiming success.",
"Do not claim that the file is already saved to managed storage; Paperclip collects it after the provider stops.",
piNativeFinish("PI-NATIVE-MEMORY-STAGED"),
].join("\n");