From d6a7f40a10af361018ba4f2a3f6dcfda9126f1a1 Mon Sep 17 00:00:00 2001 From: Dotta Date: Fri, 30 Oct 2026 23:00:54 -0500 Subject: [PATCH] fix(native): preserve unreadable state classification during staged probe --- .../native-runtime/native-session-executor.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/server/src/services/native-runtime/native-session-executor.ts b/server/src/services/native-runtime/native-session-executor.ts index ff85436414b..8dd4cb27d68 100644 --- a/server/src/services/native-runtime/native-session-executor.ts +++ b/server/src/services/native-runtime/native-session-executor.ts @@ -5660,8 +5660,15 @@ function readRunnerdDurableIdentity( function readStagedRunnerdAttachment(root: string) { const path = resolve(root, "control-plane", "control-plane-state.json"); if (!existsSync(path)) return null; - const state = record(JSON.parse(readBoundedNativeFile(path, NATIVE_CONTROL_PLANE_STATE_MAX_BYTES, - "runner_durable_identity_too_large").toString("utf8"))); + let state: Record; + try { + state = record(JSON.parse(readBoundedNativeFile(path, NATIVE_CONTROL_PLANE_STATE_MAX_BYTES, + "runner_durable_identity_too_large").toString("utf8"))); + } catch { + // Detection must not preempt the existing forward-evidence fence or + // unreadable legacy identity quarantine. Neither path admits this state. + return null; + } if (state.stagedRunAttachment === undefined && state.schema !== "paperclip.runner.durable.control-plane-state.staged-attachment.v1") return null; const staged = inspectStagedRunAttachment(state);