From e15e3db2b1d11ad2834ca3b81befeedaf2e17fda Mon Sep 17 00:00:00 2001 From: Chinesezjc Date: Sat, 1 Aug 2026 15:53:48 +0800 Subject: [PATCH] docs(code-runtime-worker): correct __debug__ attribution in binding-global comment The inline comment called every dunder entry "the Python backend's" slot, but `__debug__` is a CPython compile-time constant, not a seeded slot; align the comment with the seam declaration, which is the single home for why each entry is reserved. --- packages/code-runtime/code-runtime-worker/src/index.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/code-runtime/code-runtime-worker/src/index.ts b/packages/code-runtime/code-runtime-worker/src/index.ts index 9773d3c341..43801899a2 100644 --- a/packages/code-runtime/code-runtime-worker/src/index.ts +++ b/packages/code-runtime/code-runtime-worker/src/index.ts @@ -324,9 +324,11 @@ export class WorkerCodeRuntime extends CodeRuntime { throw new Error(`dsh-code-runtime-worker: binding global ${JSON.stringify(namespace.global)} is not a usable identifier`) } // RESERVED_BINDING_GLOBALS is the seam's shared backend-owned set: - // `console` is THIS backend's log-capture slot; the dunder entries are - // the Python backend's — refused here too so the namespace list stays - // portable across backends. + // `console` is THIS backend's log-capture slot; the dunder entries exist + // for the Python side — its seeded/wrapped slots plus the `__debug__` + // compile-time constant — refused here too so the namespace list stays + // portable across backends. The seam declaration is the single home for + // why each entry is reserved. if (RESERVED_BINDING_GLOBALS.has(namespace.global)) { throw new Error(`dsh-code-runtime-worker: reserved binding global ${JSON.stringify(namespace.global)}`) }