Skip to content

chore: merge upstream pingdotgg/t3code through 12069eefd7 - #200

Open
andrewcai8 wants to merge 97 commits into
mainfrom
sync/upstream-2026-10-08
Open

andrewcai8 wants to merge 97 commits into
mainfrom
sync/upstream-2026-10-08

Conversation

@andrewcai8

@andrewcai8 andrewcai8 commented Oct 8, 2026 •

Copy link
Copy Markdown
Owner

The daily upstream sync failed again because git merge upstream/main hit 18 conflicts. This merges upstream 611132c171..12069eefd7 (91 commits) by hand, as a real merge commit. The fork's cloud machines, Home port, worker forks, account rotation and background-shell fixes all stay. Upstream wins everywhere the fork had not deliberately changed something.

Notable upstream changes

Cross-environment series and Home

Conflicted files and how each was resolved

Server MCP and contracts:

  • packages/contracts/src/orchestratorMcp.ts: kept the fork's projectId on thread list items and dropped link, as upstream did.
  • apps/server/src/mcp/OrchestratorMcpService.ts: upstream's nowMs-only list item and detail. Kept the fork's exported listItemFromShell and readThreadPage. readThreadPage no longer takes an environment id.
  • toolkits/orchestrator/tools.ts, toolkits/project/tools.ts: upstream's descriptions, including how to write a thread link, with the fork's Home sentence appended. t3_thread_launch keeps the fork's FleetThreadLaunchResult.
  • toolkits/thread/tools.ts: upstream's description and its new settlesWhenTurnEnds result, with the fork's FleetThreadOrganizeInput parameters and Home sentence.
  • toolkits/thread/handlers.ts: the fork's Home routing first, then upstream's settleThread({ byOwnAgent }). Home's fleet path settles other threads directly, which is one member of the new result union.
  • toolkits/project/handlers.ts: the fork's Home and remote launch block. The upstream-removed link stays removed.

Server, other:

  • orchestration-v2/ProviderTurnStartService.ts: both. The fork's resume-fallback notice and upstream's refusedBeforePrompt check sit side by side.
  • usage/UsageService.ts: upstream's parallel source scan and its cached Cursor reader. The fork's box usage reads, maxHourlyWindowMs and usageHostId stay. See below for extra Cursor logins.
  • apps/server/package.json, pnpm-lock.yaml: both @namespacelabs/sdk (fork) and @muse-code/sdk (upstream).

Web:

  • ChatView.tsx: a held cloud send claims its first turn, then upstream resets full history. timelineSkills passes the fork's provisioned skills.
  • BranchToolbar.tsx: upstream's displayMode label with the fork's cloud "Run on" label first.
  • BranchToolbarEnvironmentSelector.tsx: upstream dropped displayMode and the panel styling here. Only the fork's cloudRunOn prop remains.
  • usage/UsagePage.tsx: upstream's shownWindow, keeping the fork's "to now" label and live reference time for the past-24-hours view (fork perf(client): reuse usage queries within the hour and ask only selected environments #36).

Client runtime and mobile:

  • client-runtime/src/connection/presentation.ts: the fork's box exports and blocked-reason type plus upstream's route helpers.
  • client-runtime/src/platform/persistence.ts: the fork's CatalogRegistration plus upstream's DeferredShellSnapshot.
  • apps/mobile/src/Stack.tsx: both imports. CloudBoxesWorker still mounts in the new v5 layout.

What the fork had to adapt beyond the conflicts

  • Home thread links (fix(server,web,mobile): thread links reference the thread id, not a baked title pingdotgg/t3code#17017). The fork's fleet launch result and the shared list item no longer carry link. FleetService and CloudFleetHost stop building it. Home's watch reports name a thread by its quoted title next to its environment and thread id. Home's AGENTS section now says to link threads in Home's own environment as [title](t3-thread://v1/<threadId>) and to name threads elsewhere by title and environment. Before this, a Home link opened a thread on any machine. Now only Home's own machine's threads are clickable until upstream lands cross-environment references.
  • Extra Cursor logins (usage). Upstream now caches Cursor account history per credential, on disk, behind CursorAccountReader. The fork's cursorAccountHistory.ts did the same thing in memory, so it is deleted. cursorLogins.ts now only lists the other Cursor instances' logins. UsageService reads each one through upstream's cursorAccountSource and counts an account reached through several logins once. The existing two-login tests now pass awaitRefresh, since upstream answers a cold read with a refreshing source.
  • Box reseed and deferred pull request links. Upstream's mobile shell cache now defers decoding thread PR links, and upstream refuses to save rows whose links are still pending. The fork's host-chat Reseed step loads the cached box shell and saves it back. It now fills the deferred links first (withPullRequestsLoaded), so a reseed cannot strip a box's PR links from the cache. New tests cover it.
  • Fork migration ledger. The test of the fork's separate ledger now expects upstream's new migrations 59 and 60. Older fork-era rows at ids 59 and 60 still move to the fork ledger by name, and those tests pass.
  • Test layers. The box-usage and Cursor-login suites provide upstream's CursorUsageReader.layer.

Verification

Run locally with the main checkout's installed node_modules linked in. No network installs.

  • Server. src/environmentControl, ProviderAccountSwitch.test.ts and src/usage: 67 files, 1001 tests pass. src/mcp, src/home, src/project: 47 of 48 files, 509 of 510 tests pass. Orchestration around the merged areas (ProviderSessionManager, ProviderTurnStartService, RunExecutionService, ThreadManagementService, ThreadStop, ClaudeAdapterV2, ProviderSwitch and background-note integration): 12 files, 396 tests pass. src/persistence, server.test, RpcAuthorization, runtimeLayer: pass.
  • Packages. contracts: 41 files, 655 tests pass. shared threadLinks and usageFormat: pass. client-runtime connection, platform, shell state, providerSkills, rpc: 28 files, 374 tests pass.
  • Web. BranchToolbar logic and panel, ChatView.logic, components/usage, src/cloud, components/home: 30 files, 364 tests pass.
  • Mobile. Home, threads, settings, connection, dependency graph, workspace stack projection, markdown module: 71 files, 574 tests pass.
  • vp lint on every resolved and adapted file: no errors.

Failures I saw, none in files this merge touched:

  • AgentSessionScanner "excludes sandboxes reached through a symlink" fails here. Guess: macOS /var is itself a symlink to /private/var. The file is unchanged by this merge.
  • ProviderRegistry "re-probes when settings change the codex binaryPath" fails here because this Mac has Homebrew and the probe also spawns brew. Guess: CI's Linux runners have no brew.
  • UsageService "upgrades a v4 cache" is flaky. It failed 1 of 4 runs on the merged file and 4 of 5 runs with upstream's own UsageService.ts swapped in, so it is upstream's flake.

Could not run:

  • Muse Code suites. @muse-code/sdk is not installed in the main checkout, and network installs are off. Server suites ran against a local, uncommitted stub of the package, so the Muse adapter, SDK and text-generation tests were not run. CI installs the real package.
  • Typecheck. It is blocked locally, so CI's Typecheck is the first full compile of the merged code.

Old cloud boxes and thread links

Cloud boxes upgrade only when idle, so a busy one keeps the pre-merge build for days. Those builds decode thread list, read and launch answers with a required link, which pingdotgg#17017 removed. Without it, an old box's t3_thread_launch into a new cloud chat provisioned a machine but read the answer as a failure, and a retry provisioned a second one. Listing a sleeping box, and calls the host passed through from an upgraded box, failed the same way.

CloudFleetHost now adds the old [title](t3-thread://v1/<environmentId>/<threadId>) link to each thread in those answers before it sends them to a box. It keeps a link the answer already has. New boxes drop the field. The code is marked for deletion once every cloud box runs this merge or later. A test decodes the host's list, read and launch answers with the pre-merge schemas. It fails with Missing key at ["threads"][0]["link"] without the change.

Risks

  • Typecheck is unproven locally. Upstream changed readThread, settleThread, the shell cache types and the usage service requirements. The tests above cover the fork code that uses them, but CI may still find a type break in auto-merged code.
  • Home links regress for threads on other machines (above) until upstream ships cross-environment references.
  • A box host and its guests must upgrade together for threads.list. A new host reads an old guest's extra link field fine. An old host would reject a new guest's list, because the field it expects is gone. Guess: hosts and guests run the same release.

Claude Opus 5.5, Claude Code

🤖 Generated with Claude Code

Bil0000 and others added 30 commits October 7, 2026 09:34
…turn settles (pingdotgg#16878)

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…nt is idle (pingdotgg#16486)

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-authored-by: Julius Marminge <51714798+juliusmarminge@users.noreply.github.com>
…ingdotgg#16287)

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
… connect (pingdotgg#16887)

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ntrackedFiles=no (pingdotgg#15834)

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…nd (pingdotgg#14917)

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ingdotgg#16895)

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ady holds (pingdotgg#16897)

Co-authored-by: saphid <saphid@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…legacy (pingdotgg#16903)

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
… phone's orientation (pingdotgg#16885)

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…16908)

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ingdotgg#16676)

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
Co-authored-by: PR Batch Tester <agent@local.test>
…pingdotgg#15856)

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…pingdotgg#16939)

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ingdotgg#16917)

Co-authored-by: Julius Marminge <51714798+juliusmarminge@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ttp (pingdotgg#16909)

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…tgg#16974)

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…6284)

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…14677)

Co-authored-by: Julius Marminge <51714798+juliusmarminge@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
flamboh and others added 21 commits October 8, 2026 02:49
…height (pingdotgg#17086)

Co-authored-by: maria-rcks <254055478+maria-rcks@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-authored-by: Guillaume <78903686+grodriguez-fr@users.noreply.github.com>
Co-authored-by: Cristian Uibar <cristi@buffup.media>
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…otgg#17137)

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

Takeover of pingdotgg#13902.

Co-authored-by: Derek Trimm <275381468+derektrimm@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…le decoding (pingdotgg#17141)

Continues pingdotgg#17044 by @SunkenInTime.

Co-authored-by: Dara Adedeji <daraadedeji07@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…dotgg#16970)

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…7140)

Keep up to six Cursor usage pages requested ahead of the one being read, still read in page order, and cancel requests left in flight when the read ends.

Continues pingdotgg#14384.

Co-authored-by: Krishna Vijay <228381532+im-kvijay@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rge (pingdotgg#17148)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…only what is still loading (pingdotgg#17147)

Takeover of pingdotgg#16376.

Co-authored-by: Ben Davis <45952064+bmdavis419@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…#17152)

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

Co-authored-by: PR Batch Tester <agent@local.test>
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…0439)

Co-authored-by: Yash Singh <saiansh2525@gmail.com>
Co-authored-by: Julius Marminge <51714798+juliusmarminge@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Merges upstream 611132c..12069ee (91 commits). 18 files conflicted.

Fork adaptations beyond the conflicts:
- Thread links no longer carry an environment (upstream pingdotgg#17017), so the
  MCP list item and Home's fleet launch result drop `link`, Home's watch
  reports name threads by title, and Home's instructions say a link only
  opens threads in Home's own environment.
- Cursor usage for extra Cursor logins reads through upstream's cached
  CursorAccountReader. The fork's own history cache is removed.
- A cloud box's cached shell fills its deferred pull request links before
  the host-chat reseed saves it back.
- Fork migration ledger test expects upstream migrations 59 and 60.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:XXL 📱 Native Change Changes the native fingerprint; merging blocks production OTAs until a new store build ships. labels Oct 8, 2026
…swers

Upstream pingdotgg#17017 dropped the required `link` from thread list, read and
launch results. A cloud box still on a pre-#200 build decodes the host's
answers with its old schema, so a launch into a new cloud chat that
provisioned a machine read as a failure there, and a retry provisioned a
duplicate. Lists of sleeping boxes and calls passed through from upgraded
boxes failed the same way.

The host now adds the old `[title](t3-thread://v1/<environmentId>/<threadId>)`
link to every thread in those answers before it sends them to a box,
keeping any link the answer already carries. New decoders drop it. The
step is marked for deletion once every cloud box runs #200 or later.

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

github-actions Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

ℹ️ The exact PR base did not have a successful artifact. Baseline uses the latest successful main measurement shown below.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire 5.0 KiB 5.0 KiB 0 B (0.0%) 6.8 KiB ✅
Codex Thread snapshot wire 3.8 KiB 3.8 KiB 0 B (0.0%) 4.9 KiB ✅
Codex Live turn WebSocket wire 1.2 KiB 1.2 KiB 0 B (0.0%) 2.0 KiB ✅
Codex Live turn WebSocket decoded 20.9 KiB 20.9 KiB 0 B (0.0%) 29.3 KiB ✅
Codex Live turn messages 2 2 0 (0.0%) 8 ✅
Claude Total thread wire 5.0 KiB 5.0 KiB 0 B (0.0%) 6.8 KiB ✅
Claude Thread snapshot wire 3.8 KiB 3.8 KiB 0 B (0.0%) 4.9 KiB ✅
Claude Live turn WebSocket wire 1.2 KiB 1.2 KiB 0 B (0.0%) 2.0 KiB ✅
Claude Live turn WebSocket decoded 21.2 KiB 21.2 KiB 0 B (0.0%) 29.3 KiB ✅
Claude Live turn messages 2 2 0 (0.0%) 8 ✅

Baseline: 57fde0d · PR result: a561679 · Source CI: failure

Scenario and decoded snapshot size

10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.

  • Codex decoded thread snapshot: 108.5 KiB
  • Claude decoded thread snapshot: 108.8 KiB

Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

andrewcai8 and others added 4 commits October 8, 2026 17:49
…ts for its cache write

The merged thread details panel renders the same Run on picker as the
composer but never received the fork's cloud options, which failed web
typecheck. ChatView now passes cloud.runOn through ThreadDetailsPanel.

The Cursor logins test scoped the service outside the temporary state
directory, so the account cache write could race its removal. Scope it
inside, as the upstream UsageService tests do.

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

The merge moved Cursor account reads onto upstream's CursorAccountReader
service, and UsageService.make now registers a finalizer that waits for
its cache writes, so it needs a Scope. The import script built the scanner
without either, which failed server typecheck.

The script now provides CursorUsageReader.layer, as server.ts does, and
scopes the scan so the scanner's cache lands before the upload starts.
The script still filters Cursor instances and keeps keychain reads off, so
the reader is never asked for an account.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The test scoped the service outside its temporary state directory, so the
scanner's cache write could race the directory's removal (ENOTEMPTY, 2 of 5
local runs). Scope it inside, as the Cursor logins test now does.

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

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

📱 Native Change Changes the native fingerprint; merging blocks production OTAs until a new store build ships. size:XXL vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.