Skip to content

chore(fork): merge upstream main - #477

Merged
Yarden-zamir merged 139 commits into
mainfrom
fork-sync/2026-11-03-1556
Nov 3, 2026
Merged

Yarden-zamir merged 139 commits into
mainfrom
fork-sync/2026-11-03-1556

Conversation

@Yarden-zamir

Copy link
Copy Markdown
Owner

🤖 Repairs the failed Fork Sync (run 41660165779, #451 "Fork sync: upstream merge failed").

Upstream range: ab8e488e10...cefb544af3 (136 commits, up to "feat(web): celebrate a GitHub star with confetti (pingdotgg#29987)").

Conflicts (26 files)

  • pnpm-workspace.yaml: kept the fork @kitshn/local pin, took alchemy beta.85 and @alchemy.run/test.
  • pnpm-lock.yaml: rebuilt with lockfile.py. @anthropic-ai/claude-agent-sdk stays at upstream's 0.3.284. The drizzle dev peers resolve one patch newer than upstream: @effect/sql-d1 4.1.2 and @cloudflare/workers-types 5.20261102.1.
  • packages/contracts/src/previewAutomation.ts: the timeout error has both the fork captureStage and the upstream reason.
  • packages/client-runtime/src/state/threadShell.ts: kept the fork terminalThreadStatesAtom and added the upstream hiddenThreadTagsAtom.
  • apps/web/src/state/threads.ts, apps/mobile/src/state/threads.ts: pass both atoms.
  • apps/server/src/mcp/McpHttpServer.ts: kept the fork toolkit registry imports and added the upstream requestUrl.
  • apps/server/src/mcp/PreviewAutomationBroker.ts: kept the fork capture stage and added the upstream server-browser reason.
  • apps/server/src/mcp/WorktreeMcpService.ts, toolkits/project/handlers.ts, orchestration-v2/PullRequestWatchReactor.ts: took the Effect 4.1.2 SecureRandom/Digest and kept the fork FileSystem, project-settings imports and settings service.
  • apps/server/src/vcs/GitVcsDriverCore.ts: kept the fork worktree path template and deferred branch creation under the lease. Took upstream's Digest and its cleanup of the branch after a failed worktree add.
  • apps/server/src/orchestration-v2/runtimeLayer.test.ts: took upstream's table test for unreadable watches and the NodeCrypto layers. Kept the fork ServerSettings.layerTest() and withSharedProjectReads.
  • apps/server/src/provider/AgentContextBudget.test.ts: fork mocks plus NodeCrypto.layer.
  • apps/web/src/cloud/managedRelayLayer.ts: kept the fork shared DPoP key loader in dpop.ts and took SecureRandom.
  • apps/web/src/components/ChatView.tsx: wrapped the timeline in upstream's WorkspaceMutationIdContext and kept the fork forkMessageLink.
  • apps/web/src/components/Sidebar.tsx: kept the fork card layout imports. Upstream removed SIDEBAR_TREE_PROPS in fix(web): screen readers can browse and Tab through the threads sidebar again without going into focus mode pingdotgg/t3code#26690, so the import is gone.
  • apps/web/src/components/ThreadNotificationCoordinator.tsx: TrackNotification carries threadId for upstream's hidden-tag closing. The fork replacedByTag and addThreadToast stay. addThreadToast now chains the caller's onRemove.
  • apps/web/src/components/ThreadRouteView.tsx: took upstream's tag-filter redirects and kept the fork terminal-thread screen. A hidden thread redirects before the terminal-thread branch.
  • apps/web/src/components/ThreadTerminalDrawer.tsx: took upstream's toolbar strip (terminalActions), which replaces the fork pt-8 padding. Added the fork tooltips, shortcuts and "Move to a terminal thread" button there.
  • apps/web/src/components/chat/DraftHeroHeadline.tsx: upstream's activeProjectTitle, with the fork !terminalMode.
  • apps/web/src/components/chat/ThreadRelationshipsControl.tsx, settings/ProjectSettingsPanel.tsx: kept both sides' imports.
  • apps/web/src/components/chat/TimelineAssistantRows.tsx: took upstream's revert of the hover timestamp (revert(web): undo hover timestamp change from #28610 pingdotgg/t3code#29680) and kept the fork standalone copy-link.
  • apps/mobile/src/features/threads/ThreadDetailScreen.tsx: wrapped the feed in upstream's WorkspaceMutationIdProvider and kept the fork message-link props.
  • apps/mobile/src/features/threads/ThreadFeed.tsx: took upstream's DisclosureRow. It gets an optional className for the fork message-link highlight.

Follow-up fixes

  • Fork server code moves to the Effect 4.1.2 crypto modules: ForkWorktreeRecreate, forkWorktreeSetup, KitshnSettingsSync, usageSourceAdd.
  • ws.ts: the fork label-snapshot call uses upstream's renamed deferNetworkDiscovery.
  • Fork tests follow upstream's changes: NodeCrypto.layer next to NodeServices.layer, layerInProcessMcpServer, layerMcpTransport(registrations), hiddenThreadTagsAtom, Word command args, and the new withLateConfigDiscovery argument.
  • Upstream's new DesktopApp.test.ts provides the fork DesktopAppToggle and DesktopBrowserHost.

Tests

  • checks.py: typecheck, migrations, adopted pull requests, format, lint and knip all pass.
  • fork_tests.py: 290 files. Three upstream tests fail only on macOS and the fork does not change them, so Fork CI on Linux runs them. Two DesktopLinuxUrlHandler theme icon tests fail on the case-insensitive file system. GitVcsDriverCore "keeps generated worktree folders short" fails on /var vs /private/var. MessagesTimeline "keeps the worked-for heading in place" failed once under load and passed on the next 2 runs.

t3dotgg and others added 30 commits November 1, 2026 22:36
…29053)

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

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Completion alerts waited two seconds after the client received a completed thread state. Audio was also fetched and decoded only when an alert needed to play, adding a first-play delay.

Notify immediately when the thread shell reports completion, and preload both sounds when a user gesture unlocks audio. Keep completion deduplication and suppression for existing, archived, and stopped runs.

This intentionally removes the continuation grace for completion alerts. A completed run can now notify before an automatic continuation starts. The sidebar's two-second placement grace and server settlement behavior remain in place.

Validation: `vp run check:changed` passes after merging current main, including 40 affected tests, formatting, lint, unused-code checks, affected typechecks, and React compiler checks. Tests cover immediate completion, duplicate suppression across reconnects, preloaded audio reuse, and retrying failed loads on alerts without retrying on every gesture. Audible timing has not been verified in a live client.

Model: GPT 6.1 Sol. Harness: Codex through T3 Code.
…unched T3 (pingdotgg#29169)

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

Co-authored-by: Gabriel Rodrigues <huijirohankei@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: maria-rcks <maria@kuuro.net>
…29465)

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

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

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

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: maria-rcks <maria@kuuro.net>
…ingdotgg#27756)

Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
Co-authored-by: maria-rcks <maria@kuuro.net>
…PR update (pingdotgg#29369)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…hile this device's sign-in loads (pingdotgg#29352)

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

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

## Problem

PR watches stopped after eight failed host reads, so a prolonged network outage prevented later CI and review updates from reaching the thread.

## Change

Keep watches active after provider failures reported as `failed`. Read detail and activity concurrently without allowing an activity failure to cancel or hide a permanent detail failure. Repeated known permanent failures still stop the watch and notify the agent; rate limits still pause reads. Non-rate-limited GitHub HTTP 403 responses and GraphQL `FORBIDDEN` responses now use a distinct `forbidden` reason so access refusals are counted instead of retried indefinitely. GraphQL error types survive the client mapping, after the existing requested-reviewer fallback.

The provider's `failed` category also includes unclassified host and decode errors. Those continue retrying at the existing two-minute cadence until the watch ends or is stopped. A fixed outage deadline would recreate the recovery failure for longer outages.

## Scope and approval

This is a focused fix for an obvious bug in existing PR watch recovery, covered by the small bug-fix exception in CONTRIBUTING.md. The changes cover watcher recovery, a GitHub failure classification needed to preserve permanent-error handling, and their regression tests. The new server-side `forbidden` reason does not change RPC contracts or add settings.

## Verification

`vp run check:changed` passed, including 154 tests across five files. Regression coverage includes a 30-minute outage followed by one CI-success notification, mixed activity/detail failures, resetting a prior failure count, and repeated forbidden reads stopping the watch. Provider tests distinguish HTTP 403 and exclusively permanent GraphQL refusals from retryable HTTP 503 and mixed or untyped GraphQL errors. The mixed-failure and GraphQL classification cases failed before their fixes. Seven focused requested-reviewer fallback/refusal tests also pass.

Model: GPT 6.1 Sol. Harness: Codex.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
juliusmarminge and others added 26 commits November 2, 2026 18:32
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…tance (pingdotgg#23198)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…turn absorbed its wake (pingdotgg#28010)

Co-authored-by: maria-rcks <254055478+maria-rcks@users.noreply.github.com>
…ory scan ends (pingdotgg#29535)

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

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…n starts (pingdotgg#28431)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…ching origin (pingdotgg#27961)

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

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

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

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Exotic209093 <134711311+Exotic209093@users.noreply.github.com>
Co-authored-by: Issue triage verification <triage@localhost>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…#22661)

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
… limit (pingdotgg#23192)

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

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…3-1556

Upstream ab8e488..cefb544 (136 commits). Fork code moves to the Effect 4.1.2 crypto modules (SecureRandom, Digest, NodeCrypto.layer).
Upstream moved NodeCrypto out of NodeServices.layer and made createEnvironmentThreadShellAtoms require hiddenThreadTagsAtom. The desktop and client-runtime fork tests follow.
The fork DesktopApp also starts DesktopAppToggle and needs DesktopBrowserHost.
@Yarden-zamir
Yarden-zamir marked this pull request as ready for review November 3, 2026 19:02
@Yarden-zamir
Yarden-zamir merged commit 1718c47 into main Nov 3, 2026
3 checks passed
@Yarden-zamir
Yarden-zamir deleted the fork-sync/2026-11-03-1556 branch November 3, 2026 19:02
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.