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,