Skip to content

fix(pstack): require Bun at bootstrap boundary - #21

Merged
ericlitman merged 4 commits into
mainfrom
codex/issue-18-bun-guard
Aug 26, 2026
Merged

fix(pstack): require Bun at bootstrap boundary#21
ericlitman merged 4 commits into
mainfrom
codex/issue-18-bun-guard

Conversation

@ericlitman

@ericlitman ericlitman commented Aug 26, 2026

Copy link
Copy Markdown
Owner

Closes #18

Why

The Bun-only bootstrap currently lets Node fail at import.meta.dir with an opaque path stack. The first shared module boundary can report the required runtime before either direct bootstrap or watch-pr reaches a Bun-only API.

What changed

  • Guard bootstrap.ts when the Bun global is missing and print the Bun installation URL.
  • Test direct bootstrap and the watch-pr importer under Node 22.23.2. The package test command includes this test, and CI pins the same Node version.
  • Point no-comments at codex-tools.md instead of repeating Codex dispatch mechanics. Update NOTICE provenance for the port-authored test and script edits.

Tradeoffs

Node remains unsupported. The guard covers only entry points that evaluate bootstrap.ts; orch fails earlier during Node's TypeScript parsing and stays outside this change.

Blast radius

The runtime change is one predicate before import.meta.dir. Bun execution falls through to the existing dependency installation and freshness checks. No runner, orch, version, or changelog code changed.

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.

Local verification:

  • Node v22.23.2 and Bun 1.4.0.
  • bun install --frozen-lockfile: passed.
  • bun test bootstrap: 2 passed, 0 failed, 6 assertions.
  • bun run test: 101 passed, 0 failed, 451 assertions across 10 files.
  • bun run typecheck: passed.
  • Manifest parsing and PSTACK_STATIC_ONLY=1 bash tests/skill-collision-repro.sh: passed.
  • quick_validate.py plugins/pstack/skills/no-comments: passed.
  • Workflow YAML parsing and git diff origin/main...HEAD --check: passed.
  • node bootstrap.ts and node watch-pr/watch-pr: each exited 1 with pstack poteto-mode tooling requires Bun (https://bun.sh). Install Bun, then re-run. and no path-error stack.
  • bun bootstrap.ts and bun watch-pr/watch-pr --help: each exited 0.
  • The dependency freshness marker matched the hash of package.json and bun.lock.

Live evidence:

Head 8b8741bca172afa5a1ab41e7b28dbcaa0d27ed7c passed the installed-payload gate.

  • /Users/ericlitman/.claude/plugins/cache/open-pstack/pstack/1.1.0 matched the branch package.
  • /Users/ericlitman/.codex/plugins/cache/open-pstack/pstack/1.1.0 matched the branch package.
  • The package comparison excluded the untracked node_modules directory.
  • A fresh Claude Fable xhigh session and a fresh Codex Sol xhigh session each ran the installed bootstrap.ts and watch-pr.
  • Under Node, both commands exited 1 and printed exactly pstack poteto-mode tooling requires Bun (https://bun.sh). Install Bun, then re-run.
  • Under Bun, both commands exited 0 and watch-pr printed Usage: watch-pr [options].

@ericlitman
ericlitman marked this pull request as ready for review August 26, 2026 03:10
@mergify

mergify Bot commented Aug 26, 2026

Copy link
Copy Markdown

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

@ericlitman
ericlitman merged commit 1495460 into main Aug 26, 2026
3 checks passed
hieusats referenced this pull request in hieusats/omp-pstack Aug 30, 2026
fix(pstack): require Bun at bootstrap boundary
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.

Adopt Bun bootstrap guard and pointer-only platform mapping

1 participant