diff --git a/apps/server/src/atomicWrite.test.ts b/apps/server/src/atomicWrite.test.ts index a578289ec4..c266fa9f36 100644 --- a/apps/server/src/atomicWrite.test.ts +++ b/apps/server/src/atomicWrite.test.ts @@ -1,9 +1,12 @@ import { HostProcessPlatform } from "@t3tools/shared/hostProcess"; import * as NodeServices from "@effect/platform-node/NodeServices"; import { describe, expect, it } from "@effect/vitest"; +import * as Deferred from "effect/Deferred"; import * as Effect from "effect/Effect"; import * as FileSystem from "effect/FileSystem"; import * as PlatformError from "effect/PlatformError"; +import * as Fiber from "effect/Fiber"; +import * as TestClock from "effect/testing/TestClock"; import { writeFileStringAtomically } from "./atomicWrite.ts"; describe("durable atomic text replacement", () => { @@ -74,4 +77,165 @@ describe("durable atomic text replacement", () => { expect(yield* fs.readDirectory(directory)).toEqual(["document.md"]); }).pipe(Effect.scoped, Effect.provide(NodeServices.layer)), ); + + it.effect("retries a transient Windows destination lock without exposing a partial file", () => + Effect.gen(function* () { + const fs = yield* FileSystem.FileSystem; + const directory = yield* fs.makeTempDirectoryScoped(); + const target = `${directory}/document.md`; + yield* fs.writeFileString(target, "original"); + const locked = PlatformError.systemError({ + _tag: "Unknown", + module: "FileSystem", + method: "rename", + cause: Object.assign(new Error("destination is temporarily locked"), { code: "EPERM" }), + }); + let attempts = 0; + const firstRename = yield* Deferred.make(); + const observed = FileSystem.make({ + ...fs, + rename: (from, to) => { + attempts += 1; + return Deferred.succeed(firstRename, undefined).pipe( + Effect.andThen(attempts < 3 ? Effect.fail(locked) : fs.rename(from, to)), + ); + }, + }); + const writing = yield* writeFileStringAtomically({ + filePath: target, + contents: "replacement", + }).pipe( + Effect.provideService(FileSystem.FileSystem, observed), + Effect.provideService(HostProcessPlatform, "win32"), + Effect.forkChild, + ); + yield* Deferred.await(firstRename); + yield* TestClock.adjust("1 second"); + yield* Fiber.join(writing); + expect(attempts).toBe(3); + expect(yield* fs.readFileString(target)).toBe("replacement"); + expect(yield* fs.readDirectory(directory)).toEqual(["document.md"]); + }).pipe(Effect.scoped, Effect.provide(NodeServices.layer)), + ); + + it.effect("does not retry a permanent rename error or a transient error off Windows", () => + Effect.gen(function* () { + const fs = yield* FileSystem.FileSystem; + const directory = yield* fs.makeTempDirectoryScoped(); + const denied = PlatformError.systemError({ + _tag: "PermissionDenied", + module: "FileSystem", + method: "rename", + cause: Object.assign(new Error("denied"), { code: "EPERM" }), + }); + for (const [platform, error] of [ + ["linux", denied], + [ + "win32", + PlatformError.systemError({ + _tag: "Unknown", + module: "FileSystem", + method: "rename", + cause: Object.assign(new Error("different volume"), { code: "EXDEV" }), + }), + ], + ] as const) { + let attempts = 0; + const failing = FileSystem.make({ + ...fs, + rename: () => { + attempts += 1; + return Effect.fail(error); + }, + }); + const outcome = yield* writeFileStringAtomically({ + filePath: `${directory}/${platform}.md`, + contents: "replacement", + }).pipe( + Effect.provideService(FileSystem.FileSystem, failing), + Effect.provideService(HostProcessPlatform, platform), + Effect.exit, + ); + expect(outcome._tag).toBe("Failure"); + expect(attempts).toBe(1); + } + }).pipe(Effect.scoped, Effect.provide(NodeServices.layer)), + ); + + it.effect("bounds retries when a Windows destination lock does not clear", () => + Effect.gen(function* () { + const fs = yield* FileSystem.FileSystem; + const directory = yield* fs.makeTempDirectoryScoped(); + const target = `${directory}/document.md`; + yield* fs.writeFileString(target, "original"); + const firstRename = yield* Deferred.make(); + let attempts = 0; + const locked = PlatformError.systemError({ + _tag: "Unknown", + module: "FileSystem", + method: "rename", + cause: Object.assign(new Error("destination remains locked"), { code: "EACCES" }), + }); + const failing = FileSystem.make({ + ...fs, + rename: () => { + attempts += 1; + return Deferred.succeed(firstRename, undefined).pipe(Effect.andThen(Effect.fail(locked))); + }, + }); + const writing = yield* writeFileStringAtomically({ + filePath: target, + contents: "replacement", + }).pipe( + Effect.provideService(FileSystem.FileSystem, failing), + Effect.provideService(HostProcessPlatform, "win32"), + Effect.exit, + Effect.forkChild, + ); + yield* Deferred.await(firstRename); + yield* TestClock.adjust("6 seconds"); + const outcome = yield* Fiber.join(writing); + expect(outcome._tag).toBe("Failure"); + expect(attempts).toBeGreaterThan(1); + expect(yield* fs.readFileString(target)).toBe("original"); + expect(yield* fs.readDirectory(directory)).toEqual(["document.md"]); + }).pipe(Effect.scoped, Effect.provide(NodeServices.layer)), + ); + + it.effect("remains cancellable while a transient Windows lock is backing off", () => + Effect.gen(function* () { + const fs = yield* FileSystem.FileSystem; + const directory = yield* fs.makeTempDirectoryScoped(); + const target = `${directory}/document.md`; + yield* fs.writeFileString(target, "original"); + const firstRename = yield* Deferred.make(); + let attempts = 0; + const locked = PlatformError.systemError({ + _tag: "Unknown", + module: "FileSystem", + method: "rename", + cause: Object.assign(new Error("destination is temporarily locked"), { code: "EBUSY" }), + }); + const failing = FileSystem.make({ + ...fs, + rename: () => { + attempts += 1; + return Deferred.succeed(firstRename, undefined).pipe(Effect.andThen(Effect.fail(locked))); + }, + }); + const writing = yield* writeFileStringAtomically({ + filePath: target, + contents: "replacement", + }).pipe( + Effect.provideService(FileSystem.FileSystem, failing), + Effect.provideService(HostProcessPlatform, "win32"), + Effect.forkChild, + ); + yield* Deferred.await(firstRename); + yield* Fiber.interrupt(writing); + expect(attempts).toBe(1); + expect(yield* fs.readFileString(target)).toBe("original"); + expect(yield* fs.readDirectory(directory)).toEqual(["document.md"]); + }).pipe(Effect.scoped, Effect.provide(NodeServices.layer)), + ); }); diff --git a/apps/server/src/atomicWrite.ts b/apps/server/src/atomicWrite.ts index dcf4670b0a..dcca367709 100644 --- a/apps/server/src/atomicWrite.ts +++ b/apps/server/src/atomicWrite.ts @@ -1,7 +1,29 @@ import { HostProcessPlatform } from "@t3tools/shared/hostProcess"; +import * as Clock from "effect/Clock"; import * as Effect from "effect/Effect"; import * as FileSystem from "effect/FileSystem"; import * as Path from "effect/Path"; +import type * as PlatformError from "effect/PlatformError"; + +const WINDOWS_RENAME_RETRY_BUDGET_MS = 5_000; + +function platformErrorCode(error: PlatformError.PlatformError): unknown { + const cause = error.reason.cause; + return typeof cause === "object" && cause !== null && "code" in cause ? cause.code : undefined; +} + +function windowsRenameRetryDelay( + error: PlatformError.PlatformError, + elapsedMs: number, + attempt: number, +): number | undefined { + if ( + elapsedMs >= WINDOWS_RENAME_RETRY_BUDGET_MS || + !["EPERM", "EACCES", "EBUSY"].includes(String(platformErrorCode(error))) + ) + return undefined; + return Math.min(25 * 2 ** Math.min(attempt, 5), 500, WINDOWS_RENAME_RETRY_BUDGET_MS - elapsedMs); +} export const writeFileStringAtomically = (input: { readonly filePath: string; @@ -34,7 +56,25 @@ export const writeFileStringAtomically = (input: { }), ); else if (input.mode !== undefined) yield* fs.chmod(tempPath, input.mode); - yield* fs.rename(tempPath, input.filePath); + // Windows can temporarily deny replacement while another process has the + // destination open. Keep the staged file private and retry only that + // narrow class of errors; all other failures preserve fail-fast behavior. + const started = yield* Clock.currentTimeMillis; + let attempt = 0; + for (;;) { + const renamed = yield* Effect.result(fs.rename(tempPath, input.filePath)); + if (renamed._tag === "Success") break; + const delay = + platform === "win32" + ? windowsRenameRetryDelay( + renamed.failure, + (yield* Clock.currentTimeMillis) - started, + attempt++, + ) + : undefined; + if (delay === undefined) return yield* renamed.failure; + yield* Effect.sleep(delay); + } // Windows does not support opening directory handles through this API. // On POSIX, persist the rename as well as the temporary file's contents. if (input.durable && platform !== "win32") { @@ -45,11 +85,7 @@ export const writeFileStringAtomically = (input: { }), ).pipe( Effect.catch((error) => { - const cause = error.reason.cause; - const code = - typeof cause === "object" && cause !== null && "code" in cause - ? cause.code - : undefined; + const code = platformErrorCode(error); return code === "EINVAL" || code === "ENOTSUP" || code === "EOPNOTSUPP" ? Effect.void : Effect.fail(error); diff --git a/apps/server/src/preview/PortScannerPythonCompute.integration.test.ts b/apps/server/src/preview/PortScannerPythonCompute.integration.test.ts index 7da086ada5..ad5e206772 100644 --- a/apps/server/src/preview/PortScannerPythonCompute.integration.test.ts +++ b/apps/server/src/preview/PortScannerPythonCompute.integration.test.ts @@ -206,6 +206,16 @@ describe.runIf(Boolean(TEST_PYTHON) && NodeProcess.platform !== "win32")( ]); } }); + const waitForLsofProcess = Effect.fn("PortScannerPythonCompute.waitForLsofProcess")( + (processId: number) => + eventually( + scanConfiguredFixture(1).pipe( + Effect.map(() => + lsofObservedProcess(lsofSnapshots, processId) ? true : null, + ), + ), + ), + ); const waitForExecution = (executionId: ComputeExecutionId) => eventually( compute.listExecutions({ projectId: PROJECT, sessionId: SESSION }).pipe( @@ -302,7 +312,7 @@ describe.runIf(Boolean(TEST_PYTHON) && NodeProcess.platform !== "win32")( label: "FIRST", }); yield* scanConfiguredFixture(3); - expect(lsofObservedProcess(lsofSnapshots, firstRuntimeProcessId)).toBe(true); + yield* waitForLsofProcess(firstRuntimeProcessId); expectOnlyFixtureTraffic(); expect( yield* compute.listOutputs({ @@ -333,8 +343,7 @@ describe.runIf(Boolean(TEST_PYTHON) && NodeProcess.platform !== "win32")( yield* eventually( Effect.sync(() => (!processExists(firstRuntimeProcessId) ? true : null)), ); - yield* scanConfiguredFixture(2); - expect(lsofObservedProcess(lsofSnapshots, restartedRuntimeProcessId)).toBe(true); + yield* waitForLsofProcess(restartedRuntimeProcessId); expect((yield* computeOwnedEndpoints.snapshot).protectedLoopbackTcpPorts.size).toBe( 5, ); diff --git a/apps/server/src/scient/compute/ComputeBridgeTransport.test.ts b/apps/server/src/scient/compute/ComputeBridgeTransport.test.ts index 7693d1e8d5..04a96e88c5 100644 --- a/apps/server/src/scient/compute/ComputeBridgeTransport.test.ts +++ b/apps/server/src/scient/compute/ComputeBridgeTransport.test.ts @@ -23,8 +23,10 @@ import { import * as Cause from "effect/Cause"; import * as Deferred from "effect/Deferred"; import * as Effect from "effect/Effect"; +import * as Exit from "effect/Exit"; import * as Fiber from "effect/Fiber"; import * as Queue from "effect/Queue"; +import * as Scope from "effect/Scope"; import * as Stream from "effect/Stream"; import * as TestClock from "effect/testing/TestClock"; @@ -68,6 +70,9 @@ interface FakeBridge { readonly exitWith: (code: number) => Effect.Effect; readonly cancels: () => number; readonly failCancellation: () => void; + readonly stallCancellation: () => void; + readonly cancellationStarted: Effect.Effect; + readonly allowCancellation: Effect.Effect; readonly respond: (responder: Responder) => void; } @@ -157,11 +162,14 @@ const makeFakeBridge = Effect.fn("makeFakeBridge")(function* () { const stdout = yield* Queue.unbounded(); const stderr = yield* Queue.unbounded(); const exited = yield* Deferred.make(); + const cancellationStarted = yield* Deferred.make(); + const cancellationAllowed = yield* Deferred.make(); const received: ComputeProtocolMessage[] = []; const inboundDecoder = makeComputeFrameDecoder(); let outboundSequence = 0; let cancels = 0; let cancellationFails = false; + let cancellationStalled = false; let responder: Responder = healthyResponder( (command) => (command.payload as { ownerToken: string }).ownerToken, ); @@ -201,13 +209,16 @@ const makeFakeBridge = Effect.fn("makeFakeBridge")(function* () { } }), exitCode: Deferred.await(exited), - cancelProcessTree: Effect.suspend(() => { + cancelProcessTree: Effect.gen(function* () { cancels += 1; - return cancellationFails - ? Effect.fail( - new DuplexProcessError({ operation: "cancel", message: "simulated cleanup failure" }), - ) - : Effect.void; + yield* Deferred.succeed(cancellationStarted, undefined); + if (cancellationStalled) yield* Deferred.await(cancellationAllowed); + if (cancellationFails) { + return yield* new DuplexProcessError({ + operation: "cancel", + message: "simulated cleanup failure", + }); + } }), }; @@ -223,6 +234,11 @@ const makeFakeBridge = Effect.fn("makeFakeBridge")(function* () { failCancellation: () => { cancellationFails = true; }, + stallCancellation: () => { + cancellationStalled = true; + }, + cancellationStarted: Deferred.await(cancellationStarted), + allowCancellation: Deferred.succeed(cancellationAllowed, undefined).pipe(Effect.asVoid), respond: (next) => { responder = next; }, @@ -1254,6 +1270,48 @@ describe("jupyter bridge loss", () => { ), ); + it.effect("finishes loss cleanup when its owning scope closes concurrently", () => + Effect.gen(function* () { + const bridge = yield* makeFakeBridge(); + bridge.stallCancellation(); + let releases = 0; + const ownerScope = yield* Scope.make("sequential"); + const channel = yield* openChannel(bridge, { + prepareKernelEndpoints: () => + Effect.succeed({ + ports: { + ip: "127.0.0.1" as const, + shell: 43_001, + iopub: 43_002, + stdin: 43_003, + heartbeat: 43_004, + control: 43_005, + }, + handoff: Effect.void, + release: Effect.sync(() => { + releases += 1; + }), + }), + }).pipe(Scope.provide(ownerScope)); + const reader = yield* makeReader(channel); + yield* reader.next; + + yield* bridge.exitWith(9); + const event = yield* reader.next; + expect(event._tag).toBe("lost"); + yield* bridge.cancellationStarted; + + const closing = yield* Scope.close(ownerScope, Exit.void).pipe(Effect.exit, Effect.forkChild); + yield* Effect.yieldNow; + yield* bridge.allowCancellation; + const closeExit = yield* Fiber.join(closing); + + expect(Exit.isSuccess(closeExit)).toBe(true); + expect(bridge.cancels()).toBe(1); + expect(releases).toBe(1); + }), + ); + it.effect("fails a command in flight when the session is lost", () => Effect.scoped( Effect.gen(function* () { diff --git a/apps/server/src/scient/compute/ComputeBridgeTransport.ts b/apps/server/src/scient/compute/ComputeBridgeTransport.ts index 2b761b3cfc..beac6c3fd4 100644 --- a/apps/server/src/scient/compute/ComputeBridgeTransport.ts +++ b/apps/server/src/scient/compute/ComputeBridgeTransport.ts @@ -363,31 +363,33 @@ export function makeComputeBridgeTransport( const cleanupOwnedProcess = ( operation: ComputeTransportError["operation"], ): Effect.Effect => - cleanupGate.withPermits(1)( - Effect.suspend(() => { - if (MutableRef.get(cleanupComplete)) return Effect.void; - const handle = MutableRef.get(handleRef); - const cleanup = - handle === null - ? (endpointLease?.release ?? Effect.void) - : handle.cancelProcessTree.pipe( - Effect.mapError((cause) => - transportError( - operation, - "Failed to stop the compute bridge process tree.", - cause, + Effect.uninterruptible( + cleanupGate.withPermits(1)( + Effect.suspend(() => { + if (MutableRef.get(cleanupComplete)) return Effect.void; + const handle = MutableRef.get(handleRef); + const cleanup = + handle === null + ? (endpointLease?.release ?? Effect.void) + : handle.cancelProcessTree.pipe( + Effect.mapError((cause) => + transportError( + operation, + "Failed to stop the compute bridge process tree.", + cause, + ), ), - ), - Effect.tap(() => endpointLease?.release ?? Effect.void), - ); - return cleanup.pipe( - Effect.tap(() => - Effect.sync(() => { - MutableRef.set(cleanupComplete, true); - }), - ), - ); - }), + Effect.tap(() => endpointLease?.release ?? Effect.void), + ); + return cleanup.pipe( + Effect.tap(() => + Effect.sync(() => { + MutableRef.set(cleanupComplete, true); + }), + ), + ); + }), + ), ); const setup = Effect.gen(function* () { diff --git a/apps/server/src/scient/compute/ComputeSessionService.test.ts b/apps/server/src/scient/compute/ComputeSessionService.test.ts index 1a5cd435ac..760dfdc931 100644 --- a/apps/server/src/scient/compute/ComputeSessionService.test.ts +++ b/apps/server/src/scient/compute/ComputeSessionService.test.ts @@ -1,3 +1,5 @@ +// @effect-diagnostics globalTimersInEffect:off -- This host watchdog must remain independent of the Effect test clock. +import * as NodeTimers from "node:timers"; import { HostProcessEnvironment } from "@t3tools/shared/hostProcess"; import { ComputeExecutionId, @@ -466,26 +468,41 @@ const startInput = ( }); /** - * Runs the coordinator forward until an expectation holds. + * Runs the coordinator forward until an expectation holds or ten seconds of + * host time have elapsed. * * The scripted runtime never sleeps, so every state a test waits for is a fixed * number of turns away rather than a duration. Completion still persists to the * real filesystem, however, so each retry must yield to both Effect fibers and - * Node's event loop. This remains deterministic under a test clock without - * starving the host callback that makes the observed state durable. + * Node's event loop. A retry count is not a timeout: under load it can be + * exhausted before a filesystem callback runs. The host-time deadline remains + * bounded without depending on the Effect test clock. */ const waitUntil = (check: Effect.Effect) => - Effect.gen(function* () { - for (let attempt = 0; attempt < 1000; attempt += 1) { - const value = yield* check; - if (value !== null) return value; - yield* Effect.yieldNow; - yield* Effect.promise(() => new Promise((resolve) => setImmediate(resolve))); - } - return yield* Effect.die( - new Error("The compute session never reached the state the test waited for."), - ); - }); + Effect.raceFirst( + Effect.gen(function* () { + for (;;) { + const value = yield* check; + if (value !== null) return value; + yield* Effect.yieldNow; + yield* Effect.promise( + () => new Promise((resolve) => NodeTimers.setImmediate(resolve)), + ); + } + }), + Effect.callback((resume) => { + const timer = NodeTimers.setTimeout( + () => + resume( + Effect.die( + new Error("The compute session never reached the state the test waited for."), + ), + ), + 10_000, + ); + return Effect.sync(() => NodeTimers.clearTimeout(timer)); + }), + ); const sessionAt = (status: ComputeSessionStatus) => Effect.gen(function* () { diff --git a/apps/server/src/scient/compute/ComputeSessionService.ts b/apps/server/src/scient/compute/ComputeSessionService.ts index d98bafe543..16ce19fbe7 100644 --- a/apps/server/src/scient/compute/ComputeSessionService.ts +++ b/apps/server/src/scient/compute/ComputeSessionService.ts @@ -73,6 +73,7 @@ import { type ComputeRuntimeVerification, } from "@scientfactory/compute"; import { HostProcessEnvironment } from "@t3tools/shared/hostProcess"; +import * as Cause from "effect/Cause"; import * as Clock from "effect/Clock"; import * as Context from "effect/Context"; import * as DateTime from "effect/DateTime"; @@ -2080,7 +2081,7 @@ const make = Effect.gen(function* () { projectId: live.projectId, sessionId: live.sessionId, event: event._tag, - cause, + cause: Cause.pretty(cause), }).pipe( Effect.andThen(endSessionUnderLease(live, "Unable to record runtime state.")), Effect.ignore, diff --git a/docs/reports/scient-compute-backend-qualification-20260922.md b/docs/reports/scient-compute-backend-qualification-20260922.md index f76999f1a0..2c492707a9 100644 --- a/docs/reports/scient-compute-backend-qualification-20260922.md +++ b/docs/reports/scient-compute-backend-qualification-20260922.md @@ -86,12 +86,80 @@ The runner accepts an arbitrary external corpus and explicit runtime path. It does not embed local fixtures, install packages, change runtime preferences, or create a production code path. +### Hosted Windows test-harness finding + +The first Windows matrix run started real Python 3.10 and 3.12 kernels, +completed ordinary executions, and reported injected bridge/kernel loss. The +loss cases nevertheless failed before all cleanup assertions. A second run +proved this was not merely an event-forwarding race: the transport publishes +`lost` before process cleanup completes, so the consumer can close the owning +scope while the loss observer is cleaning up. That interruption was cached as +the result of process cancellation. The ownership finalizer then received the +same interrupted result instead of a completed cleanup; on some runs this also +contaminated the following fresh-session case. + +The fix makes the transport's single cleanup gate uninterruptible. Process-tree +cancellation and endpoint release now finish as one ownership operation before +scope cancellation is observed; concurrent callers still share the same cached +result, and genuine cleanup failures still fail scope closure. A deterministic +unit test closes the owner scope while cancellation is deliberately stalled and +requires cleanup and endpoint release to complete. No timeout, cleanup +assertion, or platform-specific skip was weakened. The focused real-kernel and +fresh-run files pass locally against the fully provisioned managed runtime; +Windows acceptance remains the hosted exact-head rerun described below. + +### Hosted Windows atomic-replacement finding + +After the cleanup fix, the complete bridge-loss and kernel-death suite passes +on Windows. Python 3.12 also passes the following fresh-session suite. Python +3.10 reproducibly reached the first fresh execution's `accepted` event and then +lost the session while recording that event. Rendering the complete Effect +cause identified the exact failure: Windows returned `EPERM` while atomically +renaming a staged execution result over `result.json`, which the test was +concurrently reading. The failed persistence transition correctly ended the +session, but a transient destination lock should not have been treated as +permanent data loss. + +The shared atomic-text replacement primitive now retries only Windows +`EPERM`, `EACCES`, and `EBUSY` rename failures with bounded exponential +backoff. Other platforms and error codes still fail immediately, cancellation +still interrupts backoff, and the staged file remains private until one rename +succeeds. Tests cover eventual replacement, immediate permanent/non-Windows +failure, bounded exhaustion, cancellation, and temporary-file cleanup. Hosted +Python 3.10 remains an acceptance blocker until the exact-head matrix proves +the fix. + +### Count-based unit-test wait finding + +The ordinary server suite separately reproduced the report's earlier +`waitUntil` concern. Its 1,000 event-loop yields were a count, not an elapsed +timeout, and could all complete under CI load before a real filesystem callback +made the awaited state durable. The helper now uses a ten-second host-time +deadline while continuing to yield to Effect fibers and Node callbacks. This +keeps the test bounded and compatible with the Effect test clock without +turning runner speed into correctness. + +### Hosted macOS listener-observation finding + +The exact-head macOS Python 3.12 run completed kernel restart and registered +all five protected endpoints, but the port-scanner integration test assumed +two immediate `lsof` scans were enough for macOS to publish the restarted +kernel PID. The configured fixture remained the only probed URL; only the +metadata-observation assertion raced the operating system. + +The test now drives configured scans through its existing bounded eventual +predicate until `lsof` observes the expected process. It still requires the +new PID, five protected Compute endpoints, no scanner-owned endpoints, no +unconfigured network traffic, unchanged transcripts, and complete process +cleanup. Production scanner behavior and timeouts are unchanged. + ## Platform boundary Local native execution covers macOS arm64 only. Hosted CI already qualifies managed Python on macOS and Linux and system Python at both supported-version -edges. This change extends the system-Python matrix to Windows; Windows remains -unqualified until those hosted jobs pass on the exact pull-request head. +edges. This change extends the system-Python matrix to Windows. Windows +acceptance is the hosted Python 3.10 and 3.12 result on the exact pull-request +head; the local macOS run is not substituted for it. Managed Python on Windows is out of scope because there is no published, sealed Windows managed-runtime recipe. MATLAB remains a licensed local pass;