chore: use native runtime conditions in development - #46644
Merged
Conversation
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Type of change
What does this PR do?
Removes the global
--conditions=browserflag from CLI dev scripts and subprocess test launchers. With Bun 1.3.14, the flag mixes Smithy's Node UTF-8 implementation with browser exports, causing Bedrock streaming to fail withTypeError: utilBufferFrom.fromArrayBuffer is not a function(the resolved value is a Symbol).OpenTUI's existing preload already supplies reactive Solid core/store implementations. Update the backend/debug command examples to match. Actual browser tests retain their browser condition. The session view is unchanged; the separate
Dynamicimport cleanup is in #46649.This follows the production-build fix in #30873 (June 5, 2026), which removed
browserfor the same Smithy Symbol failure. #31566 subsequently addedbunalongsidenode. The build condition was never restored tobrowserindevhistory; the dev scripts retained their original flags throughout.This is independent of the SDK bump in #45520. The regression reproduces with the current
devdependency, Bedrock 4.0.158. No dependency, lockfile, provider-option, or build-setting changes are included; production builds already usebun/nodeconditions.How did you verify your code works?
packages/opencode:bun test test/cli test/provider/amazon-bedrock.test.ts --timeout 30000 --only-failures: 389 passed, 5 skipped, 0 failed.bun typecheckpasses inpackages/opencode.git diff --checkpass.No new tests or fixtures. Existing CLI suites exercise real subprocess entrypoints. Verified locally on macOS ARM64 with Bun 1.3.14; interactive TUI behavior and arbitrary third-party plugins were not exhaustively verified.
Checklist