fix(skills): keep the seam gate's preview attached so --project works again (#3463)

seam-gate verify --project has failed with "preview server exited early" since #3310, which made `hyperframes preview` pick its launch mode from the TTY. The gate spawns with stdio [ignore,pipe,pipe], so interactive is false and it silently took the background path: the launcher exits 0 before the server is serving (read as a dead server), and the detached server escapes the gate's process-group cleanup (leaking a preview per run).

Pass the CLI's own --foreground opt-out in the default --server-cmd. Both skill mirrors updated.

— Rames
This commit is contained in:
James Russo
2026-08-24 11:23:58 -07:00
committed by GitHub
parent e5a5e6b151
commit ac00560d7d
2 changed files with 12 additions and 2 deletions
@@ -71,7 +71,12 @@ async function ensureServer() {
const port = 5380 + Math.floor(Math.random() * 20); const port = 5380 + Math.floor(Math.random() * 20);
const env = { ...process.env }; const env = { ...process.env };
delete env.HYPERFRAME_RUNTIME_URL; // wrong value fails silently as 200 HTML delete env.HYPERFRAME_RUNTIME_URL; // wrong value fails silently as 200 HTML
const cmd = flag("server-cmd", `npx --yes hyperframes preview --no-open --port ${port}`); // `preview` backgrounds itself when stdin/stdout aren't TTYs, which they never are here: the
// launcher would exit 0 before the server is up and detach it out of our process group.
const cmd = flag(
"server-cmd",
`npx --yes hyperframes preview --foreground --no-open --port ${port}`,
);
const child = spawn("sh", ["-c", cmd.replace(/\{port\}/g, String(port))], { const child = spawn("sh", ["-c", cmd.replace(/\{port\}/g, String(port))], {
cwd: project, cwd: project,
env, env,
@@ -71,7 +71,12 @@ async function ensureServer() {
const port = 5380 + Math.floor(Math.random() * 20); const port = 5380 + Math.floor(Math.random() * 20);
const env = { ...process.env }; const env = { ...process.env };
delete env.HYPERFRAME_RUNTIME_URL; // wrong value fails silently as 200 HTML delete env.HYPERFRAME_RUNTIME_URL; // wrong value fails silently as 200 HTML
const cmd = flag("server-cmd", `npx --yes hyperframes preview --no-open --port ${port}`); // `preview` backgrounds itself when stdin/stdout aren't TTYs, which they never are here: the
// launcher would exit 0 before the server is up and detach it out of our process group.
const cmd = flag(
"server-cmd",
`npx --yes hyperframes preview --foreground --no-open --port ${port}`,
);
const child = spawn("sh", ["-c", cmd.replace(/\{port\}/g, String(port))], { const child = spawn("sh", ["-c", cmd.replace(/\{port\}/g, String(port))], {
cwd: project, cwd: project,
env, env,