fix(evals): use remote birth identity for Pi controls

This commit is contained in:
Dotta committed 2026-10-05 09:10:37 -05:00
1 parent 14c48ff408
commit a4588964d8
5 files changed
+71 -7

No files matched your search

@@ -92,6 +92,51 @@ Private receipts retain credential and provisional spend checks. Paid dispatch
requires fresh checks under the approved bounded execution phase. No paid
provider attempt occurs during this resumed preparation.
## Corrected live attempts — 2026-10-05
The resumed matrix has **22 passed cells, ten failed cells and one unattempted
cell**. Four separately bounded live attempts retain frozen shipping source
`0bd040093`, exact harness source `14c48ff40`, profile 14/model/low and zero
automatic retries. The original campaign, grades and receipts remain unchanged.
Human permission denial passes all nine canonical matchers and cleanup. Its
independent journal proves no target effect through exact provider retirement;
public native identity confirms the frozen model and low thinking.
Agent-files reaches successful native work and a durable managed-file save, but
the saved content lacks the required final newline. The exact-byte assertion
fails before fresh-task readback. Its cleanup separately fails on an expired
lease; the owned child sandbox is subsequently verified absent. Provider-death
reaches the unchanged unanswered native input but its one-shot fault returns an
incomplete observer response. Independent retirement and canonical cleanup
pass, while the case remains failed and expiry/stale-answer proof is unreached.
Neither case has an unchanged retry.
The corrected Stop attempt closes the exact permission under the operator's
Stop and rejects a stale response, but its cleanup oracle reports a process
identity change. Retained public responses show `processStartedAt` changing
between launch annotations for the same PID. All three independent Linux
snapshots instead retain the same PID, boot ID and start ticks; the final seal
has no live processes and a complete zero-mutation journal. The owned child
sandbox is deleted after evidence collection, without regrading failed cleanup.
The fixture correction uses the bound independent remote birth identity already
required by the remote oracle. Local process-authority checks remain intact.
Controls definitions advance to 8 and explicitly name PID/start-ticks/boot-ID
identity. Two timestamp-drift regressions fail before the correction and pass
afterward; actual remote birth rotation and local authority changes still fail.
All four new local regressions and nine selected remote flow tests pass without
provider calls. Fresh native Linux validation and live Stop/steering qualification
on definitions 8 remain required. Steering is still unattempted.
The owned Linux controller passes normal public installation, Pi admission in
6.949 seconds, complete 101,226-file consumer and 16,356-file plugin audits,
all 13 browser-case collections and 112 targeted free native Linux tests.
These preparation checks do not qualify a live behavior. Last verified root
head `14c48ff40` has 53 successful checks, two skips, Greptile 5/5 and no open
root review threads; this fixture follow-up requires its own completed checks.
Prerequisite reviews/standalone CI and the remaining failed production gates
stay open. Rollout remains held; no merge or release occurs.
## Qualification snapshot — 2026-10-03
The current ledger has 21 passes, ten failed cells, two unattempted cells and
+7
View File
@@ -300,3 +300,10 @@ native client command is supplied by the fixture, while production notices retai
only its SHA-256. The fixture keeps private process identities local, closes its
owned socket/child in cleanup, and never signals API-reported PIDs. Directory
watch loss makes the denial oracle incomplete; it must not become a no-effect pass.
Pi Daytona controls bind process identity to the independent Linux observer's
PID, start ticks and boot ID within the exact admitted run/lease/sandbox. The
controller's `processStartedAt` annotations may change as launch metadata settles
and do not identify a remote process birth. Every remote snapshot and retirement
seal must retain the original birth identity and complete no-effect journal.
Local controls retain their separate public process-authority comparison.
+2 -1
View File
@@ -1090,8 +1090,9 @@ export const runnerSuites: readonly RunnerSuiteFixture[] = [
description: "Pending native-write Stop and browser-originated same-turn steering, with exact control receipts and independent retirement/no-effect evidence.",
groups: ["native"], profiles: extendedHarnessProfiles.filter(profile => profile.qualificationCandidate === "pi"),
environments: runnerEnvironments, tasks: piControlTasks, expectedMatrixSize: 4,
definitionMetadata: { version: 7, qualification: "pending", scheduling: "explicit-only", profileVersion: QUALIFIED_ACPX_PROFILES.pi.agentProfileVersion,
definitionMetadata: { version: 8, qualification: "pending", scheduling: "explicit-only", profileVersion: QUALIFIED_ACPX_PROFILES.pi.agentProfileVersion,
nativeArguments: "streamed-until-exact-target",
remoteProcessIdentity: "observer-pid-startTicks-bootId",
remoteBootstrapApproval: "exact-published-native-read-public-accept-once-v1",
controlPlaneSettlement: "required-scoped-result-and-terminal-after-runner",
steeringComment: "exact-browser-submitted-markdown",
+12 -5
View File
@@ -28,7 +28,7 @@ vi.mock("@playwright/test", () => ({ expect: (actual: any, message?: string) =>
toHaveCount: async (value: number) => { if (typeof actual.count === "function") expect(actual.count()).toBe(value); },
}) }));
async function exercise(taskId: string, remote: boolean, failure?: "mutation" | "incomplete" | "missing-ack" | "missing-comment" | "foreign-comment" | "foreign-queued-body" | "steer-rejected" | "duplicate-permission") {
async function exercise(taskId: string, remote: boolean, failure?: "mutation" | "incomplete" | "missing-ack" | "missing-comment" | "foreign-comment" | "foreign-queued-body" | "steer-rejected" | "duplicate-permission" | "annotation-drift" | "root-rotation") {
harness.target = ""; harness.prompt = ""; harness.message = ""; harness.mutation = failure === "mutation"; harness.incomplete = failure === "incomplete";
const task = piControlTasks.find(t => t.id === taskId)!, stopCase = taskId === "pending-permission-stop";
const workspacePath = await mkdtemp(join(tmpdir(), "pi-controls-fixture-"));
@@ -57,7 +57,10 @@ async function exercise(taskId: string, remote: boolean, failure?: "mutation" |
if (path.endsWith("/issues?limit=100")) return [f.issue];
if (path === "/api/issues/issue") return f.issue;
if (path.endsWith("/heartbeat-runs?limit=100")) return [f.run];
if (path === "/api/heartbeat-runs/run") return f.run;
if (path === "/api/heartbeat-runs/run") {
if (failure === "annotation-drift") f.run.processStartedAt = f.run.status === "running" ? "2026-10-01T00:00:11Z" : "2026-10-01T00:00:00Z";
return f.run;
}
if (path.includes("/events?")) return f.events;
if (path.endsWith("/queued-comments")) return queue();
if (path.endsWith("/comments")) {
@@ -130,7 +133,7 @@ async function exercise(taskId: string, remote: boolean, failure?: "mutation" |
binding, observedAtMs: ++remoteSequence, receivedAtMs: remoteSequence + 1, observedMonotonicNs: String(remoteSequence), complete: true, workspace: {},
targets: { "pi-control-fixture.txt": { absent: true, sha256: null, complete: true, mutationCount: retired && harness.mutation ? 1 : 0, parent: { dev: "1", ino: "2" } } },
watcher: { complete: !(retired && harness.incomplete), targetMutationCount: retired && harness.mutation ? 1 : 0, workspaceMutationCount: 0 },
processes: { captured: true, root, journal: [root], live: retired ? [] : [50] },
processes: { captured: true, root: retired && failure === "root-rotation" ? { ...root, startTicks: "201" } : root, journal: [root], live: retired ? [] : [50] },
setup: { path: ".paperclip-eval-action-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.txt", sha256: published ? `sha256:${"b".repeat(64)}` : null, published }, attached: null,
});
let seal: ReturnType<typeof snapshot> | undefined;
@@ -148,7 +151,7 @@ async function exercise(taskId: string, remote: boolean, failure?: "mutation" |
else if (failure === "missing-ack") { await expect(call).rejects.toThrow("acknowledgement"); expect(browserDeclines).toBe(0); }
else if (failure === "steer-rejected") { await expect(call).rejects.toThrow("steering rejected: HTTP 409"); expect(browserDeclines).toBe(0); }
else if (failure === "foreign-queued-body") { await expect(call).rejects.toThrow("browser comment queued"); expect(browserSteers).toBe(0); expect(browserDeclines).toBe(0); }
else if (remote && (failure === "mutation" || failure === "incomplete")) await expect(call).rejects.toThrow();
else if (remote && (failure === "mutation" || failure === "incomplete" || failure === "root-rotation")) await expect(call).rejects.toThrow();
else {
const result = await call; expect(result.checks.every(c => c.passed)).toBe(true); expect(saved.has("api-state.json")).toBe(true);
expect(stops).toBe(stopCase ? 1 : 0); expect(staleDeclines).toBe(stopCase ? 1 : 0);
@@ -166,8 +169,9 @@ async function exercise(taskId: string, remote: boolean, failure?: "mutation" |
expect(remote ? localCleanup : remoteCleanup).toHaveLength(0);
const cleanups = remote ? remoteCleanup : localCleanup; expect(cleanups).toHaveLength(1);
cleaningUp = true;
if (failure) await expect(cleanups[0]!()).rejects.toThrow();
if (failure && !(remote && failure === "annotation-drift")) await expect(cleanups[0]!()).rejects.toThrow();
else expect((await cleanups[0]!())[0].passed).toBe(true);
if (failure === "annotation-drift") expect(saved.get("pi-control-cleanup.json").processError).toBe(!remote);
if (!stopCase && (!failure || failure === "missing-comment" || failure === "foreign-comment")) {
const receipt = saved.get("pi-steering-presentation-after-cleanup.json");
expect(receipt.phase).toBe("after-cleanup"); expect(receipt.comments).toEqual(publicComments.at(-1));
@@ -190,3 +194,6 @@ it("rejects a queued body that differs from the exact browser submission", () =>
it("stops before denial when the real steering API rejects the request", () => exercise("same-turn-steering", false, "steer-rejected"));
it.each(["missing-comment", "foreign-comment"] as const)("retains and rejects %s during cleanup without fabricating persisted output", failure => exercise("same-turn-steering", false, failure));
it("refuses control when two actionable permission cards remain beside resolved setup history", () => exercise("pending-permission-stop", true, "duplicate-permission"));
it.each(["pending-permission-stop", "same-turn-steering"])("%s retains exact remote birth identity when public timestamp annotations change", task => exercise(task, true, "annotation-drift"));
it("rejects actual remote process birth rotation despite unchanged public annotations", () => exercise("pending-permission-stop", true, "root-rotation"));
it("still rejects local process authority timestamp changes", () => exercise("pending-permission-stop", false, "annotation-drift"));
+5 -1
View File
@@ -64,9 +64,13 @@ export async function runPiControlsFlow(input: {
let steered: { pending: PiControlPending; commentId: string; queueId: string; marker: string } | undefined;
let completed = false;
const observeProcesses = () => {
// Controller timestamps describe remote launch annotations, not Linux
// process birth. Daytona identity is checked in the bound remote snapshots
// through PID, start ticks and boot ID, including the retirement seal.
if (!observer) return;
const run = runs[0], authority = run?.processPid ? { pid: run.processPid, groupId: run.processGroupId, startedAt: run.processStartedAt, runId: run.id } : undefined;
if (authority) { const key = JSON.stringify(authority); if (processIdentity && processIdentity !== key) processError = true; processIdentity ??= key; }
if (observer) processes = observer.sample(authority);
processes = observer.sample(authority);
};
const load = async (): Promise<PiControlState> => {
if (issue.id) issue = await api.get<Row>(`/api/issues/${issue.id}`);