Rebase fork patches onto upstream v1.17.14

Draft
KE
3mo ago
+1651-106

Stacked on #15 (pure upstream v1.17.14). This PR's diff is exactly the fork surface on the new base: 56 files, +1,651/−106 — review happens here. Landing sequence lives in #15 (merge this into base/v1.17.14, then git push origin rebase-1.17.14:dev --force-with-lease; never UI-merge #15).

Rebase the full fork patch stack onto upstream v1.17.14, resetting the release line from 1.17.9-N to 1.17.14-N. The motivating upstream feature is code mode (opt-in, ships dark — enabling it is a separate config decision downstream).

Context: the fork actually branched from upstream at 355a0bcf (18 commits before upstream's real v1.17.9 tag), with 2 fork commits sitting below our v1.17.9 tag — so the replay range was 355a0bcf..dev (27 commits), not the tag range. All 27 commits replayed; conflict resolutions were unions of our patches with upstream's 1.17.10–1.17.14 changes:

  • event.ts: upstream moved server events to @opencode-ai/schema/server-event; our global.reloaded event now composes { ...ServerEvent, Reloaded } via the schema package's Event.define (non-durable, stays out of durable manifests).
  • httpapi/server.ts: upstream replaced LayerNode.buildLayer with AppNodeBuilderV1.build at the app-layer call site; the shared appLayer export (per-listener memoMap singleton sharing for SIGHUP reload) adopts the new API.
  • mcp/index.ts: upstream added per-server instructions tracking in the exact spots our headers tracking lives; state/interfaces/call sites carry both.
  • processor.ts: upstream deleted the v2 dual-write blocks our TTFT stamps were anchored to; stamps re-anchored to the new reasoning-start/text-start cases.
  • run.ts: upstream's new CLI call site used Filesystem.stat, which our REPL-28760 patch renamed to statSync; adapted (one-shot CLI path, sync acceptable).
  • Tests: migrated fork tests to the LayerNode composition idiom (mirrors upstream siblings); REPL-30054 quarantine carried onto the rewritten v2-location test — worth re-checking whether it still flakes on this base.

Verification (all with repo-pinned bun 1.3.14):

  • tsgo --noEmit clean; repo-wide bun typecheck green (pre-push hook).
  • 176 tests green across every fork-touched test file, including the serve SIGHUP lifecycle subprocess tests.
  • Note: bun 1.3.9 has a signal-handover regression (process.off drops the native SIGHUP hook while another listener remains → serve dies on HUP; 10-line repro, fails identically on unrebased dev). The packageManager 1.3.14 pin covers it; release builds must use ≥1.3.14 so the compiled binary embeds a good runtime.

Release plan after merge: cut v1.17.14-1 (--latest), then bump the two andytown pins (Dockerfile OPENCODE_VERSION + sandbox-upgrader curlInstall). A v1.17.14-pr<N> prerelease from this branch goes to one experiment sandbox first.

🤖 Generated with Claude Code


Summary by cubic

Rebased the fork onto upstream v1.17.14 and reset the release line to 1.17.14-N. Adds fork CI and a focused app performance suite to keep the fork green and catch timeline regressions.

  • New Features

    • Fork CI: new fork-ci workflow runs typecheck and tests on GitHub-hosted runners using setup-bun (with Node 24).
    • Performance suite: adds timeline stability tests and navigation/repaint benchmarks with Chrome trace utilities under packages/app/e2e/performance (opt-in; run via repo scripts).
    • Upstream code-mode base is now available (opt-in via downstream config).
  • Refactors

    • Rebase adaptations: events now use @opencode-ai/schema definitions, app builds via AppNodeBuilderV1, MCP tracks instructions alongside headers, TTFT stamps re-anchored to new stream cases, CLI stat call updated; migrated tests to the LayerNode composition idiom.
    • CI/tooling: skip bots/team in triage/duplicate issue automations, increase desktop build memory, include packages/session-ui in Storybook, add generated client check in packages/client, ignore generated code in Prettier, relax Bun check in Nix.
    • Infra/packaging: add SUPPORT_API_KEY secret, extend stats schema with model and model_tier, require version tags with a patch suffix in install, and document manual release flow in RELEASING.md.