Skip to content

fix(server): load the keyring through createRequire so the fleet build ships - #182

Merged
nullStack65 merged 1 commit into
release/native-0.1.10from
fix/server-keyring-sea-import
Nov 23, 2026
Merged

nullStack65 merged 1 commit into
release/native-0.1.10from
fix/server-keyring-sea-import

Conversation

@nullStack65

Copy link
Copy Markdown
Owner

Problem

Every fleet build of release/native-0.1.10 has failed since #158 ("read Antigravity quota from the CLI sign-in"). That PR loads @napi-rs/keyring with await import(...). The single-executable build (node apps/server/scripts/cli.ts build-exe) rejects a file-backed package loaded that way with ServerCliExecutableImportError. The fleet rollout therefore blocked commit 1f8a072 after three failed builds, and the fleet is still on 3ad1bfd from Nov 20, so #139 through #181 never shipped.

ARC CI builds only the bundle (vp run --filter t3 build:bundle), never the single executable, so those heads still qualified green.

Change

  • apps/server/src/provider/antigravityUsageLimits.ts loads the keyring through NodeModule.createRequire(import.meta.url). The server already loads undici, Playwright and ffi-rs this way, and the module still loads only when a quota read needs it.
  • .github/workflows/closura-arc-ci.yml: the core job now also runs build-exe after the native server build. A head the fleet cannot build now fails qualification instead of passing.

Scope

A bug fix for a regression from #158 that blocks every fleet deploy. Paired with a change to the fleet rollout scripts in the private config repository, which repairs the rollout's own build environment and adds the desktop restart.

Verification

  • Ran the fleet's own build script end to end on this commit: bundle, build-exe, the CLI archive, then scripts/smoke-cli-archive.ts (--version, __service-launcher, and serve answered). The archive ships node_modules/@napi-rs/keyring and keyring.linux-x64-gnu.node.
  • The same script failed at build-exe on 18cf8f2, 9c718d3 and 1f8a072 with the import guard error.
  • vp test run src/provider/antigravityUsageLimits (apps/server): 26 of 26 pass.
  • vp run check:changed origin/release/native-0.1.10: format and lint pass. Typecheck, knip and one test fail in files this PR does not touch: mcp-tool-use/run.ts and run.test.ts, the agent-context budget test, and repo-wide unused files and exports. These checks are not part of ARC CI on this branch.
  • Not checked: an actual keyring read inside the packaged executable. The packaged layout matches the other createRequire modules.

Deploy: fleet

Model: Claude Opus 5.5 (claude-opus-5-5), harness: T3 Code through Claude Code.

🤖 Generated with Claude Code

…d 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 18cf8f2 failed at build-exe, the rollout blocked
1f8a072, and every host stayed on 3ad1bfd (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 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 23, 2026

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@nullStack65

Copy link
Copy Markdown
Owner Author

Independent bot review of head 9307585: 0 blocking findings (Critical/Important).

  1. antigravityUsageLimits.ts: switching from await import to a module-level createRequire(import.meta.url) keeps the keyring loading only when it is needed. A synchronous require that throws inside the async try still rejects, so it is caught and falls back to secret-tool or security as before. The token stays out of span attributes, and there are no secrets in the diff.
  2. closura-arc-ci.yml: the added build-exe step runs after build:bundle in the same core job, so heads the fleet cannot build now fail ARC CI. It adds no new permissions, secrets or triggers. The only cost is a longer job.

Not verified by this review: a keyring read inside the packaged executable, which the PR body also lists as unchecked.

@nullStack65
nullStack65 merged commit 3776bca into release/native-0.1.10 Nov 23, 2026
6 checks passed
@nullStack65
nullStack65 deleted the fix/server-keyring-sea-import branch November 23, 2026 05:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant