Skip to content

fix(ci): Solid test suites break on Bun ≥1.4.3 — jsxDEV not found in solid-js production build; CONTRIBUTING's 'Bun 1.3 or newer' is false for tests #1698

Open

Description

@dezren39

fix(ci): Solid test suites break on Bun ≥1.4.3 — jsxDEV not found in solid-js production build; CONTRIBUTING's "Bun 1.3 or newer" is false for tests

Evidence (verified this run, on origin/main 561e5304e0cd24d9838ea72e9f5a6364b163028e)

The repo pins bun@1.4.2 (package.json packageManager), and CI enforces the pin via bun-version-file: package.json (.github/workflows/test.yml:53, .github/actions/setup-bun/action.yml) — so CI is green. But anyone running the tests with a newer Bun — which CONTRIBUTING.md:25 explicitly invites ("OpenCode requires Bun 1.3 or newer") — gets a cryptic module error in every Solid-JSX package and no usable test verdict:

SyntaxError: Export named 'jsxDEV' not found in module
'…/node_modules/solid-js/dist/solid.js'

Reproduced in a clean laptop worktree of origin/main (bun install from the lockfile), same tree, three Bun versions:

Bun packages/ui (bun test src) packages/session-ui packages/app (test:unit)
1.4.2 (pinned) 156 pass / 0 fail — —
1.4.3 src/context/i18n.test.ts: 1 fail / 1 error (jsxDEV) — —
1.4.4 3 files error (i18n, scroll-view, segmented-control), 124 pass / 3 fail 1 file errors (markdown-solid.test.tsx), 247 pass / 1 fail 35 errors, all jsxDEV

Non-Solid suites are unaffected on 1.4.4 (ai 1933 pass, tui 1521 pass, codemode 1418 pass, core-adjacent packages green) — the break is specific to test files whose import graph pulls in .tsx compiled against solid-js.

Root cause (as far as verified)

  • Bun ≥1.4.3's test transpiler emits jsxDEV imports (solid-js/jsx-dev-runtime) for JSX in test-loaded modules.
  • solid-js@1.9.15's package.json exports map ./jsx-dev-runtime to ./dist/solid.js — the production build, which does not export jsxDEV (the dev build dist/dev.js, which does, is only reachable via the development export condition). The repo's own patches/solid-js@1.9.15.patch does not touch this mapping.
  • The affected packages' test scripts (packages/ui/package.json: "test": "bun test src --only-failures", packages/session-ui/package.json: "test": "bun test src --only-failures") set no conditions/preload that would resolve the development build, unlike packages/app's --conditions=solid unit script — and even app's suites fail on 1.4.4, so conditions alone are not the whole story.

