From 9307585040f57fb3c7cdddd940a56ae82a09afc7 Mon Sep 17 00:00:00 2001 From: nullStack65 <112618179+nullStack65@users.noreply.github.com> Date: Mon, 23 Nov 2026 05:04:56 +0000 Subject: [PATCH] fix(server): load the keyring through createRequire so the fleet build ships PR #158 loaded @napi-rs/keyring with import(). The single-executable import guard rejects a file-backed package loaded that way, so every fleet build of release/native-0.1.10 since 18cf8f27 failed at build-exe, the rollout blocked 1f8a0720, and every host stayed on 3ad1bfdd (Nov 20). The keyring now loads through createRequire, as node-pty, fff and playwright already do. ARC CI built only the bundle, so those heads qualified green. The core job now also runs build-exe, so a head the fleet cannot build fails qualification. Model: claude-opus-5-5 Task: fix Agent: fleet T3 auto-rollout lane Harness: t3/claude-code Model-family: claude Model-generation: 5.5 Skills-SHA: none loaded; followed bot-baseline.md and repo AGENTS.md; installed identity unverified Co-Authored-By: Claude Opus 5.5 --- .github/workflows/closura-arc-ci.yml | 7 +++++++ apps/server/src/provider/antigravityUsageLimits.ts | 8 +++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/closura-arc-ci.yml b/.github/workflows/closura-arc-ci.yml index fb9b20d1b5055..1a5d62589c1c5 100644 --- a/.github/workflows/closura-arc-ci.yml +++ b/.github/workflows/closura-arc-ci.yml @@ -185,6 +185,13 @@ jobs: shell: bash run: vp run --filter t3 build:bundle + # The fleet rollout ships the single executable, not the bundle. Its import guard + # rejects a file-backed package loaded with import(), so a head that passes the + # bundle build alone still fails the fleet build and never deploys. + - name: Build native T3 single executable + shell: bash + run: node apps/server/scripts/cli.ts build-exe + - name: Verify compiled server output shell: bash run: | diff --git a/apps/server/src/provider/antigravityUsageLimits.ts b/apps/server/src/provider/antigravityUsageLimits.ts index d1beaae1b609e..9049499c277af 100644 --- a/apps/server/src/provider/antigravityUsageLimits.ts +++ b/apps/server/src/provider/antigravityUsageLimits.ts @@ -1,3 +1,5 @@ +import * as NodeModule from "node:module"; + import type { AntigravitySettings, ServerProviderUsageWindow } from "@t3tools/contracts"; import * as HostProcess from "@t3tools/shared/HostProcess"; import * as Clock from "effect/Clock"; @@ -195,13 +197,17 @@ export function parseAntigravityCliCredential( }; } +// A single-executable server cannot import() a file-backed package; createRequire resolves it beside the +// executable, as the other native externals do. +const requireForKeyring = NodeModule.createRequire(import.meta.url); + // The stored value is the OAuth token. Keep it out of span attributes. const readDefaultStoredSecret = Effect.fnUntraced(function* ( spawner: ChildProcessSpawner.ChildProcessSpawner["Service"], ) { const fromModule = yield* Effect.tryPromise({ try: async () => { - const keyring = (await import("@napi-rs/keyring")) as { + const keyring = requireForKeyring("@napi-rs/keyring") as { readonly AsyncEntry?: new ( service: string, account: string,