Skip to content

chore(sync): merge upstream v2 through v2.0.28 - #447

Merged
shuv1337 merged 1504 commits into
integration-v2from
sync-upstream-v228
Oct 13, 2026
Merged

shuv1337 merged 1504 commits into
integration-v2from
sync-upstream-v228

Conversation

@shuv1337

Copy link
Copy Markdown
Owner

Summary

Syncs integration-v2 (cacea1fc5014feca6d51a88b2faa4ab5fc5b4f0d, v2.0.26-shuv.1) with upstream OpenCode V2 through v2.0.28 (c5aabae288de2614c94eb00446bd07b10097f179, sync release versions for v2.0.28 [skip ci]), bumping the Shuvcode CLI version to 2.0.28-shuv.1.

Upstream V2 Topology Note

Upstream promoted v2 into dev in 5caf1f9f6f5f30e13fc50a788ad953d97ae3748f (chore: promote v2 to dev), after which upstream/v2 stopped at 4617210822bdbb31e5749751afbfb4584ccedac8 (2.0.26) and V2 releases v2.0.27 and v2.0.28 were cut from upstream/dev. Following the pattern of PRs #436, #443, and #444, this PR merges the v2.0.28 version-sync commit c5aabae288de2614c94eb00446bd07b10097f179 (8059cdcbdf17bd4b7d48e934f18275288b8eaab4..c5aabae288de2614c94eb00446bd07b10097f179, 199 upstream commits).


Pre-Sync Unmerged Fork Branch Inventory & Dispositions

Refreshed origin (git fetch --prune origin) and inventoried all unmerged local and origin/* branches against origin/integration-v2 (cacea1fc50):

  1. Intentionally open and preserved across sync:
  2. Already landed by equivalent changes on integration-v2 (squash/rebased PRs):
  3. Obsolete work with recorded decision (left untouched):
    • Pre-rewrite (2026-09-15 L0 cutover) V2 branches, backups, and legacy V1 refs.
    • No missing fixes required reconciliation prior to sync.

Conflict Resolutions & Regenerations

  • GitHub Workflows & Postinstall: Kept fork's .github/workflows/{publish,test,typecheck,notify-discord}.yml; omitted upstream-only deployment/nix workflows (check.yml, deploy*.yml, nix*.yml) and packages/cli/script/postinstall.mjs.
  • Effect 4.0.1 Upgrade (1aae67e853):
    • Updated packages/cli/src/commands/commands.ts and packages/cli/src/services/server-flags.ts to effect/cli (Flag.Boolean, Flag.String, Argument.String, GlobalFlag.Setting, etc.) while preserving fork global --standalone / --server flags (connectionFlags: "unsupported" on non-client commands) and shuvcode CLI descriptions.
    • Updated packages/cli/src/services/updater.ts, packages/cli/test/updater-install.test.ts, packages/ai/test/provider/mistral-chat.test.ts, and packages/core/test/tool-jev.test.ts imports from effect/unstable/{process,http} to effect/{process,http}.
  • Remote Pairing Consent & ShuvTunnel (packages/cli/src/commands/handlers/pair.ts, packages/cli/src/services/service-config.ts):
    • Integrated upstream's first-run pair --remote consent prompt and --yes (-y) flag with Shuvcode / shuvcode pair wording and ShuvTunnel RemoteTunnel.route(), preserving remoteAccepted: true in disableRemote().
  • Updater & Retained Image (packages/cli/src/services/updater.ts, packages/cli/src/services/retained-image.ts):
    • Kept fork's shuvcode / shuvcode-node npm-only updater and RetainedImage.installed().
  • Subagent Observer Lifetime & Confirmed Tool Call Recovery (packages/core/src/session/subagent-job.ts, packages/core/src/session/execution/restart.ts):
    • Combined upstream #54072 (SubagentJob.Service / SubagentJob.node / SubagentJob.layer with global context preservation) with fork PR fix(core): recover confirmed subagent calls after provider stream close #437's start(recovery: Recovery, notificationID?: SessionMessage.ID) signature and updated packages/core/test/fixture/subagent-recovery-process.ts and packages/core/test/session-execution.test.ts.
  • Database Migrations & Client Generation:
    • Reconciled packages/core/schema.json (prevIds: ["a53f1d1d-f214-4983-940c-77625e2cb3f2"], id: "5067fae0-90ff-4601-82d7-dd050ea9dc8f") with both subagent_operation and project.time_archived, and regenerated packages/core/src/database/migration.gen.ts (bun script/migration.ts).
    • Regenerated client and OpenAPI specs (bun run generate in packages/client) and updated bun.lock.

Validation

  • bun run check (45 packages typecheck + lint + sdk-docs)
  • git diff --check
  • Focused package tests in packages/cli, packages/core, packages/ai, packages/tui, and packages/script

Made with Cursor

fwang and others added 30 commits September 19, 2026 20:41
Co-authored-by: frank <48937772+joe-ieta@users.noreply.github.com>
Co-authored-by: kernel-oops <300539221+kernel-oops@users.noreply.github.com>
Co-authored-by: rekram1-node <rekram1-node@users.noreply.github.com>
Co-authored-by: Aiden Cline <aidenpcline@gmail.com>
Co-authored-by: rekram1-node <rekram1-node@users.noreply.github.com>
rekram1-node and others added 25 commits October 12, 2026 20:23
…ber 2026 (anomalyco#54987)

Co-authored-by: rekram1-node <rekram1-node@users.noreply.github.com>
…ce (anomalyco#54921)

Co-authored-by: Renato Duarte <renato.duarte@datacamp.com>
Co-authored-by: dc85 <83497+dc85@users.noreply.github.com>
…imeline (anomalyco#54775)

Co-authored-by: Brendonovich <14191578+Brendonovich@users.noreply.github.com>
…nomalyco#54839)

Co-authored-by: Brendonovich <14191578+Brendonovich@users.noreply.github.com>
…o#55052)

Co-authored-by: Brendonovich <14191578+Brendonovich@users.noreply.github.com>
…malyco#54780)

Co-authored-by: Brendonovich <14191578+Brendonovich@users.noreply.github.com>
Co-authored-by: Brendonovich <14191578+Brendonovich@users.noreply.github.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@socket-security

socket-security Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

@shuv1337
shuv1337 marked this pull request as ready for review October 13, 2026 20:02
@shuv1337

Copy link
Copy Markdown
Owner Author

Reviewed b74f65f57261b682f37161f9fb30ae0603f74f37 against base cacea1fc5014feca6d51a88b2faa4ab5fc5b4f0d in detached, isolated worktrees. This is a focused review of the 1,604-file sync: merge conflict resolutions, fork identity, config/provider behavior, database migration, and subagent recovery.

Findings

  1. [P2] Keep machine-wide configuration in the Shuvcode namespace. packages/core/src/config/discovery.ts:29–38 introduces default discovery under /etc/opencode, /Library/Application Support/opencode, and the ai.opencode.managed MDM profile. These defaults are enabled for ordinary config loading, despite Global.app === "shuvcode" and the fork's explicit removal of OpenCode-path fallbacks. On a machine with upstream OpenCode configuration, upgrading Shuvcode now imports that other application's defaults/plugins and potentially its highest-priority file policies. Use fork-specific system-directory/profile identities (keeping opencode.json as the format filename), and add a fork-isolation test. Direct execution confirms the new helper returns OpenCode paths while Global.app is Shuvcode; existing tests currently assert those upstream paths.

  2. [P2] Regenerate the checked-in OpenAPI documents from the merged schema. packages/protocol/openapi.json:14060–14072 drops the fork's experimental.jev property even though the runtime schema and generated TypeScript client retain it. The documents also omit the new Provider.Encoding schema and provider/model encoding fields. All three checked-in copies (packages/protocol/openapi.json, services/www/openapi.json, services/www/public/openapi.json) are identical and stale, leaving spec-generated consumers with an inaccurate API contract. bun script/generate-openapi.ts --check fails on this head and passes on the base; generating into a separate review artifact confirms exactly these omissions. Regenerate all copies and include the freshness check in verification.

  3. [P3] Recognize fork release versions in the highlights gate. packages/tui/src/util/highlights.ts:41–45 accepts only bare x.y.z, whereas publishable Shuvcode versions must be x.y.z-shuv.N. Consequently, even when a release embeds highlights, automatic display and seen-version recording never happen for fork releases. Directly calling decide with history and one highlight returns "show" for 2.0.28 after 2.0.26, but "none" for 2.0.28-shuv.1 after 2.0.26-shuv.1. Handle fork release ordering, including same-upstream shuv.N increments, and cover it in the highlights tests.

Verification

  • Passed: frozen-lockfile dependency installation with lifecycle scripts disabled; canonical bun run check (lint/docs and all 41 executed typecheck tasks); database migration/schema/registry freshness check.
  • Passed focused tests: Core config/migration/project/provider/session-execution/subagent-lifetime selection: 387 pass, 1 skip after rerunning sandbox-blocked cases with filesystem-watcher and temporary loopback access. Additional process-death recovery, subagent tools, Jev, variants, and edit tests: 74 pass. AI provider/encoding/schema tests: 341 pass. CLI pairing/retained-image/updater tests: 26 pass, 7 platform-specific skips. Highlights tests: 4 pass; these do not cover fork version strings.
  • Failed: OpenAPI freshness check, as above. git diff --check reports whitespace in the imported Figma skill and changelog font license; not treated as runtime findings.
  • Verification limit: CLI server-flags.test.ts has 25 failures because its child CLI, launched from a temporary cwd, cannot resolve react/jsx-dev-runtime. The corresponding help smoke test and direct child invocation fail with the same import error on the base commit, so this is not established as a regression from this PR. Full test suites, live provider calls, built binaries, Windows behavior, and live service/tunnel/TUI operation were not validated. No shared service was restarted and no source fixes were made.

…highlights

Co-authored-by: Cursor <cursoragent@cursor.com>
@shuv1337
shuv1337 merged commit 5af2e51 into integration-v2 Oct 13, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.