From 2cad239c8c2be77df362b91b064ae085b70e6b08 Mon Sep 17 00:00:00 2001 From: Dotta Date: Sat, 3 Oct 2026 16:37:31 -0500 Subject: [PATCH] Use remote process authority for Cursor Stop proof Keep local PID transition tracking inside the local observer; the remote case retains its sandbox boot and start-tick lifetime proof. 134 fixture tests and fixture typecheck pass. Co-Authored-By: Paperclip --- doc/plans/2026-10-03-cursor-production-readiness.md | 4 ++++ tests/runner-e2e/native-active-stop-flow.ts | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/doc/plans/2026-10-03-cursor-production-readiness.md b/doc/plans/2026-10-03-cursor-production-readiness.md index 6f238a4a91c..94ed1d57ac6 100644 --- a/doc/plans/2026-10-03-cursor-production-readiness.md +++ b/doc/plans/2026-10-03-cursor-production-readiness.md @@ -278,3 +278,7 @@ Review found three recovery gaps. Permission-decline lookup now scopes the query The second local denial repeat passed its behavioral and cleanup assertions but failed a browser assertion because the Blocked status label includes the current blocker count. The assertion now checks the actual Blocked status while allowing that displayed count. This failed attempt retains its original result; the affected repeat remains required. Review-fix verification passed: 538 controller tests and 38 fixture tests, server and fixture typechecks, and production verification of the actual Linux pack. The first controller test invocation hit sandbox denial for its default checkpoint directory; the isolated-home repeat passed. The immutable c45cf9 qualification image is `ghcr.io/paperclipai/paperclip-daytona-runner@sha256:1344d8168f15b8c1102ffbf60bf518f278b1804c9672135fb7f10642499e70ec`. All three actual platform packs now bind runtime source c45cf9. + +Both affected local repeats passed on runtime c45cf9 with controller/harness df1c65. The first new Daytona denied-write case also passed, including a completed read attestation, exact delivered denial, no automatic resume, continuous absent effects, owned retirement and confirmed sandbox deletion. + +Remote Stop reached the exact pending-callback cancellation and stale-answer refusal, with a complete remote no-effect watcher and an empty final process journal. Its overall result remains failed: the flow also applied a local API-PID identity check to remote execution, where the controller-command PID legitimately becomes the sandbox runner PID. The repaired flow uses local PID tracking only for local execution. Remote proof still requires the same company/run/lease/sandbox, root boot/start-tick identity, retained descendant journal and continuous watcher. No remote retirement requirement is removed. The failed case and private recovery journal remain retained; only Stop is repeated before continuing the remaining cells. diff --git a/tests/runner-e2e/native-active-stop-flow.ts b/tests/runner-e2e/native-active-stop-flow.ts index f1ff9d172eb..687f3408a95 100644 --- a/tests/runner-e2e/native-active-stop-flow.ts +++ b/tests/runner-e2e/native-active-stop-flow.ts @@ -68,9 +68,12 @@ export async function runNativeActiveStopFlow(input: { let fixture: NativeRemoteFixture | undefined, baseline: NativeRemoteSnapshot | undefined, sealed: NativeRemoteSnapshot | undefined; let completed: Awaited> | undefined; const observeProcesses = () => { + // Remote ownership comes from the sandbox boot/start-tick journal. The + // API PID transitions from the controller command to the remote runner. + 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 => { if (issue.id) issue = await api.get(`/api/issues/${issue.id}`);