Skip to content

Commit 63b7242

Browse files
fix(ssh): remote launcher installs the fork package with npm audit off
npm's audit request hung indefinitely on both remote hosts, every launcher attempt stacked behind it, and the install check timed out with "npm produced no t3 executable". The spec is a local tarball, so the generated runner script now exports npm_config_audit=false and npm_config_fund=false before the npx / npm exec calls. Takes effect on the next DMG deploy; the hosts carry the same settings in ~/.npmrc meanwhile. Made with Claude Fable 5.1 in Claude Code. Co-Authored-By: Claude Fable 5.1 <[email protected]>
1 parent d9963a3 commit 63b7242

3 files changed

Lines changed: 27 additions & 1 deletion

File tree

‎FORK_FEATURES.md‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,13 +298,20 @@ Deploys are covered by `runbooks/DEPLOY_FORK.md` in the wrapper repository.
298298
`runbooks/deploy/pack-server-tarball.sh` builds a SHA-versioned package for the remote
299299
host, and `runbooks/deploy/swap-fork-app.sh` replaces the stock-named desktop app.
300300

301+
The generated runner script also turns npm's audit and fund calls off for the
302+
package-spec install (`npm_config_audit=false npm_config_fund=false`). The
303+
spec is a local tarball, and npm's audit request has hung indefinitely on the
304+
remote hosts, stacking every launch attempt behind it until the launcher's
305+
install check timed out.
306+
301307
Implementation: `packages/ssh/src/command.ts`, `packages/ssh/src/tunnel.ts`,
302308
`apps/desktop/src/app/DesktopForkOverrides.ts` (`readSshPackageSpecOverride`),
303309
and `apps/desktop/src/main.ts`.
304310

305311
Tests: `packages/ssh/src/command.fork.test.ts` (override precedence and
306312
file parsing), `packages/ssh/src/tunnel.fork.test.ts` (the runner script
307-
tries the explicit spec before a global `t3`), and
313+
tries the explicit spec before a global `t3`, and disables npm audit and
314+
fund for the install), and
308315
`apps/desktop/src/app/DesktopForkOverrides.fork.test.ts` (reading the
309316
override file).
310317

‎packages/ssh/src/tunnel.fork.test.ts‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,21 @@ describe("ssh tunnel scripts (fork)", () => {
2222
);
2323
});
2424

25+
it("turns npm audit and fund off for the package-spec install", () => {
26+
const script = buildRemoteT3RunnerScript({
27+
packageSpec: "/home/ubuntu/.t3/fork/t3-fork.tgz",
28+
preferPackageSpec: true,
29+
});
30+
31+
// The audit request has hung indefinitely on remote hosts and stacked
32+
// every launcher attempt behind it; the spec is a local tarball anyway.
33+
assert.include(script, "export npm_config_audit=false npm_config_fund=false");
34+
assert.isBelow(
35+
script.indexOf("export npm_config_audit=false"),
36+
script.indexOf("require_installed_t3_cli npx"),
37+
);
38+
});
39+
2540
it("keeps the global binary first without an explicit spec", () => {
2641
const script = buildRemoteT3RunnerScript({ packageSpec: "t3@latest" });
2742

‎packages/ssh/src/tunnel.ts‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -441,6 +441,10 @@ require_installed_t3_cli() {
441441
return 1
442442
}
443443
run_package_spec() {
444+
# Fork: npm's audit request can hang indefinitely on some hosts, and every
445+
# launcher attempt then stacks behind it (FORK_FEATURES.md: SSH launch runs
446+
# the fork server). The spec is a local tarball; there is nothing to audit.
447+
export npm_config_audit=false npm_config_fund=false
444448
if command -v npx >/dev/null 2>&1; then
445449
require_installed_t3_cli npx --yes --package @@T3_PACKAGE_SPEC@@ || exit 1
446450
exec npx --yes --package @@T3_PACKAGE_SPEC@@ -- t3 "$@"

0 commit comments

Comments
 (0)