Skip to content

Sync upstream 337c5858c3 into coder-only (two stages) - #307

Merged
henrychu04 merged 382 commits into
coder-onlyfrom
t3code/sync-upstream-337c5858c3
Nov 5, 2026
Merged

henrychu04 merged 382 commits into
coder-onlyfrom
t3code/sync-upstream-337c5858c3

Conversation

@henrychu04

Copy link
Copy Markdown
Owner

Syncs upstream pingdotgg/t3code main into coder-only in two stages, as two merge commits plus two adaptation commits.

Range

Cut

Carried

Effect-rule diagnostics after the tsgo switch

  • Upstream files: no new suppressions. Each flagged fork seam line was rewritten in upstream's style, for example Effect.fn, tryPromise({ try, catch }) with a Schema.TaggedError, Schema.is, Clock, SecureRandom, HostProcess.Environment, and Effect.forEach.
  • Fork-only files: the mechanical fixes were applied:
    • Schema.TaggedError (FileBridgeToolFailure, PastedImageAttachments, CoderWorkspaceResourceUsageError);
    • typed Effect.try / Schema.fromJsonString;
    • HostProcess.Environment in coderEnvironment.ts and coder-helper/helper.ts (which gains a @t3tools/shared workspace dependency);
    • Effect.fn across coderWs.ts, coderHub.ts, T3ToolBridge.ts, and T3ToolDispatch.ts (this re-indents coderWs.ts's makeHandlers);
    • Effect.orElseSucceed / Effect.ignoreCause / Effect.undefined.
  • 63 suppressions remain, all in fork-only files, each with a specific reason. None are config-level downgrades.
Rule Count Files
nodeBuiltinImport 11 gateway assetProxy, assetProxy.test, bin, connectionShutdown.test; coder-helper build; server coderAssets (1 line), FileBridge.test, T3ToolBridge.test, configMetadata.test, storageCleanup.coder.test (1 line); scripts/build-info
globalDate 10 gateway assetProxy.test, coderCommands, hub.test, rpcBridge.test, workspaceConnections; server coderAssets (2 lines), FileBridge; client-runtime errors/diagnostics (1 line); coder-cli transfer.test
globalTimers 10 gateway assetProxy.test, hub.test, rpcBridge.test; coder-helper bundle.test; server coderAssets (1 line), FileBridge.test, FileBridge, ClaudeCli.test (1 line); coder-cli helperConnection.test, helperConnection
extendsNativeError 9 (lines) gateway configChanges, lifecycleState, process, rpcBridge ×2; coder-cli helperConnection, portForward, processTermination, transfer (callers instanceof and render .message at the HTTP boundary)
anyUnknownInErrorContext 8 gateway bin, connectionShutdown.test, portForwards, server, server.test, testUtils/gateway, workspaceConnections; server T3ToolBridge (1 line)
globalErrorInEffectFailure 4 gateway coderCommands, portForwards, server, workspaceConnections
unknownInEffectCatch 3 gateway server, testUtils/gateway, workspaceConnections
globalFetch 2 gateway assetProxy.test, connectionShutdown.test (the tests act as the browser)
globalJsonInEffect 2 gateway coderCommands (coder CLI JSON); coder-cli helperConnection (RPC frames)
deterministicKeys 2 (lines) server coderEnvironment, coderSecretResolver (they keep upstream's service keys)
globalErrorInEffectCatch 1 gateway server
tryCatchInEffectGen 1 (line) coder-cli processTermination

Entries without "(line)" are file-level directives.

Seams changed (docs/internals/coder-only.md)

  • New:
    • thread links on the gateway origin, with threadLinks.ts' local DEFAULT_HOSTED_APP_URL;
    • the settingsClient constant;
    • CodexAdapterV2's codexUsageLimitResetAt without CodexManagedErrors;
    • Kiro's dormant provider-acp flavor hooks;
    • the terminal-link check cut;
    • maintainerEditsChoiceInForce unexported;
    • supervisor.ts without fix(client-runtime): connect to the primary environment while the browser reports offline pingdotgg/t3code#29347's offline exemption or learned-route lease;
    • auth keeps PayloadSigner;
    • no agent preview recordings;
    • resolveRuntimeModeOptions without policy;
    • the TypeScript/tsgo bullet rewritten to list only the remaining differences;
    • the redis ignoreMissing entry;
    • the Claude CLI method list;
    • new test adaptations.
  • Dropped: the review top-level sourceKind seam (GitVcsDriverCore and DiffPanel), because upstream now has it (8b44f42 / fix(web): load selected diff metadata before file patches pingdotgg/t3code#30567).
  • GitLabCli "checked against" moved to 337c5858c3; the fixes are still absent upstream.

Checks

  • pnpm test:coder: passes on the head (exit 0): gateway/helper/coder-cli node tests 121/121, server 4006 (1 skipped), web unit 1168 and browser 555, client-runtime 1101, shared 3992, providers, source control, and knip.
  • Fixes made along the way:
    • Upstream test cases that exercise cut surfaces were adapted with Coder: notes: GitHub/Bitbucket registry rows, the preview-recording id, the secret-request metric count, the offline query store step, the terminal-link metadata case, and the Antigravity runtime-mode case.
    • The fork-only Kilo bridge test now turns on protocol logging, which perf(acp): ACP agents skip decoding output twice for unused diagnostics pingdotgg/t3code#29100 stopped enabling by default.
    • A fork-adapted video offset was wrong; it now matches the shorter GitLab URL.
    • ClaudeCapabilitiesProbe spies on the CLI transport.
    • ThreadServersPanel's browser test mocks useCoder.
  • Typechecks: every one listed in AGENTS.md passes under effect-tsgo tsrs.
  • Formatting and lint-style checks: pnpm knip:check passes, after two upstream exports only cut code uses were added to ignoreIssues (PayloadSigner.ts, socketFrameParts.ts). vp fmt --check over the changed files passes. seams-check passes, no .orig/.rej files are tracked, and ls patches matches patchedDependencies.
  • pnpm build: passes.
  • sync-check: markers changes are all new seams or the dropped sourceKind seam.
    • lost: 484 lines in stage 1 and 127 in stage 2. All are cut surfaces (Kiro fixtures and registration, peer HTTP links, usage analytics, secret-provider readers, managed policy, preview recordings, the terminal-link check, cloud keys, relay/DPoP, the socket frame route) or existing seams (metrics, Codex managed errors, lastErrorCode, the Claude fork/settings seams, the HTTP routes).
    • both-sides: only the intended seam rewrites remain, plus the removed timingSafeEqualBase64Url that no carried code calls.
    • unused-locals: clean.
  • Section 5 checks:
    • Claude transport: the new title option and the mcpServerStatus/readMcpResource/raw calls are all mapped.
    • Node: engines.node stays ^24.13.1 and @types/node stays on 24.
    • MCP: no new MCP server paths.
    • RPCs: WsSourceControlStarRpc is omitted (cut); WsOrchestrationV2GetThreadTitlesRpc is served.
    • Scopes: there are new scope reads, but the fork's scopes always grant.
    • Wording: clean.

Live smoke

  • GitLab MR flows, against scripts/coder-pr-smoke.mjs (the local helper with the fake glab): MR list, detail, diff, comment, title update, activity, and a re-read showing the new title all passed over the gateway RPC. The new /threads/… route is served.
  • Real Coder workspace, through the fresh scripts/coder-live-test.mjs harness on Coder 2.34.5:
    • a fake kilo acp turn found the file-bridge command in its prompt;
    • --list included t3_queue, and t3_queue returned {"items":[],…};
    • t3_attachment_prepare_upload stored a workspace file;
    • t3_thread_send_attachments started a new turn with it, and the attachment appears in the thread projection;
    • a cross-origin connect is refused with 403.
  • Not run: a real Claude turn (no Claude CLI in the harness image) and a browser UI check.

Open questions

  1. @effect/tsgo ships platform-native binaries through optional dependencies: @effect/tsgo-win32-x64 on the work laptop, containing tsrs, a patched tsc, and oxlint artifacts, about 100 MB. Please confirm they run there. The Microsoft TypeScript 7 they replace also installed native @typescript/typescript-win32-x64 binaries, but those are Microsoft-signed.
  2. .vscode/tsdk/tsgo is a tracked shell script with no .sh extension. The work download scanner keyed on .sh files last time; this file may still trip it. Upstream's .vscode/settings.json and extensions.json are not carried, so the script is only useful if you point VS Code at it yourself.
  3. Kiro's dormant code in shared provider-acp. I kept upstream's generic flavor hooks (steering, fork from turn, compactSession, cancelAfterPromptStarts, ignoreSessionUpdate, configOptionChanges) and runtimeModel.ts's Kiro tool-name parsing, the same way as mcpOverAcpBridge.ts. Cutting them would add many seams to adapter.ts. Say if you want them cut.
  4. Copied thread links point at the gateway's loopback origin. They are useful only on the same laptop. The alternative is to cut feat(server,web,mobile,desktop): Copy thread copies a link that opens the thread pingdotgg/t3code#26290's link and keep the t3-thread:// chips.
  5. The fork-only re-indents (coderWs.ts's Effect.fn and ProviderSessionManager's release Effect.fnUntraced) grow diffs in files that conflict often.

🤖 Generated with Claude Code

UtkarshUsername and others added 30 commits November 3, 2026 10:27
…arent's turn (pingdotgg#29752)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…and longer fences (pingdotgg#29755)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…ts or subagents (pingdotgg#29917)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
… without raw provider text (pingdotgg#29877)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…ect under diff.relative (pingdotgg#29879)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…in a subagent or side chat (pingdotgg#29891)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…ingdotgg#28684)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
…squash-merged (pingdotgg#29919)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…ointed parent run (pingdotgg#25662)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
pingdotgg#29580)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: maria-rcks <maria@kuuro.net>
… the project folder (pingdotgg#29908)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Maria <maria-rcks@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…oading it (pingdotgg#29893)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…oved or steered (pingdotgg#29904)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
… it inherited (pingdotgg#29794)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…r hosts' tokens (pingdotgg#29554)

Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
shivamhwp and others added 28 commits November 5, 2026 06:51
…0421)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Elliot Drel <elliotdrel@gmail.com>
…gg#28928)

Co-authored-by: PR Batch Tester <agent@local.test>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…dotgg#30704)

Co-authored-by: Maxime Cathala <84846651+mcathala@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…onnection in a loop (pingdotgg#23758)

Co-authored-by: PR Batch Tester <agent@local.test>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: maria-rcks <maria@kuuro.net>
… it (pingdotgg#24946)

Co-authored-by: PR Batch Tester <agent@local.test>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: maria-rcks <maria@kuuro.net>
…7935)

Co-authored-by: PR Batch Tester <agent@local.test>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: maria-rcks <maria@kuuro.net>
…otgg#26464)

Co-authored-by: PR Batch Tester <agent@local.test>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: maria-rcks <maria@kuuro.net>
Co-authored-by: PR Batch Tester <agent@local.test>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: PR Batch Tester <agent@local.test>
Co-authored-by: Albert Li <albertli_042@hotmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…wake (pingdotgg#28204)

Co-authored-by: PR Batch Tester <agent@local.test>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…29838)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…ingdotgg#25341)

Co-authored-by: PR Batch Tester <agent@local.test>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: maria-rcks <maria@kuuro.net>
…ironment disconnects (pingdotgg#31269)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…pingdotgg#29639)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: maria-rcks <maria@kuuro.net>
…ve Error (pingdotgg#31216)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…#31277)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: maria-rcks <maria@kuuro.net>
Stage 1 of the 47f2c8d..337c585 sync: 327 upstream commits up to
"chore(release): prepare v0.1.7", including the Effect 4.0.5 -> 4.1.2
upgrade (pingdotgg#26833).

Carried: Effect 4.1.2 (catalog, @effect/vitest 4.1.2 patch as upstream
renamed it; Crypto -> effect/crypto SecureRandom/Digest in fork modules,
NodeCrypto.layer in coderServer.ts and fork-only tests), Claude models
reported by Claude Code (pingdotgg#30511), the Claude Agent SDK type pin 0.3.284,
copy-thread links (pingdotgg#26290, web; the new /threads route), and the generic
server, web, client-runtime, shared, Pi, Claude, Codex, ACP and GitLab
fixes. pingdotgg#28910's session title reaches the CLI transport's initialize
request.

Cut: GitHub star prompts (pingdotgg#29922, pingdotgg#29987; sourceControl.star is not
served), secret-provider readers (pingdotgg#27756, pingdotgg#27760, pingdotgg#27763; the helper
passes a constant settings client), managed policy (pingdotgg#29862, pingdotgg#29911,
pingdotgg#29915), Kiro (pingdotgg#14693, pingdotgg#29841: package, registration, fixtures, docs;
shared provider-acp code stays upstream's), telemetry and analytics
export (pingdotgg#30033, pingdotgg#29786, pingdotgg#29348), mobile, desktop, relay, T3 Connect and
other providers and hosts, agent preview recordings (pingdotgg#29853), and the
terminal-link metadata check (pingdotgg#30526; fork terminal links never open).

Resolution: the .repos reference-repo sync (pingdotgg#30472, pingdotgg#30481) and every
other modify/delete under a deleted path was resolved by
sync-resolve-deleted.mjs (which now feeds git rm on stdin); 60 newly
conflicting cut files joined DELETED_PATHS. Manifests and the lockfile
were rebuilt from ours; ws@8.22.1 was pinned back to upstream's 8.22.0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Stage 2 of the 47f2c8d..337c585 sync: 50 upstream commits after
bb4afa5.

Carried: @effect/tsgo typechecks (pingdotgg#31028) as upstream has them (the
@effect/tsgo devDependency, no `typescript` catalog entry, its
minimumReleaseAgeExclude entries, `.vscode/tsdk/tsgo`, and
`effect-tsgo tsrs` typecheck scripts, also for the fork's packages and
root typecheck:* scripts); `typescript-legacy` stays for knip's
preprocessor. The Effect refactors pingdotgg#31216, pingdotgg#31217, pingdotgg#31218 and
effect/jose and effect/crypto (pingdotgg#30474, pingdotgg#30501, pingdotgg#30523; auth/PayloadSigner
and assets/AssetSigner are carried for the signed asset URLs),
request_secret instead of chat (pingdotgg#30257), MCP Apps from Claude tool calls
(pingdotgg#29803), ghq-style clone folders (pingdotgg#24904), the Claude Agent SDK type pin
0.3.316, thread titles RPC (pingdotgg#29000), PR description checkbox saves
(pingdotgg#30704), and the generic fixes. Upstream's strictPeerDependencies is
carried; @effect/platform-node's unused redis peer joins ignoreMissing.

Effect-rule diagnostics the switch surfaced: upstream files carry no new
suppressions (seam lines are rewritten in upstream's style); fork-only
files take the mechanical fixes (Schema.TaggedError, typed Effect.try,
HostProcess.Environment, Effect.fn) and keep per-line or per-file
suppressions with reasons where a fix would change behaviour or touch
the gateway's HTTP, spawn, and termination code.

Cut: relay and T3 Connect signing (pingdotgg#30529, pingdotgg#30540, cloud environment
keys and cloud link state), mobile, devices, Claude accounts (pingdotgg#28928),
managed Codex sharing notices (pingdotgg#25341), socket frame parts on the HTTP
route (pingdotgg#23758, the helper speaks stdio), metrics, and the other surfaces
cut in stage 1. 22 newly conflicting cut files joined DELETED_PATHS.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
pingdotgg#29803 renders MCP Apps from Claude tool calls through Query's
mcpServerStatus and readMcpResource and the SDK's private request (for
mcp_call and list_permission_rules). The workspace CLI transport now
sends those as control requests with the SDK 0.3.316 wire shapes; any
other raw request is refused.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Seams doc: new seams and cuts from both stages (thread links on the
gateway origin, secret-provider and policy follow-ups, Kiro's dormant
provider-acp hooks, PayloadSigner/AssetSigner, the typecheck setup under
@effect/tsgo, MCP Apps transport, test adaptations), and the review
sourceKind seam dropped now that upstream has it. sync-check's
unused-locals runs effect-tsgo tsrs; SYNC_BASE is 337c585.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ntation

.vscode/tsdk/tsgo is an extension-less shell script for an editor setup the
fork does not carry, and the work download scanner rejects tracked shell
scripts. ProviderSessionManager's release block keeps upstream's Effect.gen
shape with one effectFnOpportunity suppression instead of an 80-line re-indent.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@henrychu04

Copy link
Copy Markdown
Owner Author

Review follow-up (c478417):

  • Dropped .vscode/tsdk/tsgo: the fork carries no other VS Code settings, and it is an extension-less tracked shell script the work download scanner may reject. Answers open question 2.
  • ProviderSessionManager.ts's release block keeps upstream's Effect.gen shape with one effectFnOpportunity suppression instead of an 80-line re-indent. Answers part of open question 5.

Reverified on c478417: format check, all 11 typechecks, knip:check, seams-check, pnpm test:coder (4006 server tests passed; the earlier ClaudeAdapterV2 60 s timeout did not recur and passed twice in isolation), and pnpm build all pass. sync-check both-sides/lost reviewed: every lost line is a cut or an existing seam.

🤖 Generated with Claude Code

@henrychu04
henrychu04 merged commit cb7c3f4 into coder-only Nov 5, 2026
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.