This repository was archived by the owner on Nov 7, 2026. It is now read-only.
Repository navigation
chore(opencode): sync upstream through the V2 promotion parent - #424
Merged
Merged
Conversation
…co#51538) Co-authored-by: rekram1-node <rekram1-node@users.noreply.github.com>
Co-authored-by: rekram1-node <rekram1-node@users.noreply.github.com>
Cross-compiled darwin binaries ship with an invalid Bun signature, which breaks codesign verification and publisher-based allowlists. Sign them on macOS with the Developer ID certificate and hardened runtime, matching V2, then repack the release zips and publish the signed binaries to npm and Homebrew. Refs anomalyco#46313
Co-authored-by: slickstef11 <stefanavram22@gmail.com>
Co-authored-by: rekram1-node <rekram1-node@users.noreply.github.com>
Verify the first parent of 5caf1f9 and preserve the reviewed clean-V1 cut. Review upstream donors and retain V1 queue, tool execution, asks, usage, SQLite, process, and retention behavior. Merge only the pinned target with --no-ff on fm/oc-v2-sync-394; record the actual range, resolutions, and focused proof. Push only the assigned draft PR; leave the final suite and landing to firstmate.
Author
|
Session ID: unknown |
Merge only 055d95b, the first parent of promotion 5caf1f9, across the 696f41b..055d95b range of 84 upstream commits. Preserve the V1 CLI/server and SessionPrompt owners plus the fork queue, asks, usage, SQLite retry, process-group and retention paths. Keep both .gitignore rules; retain Bun 1.4.4 and Solid 1.9.15 while taking the xAI 3.0.139 patch; keep the native FFF library copy and macOS ad-hoc re-signing. Reconcile the in-range anomalyco#51538 and anomalyco#54207 backports at their existing production owners and retain the stronger fork browser and Copilot replay controls; keep anomalyco#54936 and anomalyco#45383 within the selected cut boundary. nix/hashes.json refresh pending: values come from the FFF native platform validation nix-node-modules job logs (all four systems) once the PR leaves draft. Claude-Session: unknown
brentyates-swx
marked this pull request as ready for review
November 7, 2026 02:56
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Stage 1 of swxtchio/swx-opencode#394. This PR merges only upstream history ending at the first parent of the V2 promotion; runtime promotion and migration qualification remain later stages.
Cut ruling and V1 runtime evidence
Firstmate ruled on 2026-11-06 that the clean-V1 condition is met when this range leaves the V1 runtime in place, even though it updates the existing Core V2 request producer. At target 055d95b,
packages/opencode/src/cli/cmd/serve.tscallsServer.listen; the HTTP session handler importsSessionPrompt,server.tsregistersSessionPrompt.node, andpackages/opencode/src/session/prompt.tsstill ownsSessionPrompt.promptandSessionPrompt.loop. The target also contains the separate CoreSessionRunner.The server/session/V1-entry path-filtered diff shown by the command below touches only
packages/core/src/session/runner/llm.ts,packages/opencode/src/session/llm/request.ts, andpackages/opencode/src/session/message-v2.ts. The broader runtime diff also includespackages/opencode/src/provider/provider.ts, which contains upstream’s timeoutFetch extraction and Cloudflare AI Gateway binding path with header/chunk timeouts; it composes over the fork’swrapSSE. Upstream anomalyco#52370 adds namespaced Session identity headers to the Core and V1 producers, and anomalyco#53549 filters xAI-rejected tool-result image formats. Neither change alters the V1 CLI/server entry points, V1 prompt owner, or Core V1 Session implementation.Dated upstream-history evidence (sampled 2026-11-06)
After
git fetch originandgit fetch upstream refs/heads/dev:refs/remotes/upstream/dev, these commands were run in the task worktree:Donor reconciliation
anomalyco/opencode#51538(b471c2b4495747353af768fbf2e0790c9d820ce2) and#54207(b2a3926e87e35fc7f6308521c4418067cddd5d0e) are in the target range and were backported by fix(opencode): backport small upstream fixes #403. Their production behavior has one owner after the merge; the fork browser test retains completed-exit and acknowledged late-exit cases, and the fork Copilot tests retain stream ordering plus replay coverage.#54936(bbad8f350f977272faf9d5d9fe652b412a153876) is not an ancestor of sampled upstream/devfe2cbf631f88ea882519b54594da9fdfc947c7d0.#45383(d68031bc0d92e7c1bfb7a4ad1e7fa234b1cac756) is in that refreshed upstream/dev history but beyond target 055d95b; it stays fork-side and this PR does not widen the cut.Conflict resolutions
.gitignorekeeps the fork test-scratch ignore and upstream/artifacts/ignore.package.jsonandbun.lockretain fork Bun 1.4.4 and Solid 1.9.15 selections while taking upstream xAI 3.0.139 and its matching patch. The frozen install passed.packages/core/src/session/runner/llm.tsapplies namespaced headers to the provider-turn request and leaves the forksessionHttphelper in place for title and compaction requests.packages/opencode/script/build.tsretains the fork native FFF library copy and upstream macOS ad-hoc re-sign step.packages/core/test/github-copilot/copilot-chat-model.test.tsandpackages/opencode/test/mcp/browser.test.tsretain the more complete fork tests, which cover upstream stream/exit behavior and the fork replay/readiness cases.packages/opencode/test/session/llm.test.tsreplaces the prior parent-only header control with root/child cases for OpenCode and custom providers; the fork Foundry progress controls remain.packages/opencode/test/session/message-v2.test.tsretains existing checks plus upstream xAI request-conversion coverage.packages/opencode/test/cli/run/run-process.test.tskeeps the real child exit-code signal with a live harness deadline.nix/hashes.jsonnow records the four nativenodeModulesoutputs from FFF native platform validation run42331661816at PR head8c6ebf4803b6000c5c607f25f66bac9e774018fb; see the file for exact values confirmed by all four runner logs.Focused verification (Bun 1.4.4)
bun install --frozen-lockfile --ignore-scripts --no-progress: passed, 2,358 packages installed.bun test --timeout 30000 test/session/llm.test.ts -t "sends session identity headers"frompackages/opencode: 4 passed, 39 filtered, 18 expectations. Removing the session header made all four fail; removing the parent header made both child cases fail.bun test --timeout 30000 test/session/message-v2.test.ts -t "drops tool-result images xai rejects but keeps png and webp"frompackages/opencode: 1 passed, 42 filtered, 3 expectations. Removing the filter made the producer request containimage/gifand the regression fail.bun test --timeout 30000 test/mcp/browser.test.ts -t "browser launcher"frompackages/opencode: 3 passed. Copilot: theinterleavedselection incopilot-chat-model.test.tspassed 3 cases; theinterleaved reasoningselection inconvert-to-copilot-messages.test.tspassed 1.bun test --timeout 30000 test/cli/run/run-process.test.ts -t "exits nonzero without hanging when the model is unknown"frompackages/opencode: 1 passed. Three focused provider header/chunk timeout cases and the OpenAI ultrafast service-tier case each passed. Console marketing, stats-app format/catalog, and stats-core catalog/home/inference focused cases passed.bun script/changeset-check.tswith PR chore(opencode): sync upstream through the V2 promotion parent #424 metadata:ok: #424 is recorded./home/byates/fm-llmrouter/bin/fm-commit-identity-check.sh --crew .: passed. This repository has nobin/fm-lint.sh.One initial xAI focused invocation omitted the package-configured 30-second timeout and hit Bun's 5-second default; rerunning with
--timeout 30000passed. No timeout or assertion was loosened.Whole-file tests awaiting Firstmate after review convergence
Run from each package directory, once against the converged pre-ready head:
packages/console/app:bun test test/consoleMarketing.test.tspackages/core:bun test test/session-runner.test.tspackages/opencode:bun test --timeout 30000 test/cli/run/run-process.test.ts;bun test --timeout 30000 test/provider/header-timeout.test.ts;bun test --timeout 30000 test/provider/openai.test.ts;bun test --timeout 30000 test/session/llm.test.ts;bun test --timeout 30000 test/session/message-v2.test.tspackages/stats/app:bun test test/agent-formats.test.ts;bun test test/model-catalog.test.tspackages/stats/core:bun test src/domain/catalog-identity.test.ts;bun test src/domain/home.test.ts;bun test src/domain/inference.test.tsPR CI owns typecheck. Firstmate owns the full
./tests/run.shpost-convergence gate through/home/byates/fm-llmrouter/bin/fm-final-suite.sh oc-v2-sync-394 <immutable-merge-head> --full. The PR remains a draft onfm/oc-v2-sync-394and targetsswxtch.