Skip to content

chore: sync upstream dev through 62e4641235#9

Merged
LogicLyra merged 10 commits into
mainfrom
sync-upstream-compat
Jul 23, 2026
Merged

chore: sync upstream dev through 62e4641235#9
LogicLyra merged 10 commits into
mainfrom
sync-upstream-compat

Conversation

@LogicLyra

Copy link
Copy Markdown
Owner

Summary

  • Sync upstream dev through 62e4641235d7847dadc60da37cca8a023dd54fc1.
  • Preserve all OpenCode Classic identity, updater, installer, publisher, and
    fork-only push invariants.
  • Corrective commit: none.

Review

Scope

The 9 incoming commits add:

Fork overlap files auto-merged without conflict. The fork's isolated sidecar
env, desktop health-check, and dependency version changes are in different code
regions from the upstream additions.

Validation

  • Workstation control: ancestry verified (FORK and UPSTREAM are both
    ancestors of candidate), clean tree, diff-check passed (only upstream's
    patch file has trailing-whitespace warnings), remote main unchanged.
  • VM package gate: linux-ci-20260723T150932Z-0545e2a64f-package2, result
    PASS (all 10 stages: environment, static, dependencies, focused,
    typecheck, lint, broad-tests [208 httpapi pass/0 fail], builds, desktop-build,
    package-linux).
  • Lockfile resolution: storybook-solidjs-vite@10.1.1 and storybook@10.4.1
    preserved; Storybook build passes. An initial candidate with a full lockfile
    regeneration resolved to 10.6.0/10.5.2, which failed Storybook build
    (Could not detect Solid version — a Bun workspace resolution bug in the
    newer storybook-solidjs-vite). Resolved by preserving the fork's lockfile as
    base and incrementally adding upstream's new dependencies.
  • Identity verification: deb package opencode-classic v1.18.4, maintainer
    LogicLyra, no AppImage.
  • Runtime visual gate: blocked by VM infrastructure (same AVX limitation as
    prior PRs; QEMU CPU version 2.5+ has no AVX, Electron 42.3.3 GPU SIGILL).
    Changed files are server protocol logic, provider transforms, and docs — no
    Electron/GPU initialization impact. Not a code defect.
  • Artifacts:
    • opencode-classic-desktop-linux-amd64.deb (127 MB)
    • opencode-classic-desktop-linux-x86_64.rpm (109 MB)
    • latest-linux.yml
  • Expected warnings: No published versions on GitHub (expected before first
    stable release); bun audit 9 pre-existing transitive-dep CVEs (tar,
    brace-expansion, sharp, fast-uri, axios, js-yaml) in build/docs tooling,
    identical to prior PRs, treated as advisory-only.
  • Untested/deferred: RPM-native installation (Ubuntu-only VM), macOS, Windows,
    runtime visual gate (VM AVX limitation).

No tag, release, publication, direct main push, or write to the official
upstream repository occurred. Please review and merge this PR on GitHub using
a merge commit.

@github-actions

Copy link
Copy Markdown

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@github-actions

Copy link
Copy Markdown

This PR doesn't fully meet our contributing guidelines and PR template.

What needs to be fixed:

  • PR description is missing required template sections. Please use the PR template.

Please edit this PR description to address the above within 2 hours, or it will be automatically closed.

If you believe this was flagged incorrectly, please let a maintainer know.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0545e2a64f

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +418 to +423
api: createCompatibleApi({
protocol: serverSDK.protocol,
current: serverSDK.currentApi,
legacy: (next) => serverSDK.createClient({ directory: next ?? directory, throwOnError: true }),
directory,
}),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Route existing SDK calls through the compatibility layer

When the detected protocol is v2, this adds a compatible api beside the existing SDK, but the existing client/createClient surface remains the legacy @opencode-ai/sdk client that current app code already uses. Call sites such as prompt submission (sdk().client.session.promptAsync) and session bootstrap (serverSDK.client.session.list) do not read this new api property, so a v2-only server still receives legacy /session/... requests instead of /api/..., preventing sessions from being loaded or prompted unless those callers are migrated or the exposed client is made compatible.

Useful? React with 👍 / 👎.

return { id: event.id, type: "question.replied", properties: event.data, current: event } as ServerEvent
if (event.type === "question.v2.rejected")
return { id: event.id, type: "question.rejected", properties: event.data, current: event } as ServerEvent
return { id: event.id, type: event.type, properties: event.data, current: event } as ServerEvent

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Convert current deltas before emitting them

For the v2 event stream, current events like session.text.delta, session.reasoning.delta, and session.tool.input.delta are emitted with those same type names here. The downstream session reducers only apply the legacy message.part.delta/message.part.updated shapes, and the coalescer still emits the unhandled session.*.delta type after concatenating, so live streamed text/reasoning/tool input from v2 servers is dropped until some later full snapshot or reload. Map these current delta events to the legacy part-delta/update shape or add reducer handlers before emitting them.

Useful? React with 👍 / 👎.

Comment on lines +31 to +33
const current = await probe(server, fetch, "/api/health").catch(() => undefined)
if (current && "pid" in current && typeof current.pid === "number") return "v2"
if (current && "healthy" in current && current.healthy === true) return "v1"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Treat pid-less /api/health responses as v2

When /global/health is unavailable, a v2 server generated from this repo's Protocol currently answers /api/health with just { healthy: true } (packages/protocol/src/groups/health.ts defines no pid), but this probe classifies that exact response as v1. That sends the new event transport and compatibility layer down the legacy endpoint path against current servers, so recognize a successful /api/health response as v2 or use another discriminator that matches the actual schema.

Useful? React with 👍 / 👎.

return { id: event.id, type: "question.replied", properties: event.data, current: event } as ServerEvent
if (event.type === "question.v2.rejected")
return { id: event.id, type: "question.rejected", properties: event.data, current: event } as ServerEvent
return { id: event.id, type: event.type, properties: event.data, current: event } as ServerEvent

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Adapt v2 session deletion payloads before dispatch

When the current event stream emits the v2 session.deleted event, its payload can be just { sessionID } rather than the legacy { info } shape. Passing it through unchanged makes the existing session reducers read properties.info.id, so deleting a session from a v2 server can throw during event handling instead of removing it from the UI; translate this event to the legacy shape or update the reducers before dispatching it.

Useful? React with 👍 / 👎.

@LogicLyra
LogicLyra merged commit 1aff781 into main Jul 23, 2026
10 of 15 checks passed
@LogicLyra
LogicLyra deleted the sync-upstream-compat branch July 23, 2026 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants