build.sh requires outbound network for full browse build (vendor:xterm / gen:skill-docs)
- Dominant language
- TypeScript
- Stars
- 133k
- Forks
- 19.9k
- Avg merge
- 18h 46m
- Merged PRs (30d)
- 26
Description
## Follow-up: `scripts/build.sh` requires outbound network for a full `browse` build
### Summary
`browse/scripts/build-node-server.sh` only produces `server-node.mjs` (the Node.js
server bundle). The runnable `browse` executable is a *compiled* artifact produced by
the root `scripts/build.sh` via `bun build --compile`. That script also runs
prep steps that need outbound network access:
- `vendor:xterm` (npm install of the xterm dependency)
- `gen:skill-docs` (generates skill documentation, fetches remote sources)
### Impact
On a machine with no outbound network (or a flaky registry), a bare
`rm -rf browse/dist && bash browse/scripts/build-node-server.sh` regenerates the
server bundle but leaves **no `browse` CLI binary**. Running `./browse/dist/browse`
then fails with a cryptic `ENOENT` instead of an actionable message.
PR #2260 added a Step-5 guard to `build-node-server.sh` that detects the missing
binary and prints remediation. This issue tracks the **root cause** — making the
network-dependent steps resilient or clearly documented.
### Suggested fixes
1. Document the network requirement in `scripts/build.sh` header / README.
2. Make `vendor:xterm` and `gen:skill-docs` skippable via an env var
(e.g. `GSTACK_OFFLINE=1`) so the compiled binary can still be produced from a
cached vendor tree.
3. Have `build-node-server.sh` optionally invoke the compile step itself when the
binary is absent and a suitable toolchain is present.
### Verification note
The full pipeline (server start + Chromium navigation) was confirmed working via a
loopback `http://127.0.0.1:8099/` test; external-URL navigation is only blocked by
sandbox DNS policy, not by this issue.
Contributor guide
Research direction
Start with scripts/build.sh and browse/scripts/build-node-server.sh, then inspect the vendor:xterm and gen:skill-docs preparation steps. Run the documented offline build scenario with browse/dist removed and verify that the compiled browse binary is produced from cached assets, or that the network requirement and remediation are clearly documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- bun, node.js, typescript
- Domain
- build-system, cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100