Skip to content

fix: isolate Bun startup for external lanes - #50

Merged
thisguymartin merged 1 commit into
mainfrom
codex/issue-37-isolate-bun-startup
Oct 13, 2026
Merged

thisguymartin merged 1 commit into
mainfrom
codex/issue-37-isolate-bun-startup

Conversation

@thisguymartin

Copy link
Copy Markdown
Owner

Closes #37

What changed

Project .env files, Bun preloads, and inherited startup options could affect the external lane runner before its routing and credential checks. The launcher now clears BUN_OPTIONS and NODE_OPTIONS, disables automatic env-file loading, and uses /dev/null for Bun configuration. Normal exported variables still reach the runner and its provider child.

  • Move the TypeScript entrypoint to runner/entry.ts behind the shell launcher.
  • Update OMP dispatch and subprocess tests to invoke the launcher directly.
  • Add five synthetic regression cases for individual and combined startup inputs, preload suppression, and exported credential/identity preservation.

Ports the launcher isolation from open-pstack PR #113.

Verification

  • Bun tests, strict typecheck, static invariants, and plugin validation pass.
  • The exact candidate is installed in every affected harness.
  • The changed behavior passes from each real user surface.
  • The installed version, action, and observed result appear below.

bash scripts/check.sh passed in an isolated checkout containing only this change: 269 tests passed, including the startup cases and existing explicit-deadline/cancellation tests. Bun 1.4.2.

Live evidence:

Harness: Claude Code
Installed: not installed; candidate 8185e8b44fff55eba9429f2d027bb0964059778c
Surface: real parent session
Action: setup, scope, and external dispatch with synthetic startup inputs
Observed: not exercised
Result: not run

Harness: Codex
Installed: not installed; candidate 8185e8b44fff55eba9429f2d027bb0964059778c
Surface: real parent session
Action: setup, scope, and external dispatch with synthetic startup inputs
Observed: not exercised
Result: not run

Harness: OpenCode beta
Installed: not installed; candidate 8185e8b44fff55eba9429f2d027bb0964059778c
Surface: real parent session
Action: setup, scope, and external dispatch with synthetic startup inputs
Observed: not exercised
Result: not run

Harness: OMP
Installed: not installed; candidate 8185e8b44fff55eba9429f2d027bb0964059778c
Surface: pstack-omp parent session using pstack_task
Action: configured dispatch with synthetic startup inputs
Observed: not exercised
Result: not run

A pull request without live evidence remains a draft. Do not merge, tag, release, or roll it out.

Project dotenv files, Bun preloads, and inherited startup options could run
before the external lane runner checked routing and credentials.

- Move the TypeScript entrypoint behind a shell launcher that clears
  BUN_OPTIONS and NODE_OPTIONS and disables automatic env/config loading.
- Invoke the launcher directly from OMP and subprocess test helpers so the
  startup isolation also applies to cancellation and explicit deadlines.
- Cover individual and combined startup inputs with synthetic fixtures,
  including exported credentials and child identity preservation.

Refs #37. Ports the launcher isolation from open-pstack PR ericlitman#113.
@thisguymartin
thisguymartin marked this pull request as ready for review October 13, 2026 22:37
@thisguymartin
thisguymartin merged commit 03b62c9 into main Oct 13, 2026
1 check passed
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.

Sync 1: Isolate Bun startup

1 participant