Why it matters

  • The documented contributor floor ("1.3 or newer") and the actually-working toolchain (exactly 1.4.2) disagree; the failure mode is a misleading SyntaxError deep in node_modules, not a version check — a new contributor (or a fleet machine whose distro bumps Bun, as this run's laptop did: nix-provided 1.4.4) burns time rediscovering that the toolchain, not the code, is broken, and Solid packages silently lose their local test verdict.
  • The pin is a single point of fragility: the next intentional Bun bump will hit this on day one, in CI, with no prior warning.

Acceptance criteria

  • Decide and implement one direction: (a) make the Solid test suites pass on current Bun (e.g. resolve the development condition / jsx-dev-runtime to the dev build in the affected packages' test setup, or extend the solid-js patch), or (b) enforce the pinned Bun version for local test runs with a clear early error (and correct CONTRIBUTING.md to state the exact pin).
  • Whichever direction: packages/ui, packages/session-ui, and packages/app unit suites run to a real verdict on the Bun version the repo claims to support, verified by running them.
  • CONTRIBUTING.md's Bun requirement matches reality after the change.
  • No regression on the pinned toolchain: the same suites still pass under bun@1.4.2 / in CI.

Activity

  1. added
    kind/testTest coverage, test infrastructure, or test-only fixes
    kind/ciCI/CD pipelines, workflows, and build automation
    task/triageQueue packet kind: verify, reproduce, and route this item
    source/creatorFiled by the new-issue-creator job
    priority/normalOrdinary priority (the default)
    area/ciCI, workflows, and build infrastructure
    app/appPackage: app (pkgs/ or apps/ in this repo)
    app/session-uiPackage: session-ui (pkgs/ or apps/ in this repo)
    app/uiPackage: ui (pkgs/ or apps/ in this repo)
    effort/sSmall: expected under 2 hours of work
    queue/queuedHas a queued task in the Supabase agent queue
    on Nov 5, 2026
  2. dezren39 commented on Nov 5, 2026

    @dezren39
    Author

    🤖 Agent note · filed

    • Agent: new-issue-creator-opencode
    • Session / ID: cron new-issue-creator-opencode run 2026-11-04 23:35 CST
    • Found via: filed this run
    • Task: Filed this issue after verifying, in a clean laptop worktree of origin/main 561e530, that the Solid test suites pass under the pinned bun@1.4.2 (packages/ui: 156 pass / 0 fail) and break under bun 1.4.3 (jsxDEV error reproduced on a single file) and 1.4.4 (ui 3 files, session-ui 1 file, app test:unit 35 errors — all SyntaxError: Export named 'jsxDEV' not found in module '…/solid-js/dist/solid.js'). Non-Solid suites are green on 1.4.4 (ai 1933, tui 1521, codemode 1418 pass). Root cause as verified: solid-js@1.9.15 maps ./jsx-dev-runtime to the production dist/solid.js, which does not export jsxDEV; CI is unaffected because setup-bun enforces the packageManager pin, but CONTRIBUTING.md:25 documents "Bun 1.3 or newer".
    • Expectation: task/triage — decide direction (make the suites work on current Bun, or enforce the exact pin locally and correct CONTRIBUTING), then implement per the issue's acceptance criteria.
    • Links: evidence in the issue body; body file issue-opencode-bun-143-jsxdev.md and packet packet-opencode-1698.json in the goal's hidden_files.
  3. removed
    queue/queuedHas a queued task in the Supabase agent queue
    on Nov 5, 2026
  4. 4 remaining items

  5. added
    queue/queuedHas a queued task in the Supabase agent queue
    queue/claimedA queue worker has claimed the task for this item
    work/assignedAn agent holds this item via the queue (claimed task)
    and removed
    queue/claimedA queue worker has claimed the task for this item
    work/assignedAn agent holds this item via the queue (claimed task)
    queue/queuedHas a queued task in the Supabase agent queue
    on Nov 5, 2026
  6. developing-today commented on Nov 5, 2026

    @developing-today

    Fix attempt (task 10024, lane opencode-a): direction (a) worked on the laptop under Bun 1.4.4 — NOT landed; task parked with a WIP branch. Evidence:

    Reproduction (worktree ~/git/fleet/10024-1698-solid-bun at main f67f1ae, Bun 1.4.4): packages/ui suite = 124 pass / 3 fail / 3 errors, all Export named 'jsxDEV' not found in module '…/solid-js/dist/solid.js' — the issue's failure, confirmed.

    New finding — install itself is broken on current Bun: bun install under 1.4.4 fails on the committed patch file: failed to parse patchfile: hunk_header_integrity_check_failed at patches/solid-js@1.9.15.patch:25:1 / failed to patch package: solid-js@1.9.15. The patch's package.json hunks are stale (their context does not match the published 1.9.15 package.json). On the WIP branch below, the patch was regenerated with Bun 1.4.4's own bun patch tooling (same cleanNode changes in all six dist files) and it parses and applies cleanly on 1.4.4.

    Why the exports fix alone does not fix the suites: the regenerated patch also retargets the top-level exports["./jsx-dev-runtime"] from ./dist/solid.js to ./dist/dev.js — after which the error just moves (jsxDEV not found in …/dist/dev.js). Root cause, verified by direct reads of the installed package: no solid-js dist build exports jsx or jsxDEV at all (checked dist/solid.js, dist/dev.js, web/dist; the type declarations don't declare them either). Solid's JSX is designed to be compiled by babel-plugin-jsx-dom-expressions into template/createComponent calls, not to call a runtime jsx function. Bun ≥1.4.3's transpiler instead emits React-style automatic-runtime imports (jsxDEV from solid-js/jsx-dev-runtime in dev/test mode; jsx from solid-js/jsx-runtime with NODE_ENV=production) for these jsx: preserve + jsxImportSource: solid-js packages, and neither exists. --conditions=development, --conditions=solid, and NODE_ENV variants were all tried and do not change the outcome. (On the pinned Bun 1.4.2 the suites pass — the transpiler handled Solid JSX differently; a 1.4.2 binary could not be downloaded this shift to diff its output directly, network to the release asset stalled.)

    Remaining avenues, in order:

    1. Direction (a), larger: a bunfig.toml [test] preload Bun.plugin for ui/session-ui/app that compiles .tsx through babel-plugin-jsx-dom-expressions (already in the tree via vite-plugin-solid) so Bun's transpiler never emits the runtime imports. This is a real test-infrastructure change with its own failure modes — it deserves a design pass, not a bundle-shift landing.
    2. Direction (b) per the triage fallback: enforce the exact pin locally and correct CONTRIBUTING.md.
    3. Land the patch regeneration on its own merits: even under direction (b), the committed patch file failing bun install on current Bun is a separable defect; the WIP branch is the fix for it.

    WIP branch: queue/10024-1698-solid-bun @ 2fe59ba (regenerated patch + package.json patchedDependencies re-registration; committed and pushed, no PR — it does not fix the suites by itself). Laptop worktree: ~/git/fleet/10024-1698-solid-bun. Task 10024 is parked (not_before 2026-11-06T21:00:00Z) with this brief.

    Parked by: lane opencode-a, task 10024 — direction (a) evidence recorded; plugin-preload design or direction (b) next

  7. added
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    and removed
    queue/claimedA queue worker has claimed the task for this item
    on Nov 5, 2026
  8. developing-today commented on Nov 5, 2026

    @developing-today

    Build evidence from the #1727 verification (queue task 10747, 2026-11-05), relevant to this issue's WIP branch queue/10024-1698-solid-bun:

    • The branch now also carries the x86_64-linux node_modules FOD hash update (commit 57db6c3): the regenerated patch changes the installed tree, so nix/hashes.json moved to the measured sha256-an3N7lQpFOD87KexYQysb8cpU6YiQYlNZ6IZ5e6IkSo= (the aarch64 hashes still need the same regeneration).
    • With that, nix build .#packages.x86_64-linux.opencode SUCCEEDS from the branch on the laptop (Bun 1.4.4): /nix/store/k938cnzzqka9nkf3pkvfg3w10brkm928-opencode-2.0.30+57db6c3. On current main the same build fails in the node_modules derivation on the stale patch, so the patch regeneration is load-bearing for the packaged build, not only for the Solid test suites.
    • One caution from the same session: the first build attempt's sandbox bun install stalled ~20 minutes with ~12s CPU (no sockets open); a retry completed normally. Treat a single stalled FOD install as retry-worthy, not as a branch defect.

    Noted by: lane opencode-a, task 10747

  9. added a commit that references this issue on Nov 5, 2026
  10. developing-today commented on Nov 5, 2026

    @developing-today

    Brief update for the parked task 10024 (2026-11-05, lane opencode-a): the WIP branch queue/10024-1698-solid-bun has now MERGED as PR #1783 (for the nix-hashes CI failure #1782). The install-parse defect is fixed on main: the regenerated solid-js patch parses/applies on Bun 1.4.4, bun install completes, and the packaged build succeeds. What remains for #1698 is only the original suite question: the Solid suites still hit the jsxDEV/jsx export problem at test time (the additive ./jsx-dev-runtime exports entry rode along in the regenerated patch, but that alone did not make the suites pass in the earlier reproduction). Remaining avenues from the earlier evidence note still stand: (a) a bunfig [test] preload Bun.plugin compiling .tsx via babel-plugin-jsx-dom-expressions, or (b) pin enforcement + CONTRIBUTING correction — a direction decision is Drew's if (a) stalls.

    Noted by: lane opencode-a, task 10789

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    app/appPackage: app (pkgs/ or apps/ in this repo)app/session-uiPackage: session-ui (pkgs/ or apps/ in this repo)app/uiPackage: ui (pkgs/ or apps/ in this repo)area/ciCI, workflows, and build infrastructureeffort/sSmall: expected under 2 hours of workkind/ciCI/CD pipelines, workflows, and build automationkind/testTest coverage, test infrastructure, or test-only fixespriority/normalOrdinary priority (the default)queue/parkedQueue task is parked (waiting on CI, time, or an event)source/creatorFiled by the new-issue-creator jobstatus/in-progressActively being workedtask/triageQueue packet kind: verify, reproduce, and route this itemwork/assignedAn agent holds this item via the queue (claimed task)

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions