Skip to content

[Task] Track upstream sync after opencode 17701628bd #477

@Astro-Han

Description

@Astro-Han

Goal

Track which upstream opencode changes after 17701628bd PawWork should absorb, manually port, defer, or skip. This is the followup intake after #209, whose scope was frozen at 17701628bd.

The immediate goal is not to cherry-pick code. First produce a read-only sync tracker that prevents provider-specific or runtime fixes from being missed.

Source range

  • Previous PawWork upstream intake boundary: 17701628bd4370067a1e2613043a9da14f8e302f
  • Current upstream head checked on 2026-05-06: aa3c99a3c0a609ea4dd485355627e3161251584a
  • Upstream refs checked:
    • anomalyco/opencode dev
    • sst/opencode dev
  • Note: local upstream/dev may be stale if its fetch refspec does not update the branch ref. Verify with git ls-remote or the sst/dev remote ref before making decisions.

Scope

In scope:

  • Build a read-only tracker table for upstream PRs/commits after 17701628bd.
  • Mark each item as one of: already absorbed, take, manual port, defer, or skip.
  • Separate provider/runtime fixes from Effect/HttpApi migration work.
  • Identify which items require local patch-id or file-content verification.
  • Define the smallest safe PR sequence for followup implementation.

Out of scope for this issue body:

  • Directly cherry-picking code before the tracker is complete.
  • Pulling upstream app/UI/desktop package restructures wholesale.
  • Switching PawWork to the native HttpApi listener before parity tests pass.
  • Importing upstream repo governance, VOUCHED, release, Nix, docs-site, or CI-policy churn unless a PawWork dependency is proven.

Initial buckets

Provider/runtime hotfixes to audit first

These are high-risk if missed because they can cause provider-specific request failures, silent option drops, poisoned sessions, or retry gaps.

Runtime/session/tool safety fixes

Desktop/app manual review

Manual port only. Do not import upstream desktop package consolidation wholesale.

Effect foundation

PawWork already has partial Effect adoption, so this should continue, but as migration slices rather than scattered bug picks.

  • InstanceStore / InstanceBootstrap service migration
  • ConfigProvider lifecycle per listener / instance
  • Instance and Workspace context propagation
  • Plugin agent bootstrap regression fixes
  • effectCmd CLI migration and followup regression fixes
  • Tests using PawWork's testEffect(...), it.live(...), and tmpdir instance helpers

Known upstream followup fixes that must not be lost if taking this line:

HttpApi migration

Do not switch the production listener until parity is proven. Treat this as a staged migration.

  • Route inventory parity
  • Request body, query, header, status, and JSON shape parity
  • OpenAPI/schema parity, including optional/null fields and v2 session response encoding
  • Basic auth and browser login parity
  • Provider OAuth and MCP OAuth parity
  • SSE event stream parity
  • PTY websocket parity
  • Workspace routing and proxy HTTP/WS parity
  • CORS/CSP review for PawWork renderer origin
  • Native listener switch only after parity is green and a fallback exists

Suggested implementation sequence

  1. Provider-specific and auth hotfix PR.
  2. Runtime/session/tool safety PR.
  3. Desktop/app critical runtime manual-port PR.
  4. Effect foundation PRs: InstanceStore, InstanceBootstrap, ConfigProvider, context propagation, known regression fixes.
  5. HttpApi parity tests and disabled-backend parity fixes.
  6. effectCmd / CLI migration PRs.
  7. Native HttpApi listener and OpenAPI source switch, last.

Tracker rules

  • Start read-only: use git cherry -v, git patch-id, git show, git diff, and gh pr view before changing code.
  • Do not mark an upstream item as missing until local patch-id and file-content checks agree.
  • Provider-specific fixes need stub-provider regression coverage where practical.
  • If a change is already absorbed under a PawWork-local commit, record the PawWork commit.
  • Use Refs #ISSUE or Part of #ISSUE from implementation PRs. Do not close this tracker until all accepted slices are completed or explicitly deferred.

Verification expectations for followup PRs

  • Provider matrix tests for OpenAI-compatible, DeepSeek, Anthropic SDK, Azure OpenAI, Bedrock, Moonshot/Kimi, Mistral, Copilot, Cloudflare AI Gateway, and generic retry/unicode/image-tool-result cases.
  • Focused session/tool tests for cancellation, task child session cleanup, compaction, MCP URL handling, read offset, and patch boundaries.
  • Desktop manual verification for settings dialog non-interruption, proxy/certificate behavior where practical, IPC/logging changes, and packaged watcher dependency behavior.
  • HttpApi parity tests before any listener switch.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1High prioritytaskMaintainer or agent execution taskupstreamTracked upstream or vendor behavior

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions