Skip to content

chore: sync with upstream pingdotgg/t3code cd128e7774 - #482

Open
shuv1337 wants to merge 716 commits into
mainfrom
sync/upstream-cd128e77
Open

shuv1337 wants to merge 716 commits into
mainfrom
sync/upstream-cd128e77

Conversation

@shuv1337

Copy link
Copy Markdown
Owner

Sync with upstream pingdotgg/t3code main, pinned at cd128e7774020aac59b30adffd537fc3dcf5563e.

  • 714 upstream commits since the last pin de0466fd80; 124 conflicted paths resolved.
  • One real merge commit 3d3686ed99: parents 612212eb1c (fork main) and cd128e7774 (upstream pin). No rebase, squash or cherry-pick.
  • Workspace versions stay 0.1.11, same as upstream at the pin; apps/server stays private: true.

Fork behaviour re-applied

  • MCP pull request tools default to origin (fix(server): MCP pull request tools default to origin, not upstream #480): upstream rewrote createPullRequest as pushAndOpenPullRequest (it now pushes first) and added private PRs. The repository is resolved before any push and pinned through ChangeRequestRepository; locate stays origin-first; pull_request_create keeps repository next to upstream's private, and rejects the two together.
  • S2 Connect relay (feat(cloud): enable the fork-owned Connect relay and release config #476): ownership preflight, external Postgres, no-Axiom mode and fork public config are intact; the relay test files pass. Upstream's relay changes come in unchanged (see Relay below).
  • Cursor provider: upstream's @cursor/sdk@1.4.2 and out-of-process runner adopted. The fork's retry guard is ported into the 1.4.2 patch because the unguarded retry loop is still in that bundle.
  • Shared MCP, pools, account sync, cross-project delegate_task, auto-settle: kept alongside upstream's workflows, feedback and task-folder toolkits. PeerLinks keeps both stored (fork account sync) and upstream's names.
  • Per-child subagent grouping (fix(client): Background work shows one row per subagent, with its follow-ups counted #473), compact sidebar rows, SSH guards, fork CLI/service identity and channel isolation, WSL home selection: kept on upstream's new structure.
  • i18n: catalogs regenerated and fork translations restored by key; i18n:check clean in web, mobile and desktop.
  • Migrations: upstream adds 103 to 111; the fork's migrations run on a separate ledger, so nothing collides.

Removed or redirected

  • Workflows: mobile-eas-preview-build.yml and mobile-eas-production-build.yml (new upstream, use upstream's runners and accounts) are not taken; the two preview workflows the fork had already deleted stay deleted. workflow-credentials.test.cjs is trimmed to the fork's workflows.
  • Docs: upstream pruned and renumbered its docs. The 12 old paths are gone; fork-specific content moved into docs/operations/hosted-fork.md.
  • Upstream URLs in WORKFLOWS_GUIDE_URL and the relay monitor runbook links now point at this fork.
  • Kept versioned AppImage names (upstream went versionless) because the fork's AUR packaging depends on them.

Things to know

  • Agent feedback tool (new upstream): t3_feedback would report to upstream's PostHog project. It is off by default twice over: agentFeedback.mode defaults to off, and delivery goes through telemetry, which is opt-in. Its settings copy still says "T3 team", which is accurate about where the data would go.
  • Antigravity/ACP native tool registration is not fixed by this sync. Upstream did not touch apps/server/src/mcp/advertisedJsonSchema.ts; it only hardened the fallback. In the merged tree six tools still advertise anyOf: delegate_task, create_threads, schedule_task, t3_thread_launch, t3_thread_send_attachments, t3_attachment_prepare_upload.
  • Agent context budget: mcpToolListJsonBytes goes from 59198 to 62464. Upstream's own tool list grew by 4403 bytes (57321 to 61724); the fork's share on top of upstream shrinks from 1877 to 740. Needs the agent-context-increase label.
  • Relay: merging this triggers the production relay deploy workflow, which waits for approval. It would turn on Cloudflare Workers Logs at 1% head sampling and ship upstream's hook error mapping and APNs payload changes. No relay database migrations.

Verification

Local: typecheck clean in all packages; i18n:check clean; focused suites for PR tools, relay, public config, release and branding, CLI and service, Cursor, MCP and budget, SSH, migrations all pass. check:changed passed format, lint, knip, GraphQL and React compiler; its full test step (1,088 files) hit the script's 900 s timeout and was not completed locally. CI and CI Full run the full suites on this head.

Merged by Gemini 4 Neon (Antigravity) in S2Code; planned by Claude Fable 5.2 and Gemini 4 Neon; PR opened by Claude Fable 5.2 (Claude Code).

juliusmarminge and others added 30 commits November 22, 2026 18:03
Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
…ngdotgg#41157)

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…gg#39097)

Co-authored-by: Simone <185146821+Lucenx9@users.noreply.github.com>
…gg#39478)

Co-authored-by: Simone <185146821+Lucenx9@users.noreply.github.com>
…eadKey (pingdotgg#41143)

Co-authored-by: Isaac-b-ux <264455269+Isaac-b-ux@users.noreply.github.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
…g#25537)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: SAPHID <saphid@users.noreply.github.com>
Co-authored-by: shivam <91240327+shivamhwp@users.noreply.github.com>
Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
…gdotgg#41168)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
…ll (pingdotgg#37585)

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

Co-authored-by: MarcoDotIO <20867620+MarcoDotIO@users.noreply.github.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
…repository (pingdotgg#41177)

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

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

Co-authored-by: Julius Marminge <julius0216@outlook.com>
…link strings (pingdotgg#41193)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
…g#41184)

Co-authored-by: 137 <113233555+caezium@users.noreply.github.com>
…ges (pingdotgg#41196)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
…s created (pingdotgg#36904)

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

Co-authored-by: Julius Marminge <julius0216@outlook.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
…atalogs (pingdotgg#41214)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
dibas-np and others added 26 commits November 23, 2026 15:43
…tgg#30280)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
…1746)

Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
…out (pingdotgg#41742)

Getting a link code through a linked environment now requires the scopes
of the access level requested, and creating a guest link requires
orchestration:read, in addition to access:write. The link dialog offers
linking through another environment only when the session holds them.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…ans stay linear (pingdotgg#41747)

Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
…n readiness (pingdotgg#41752)

Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
…ts directly (pingdotgg#41753)

Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
…ader (pingdotgg#41756)

Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
…gdotgg#41737)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
…gdotgg#30773)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
…ingdotgg#31169)

Co-authored-by: maria-rcks <maria@kuuro.net>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
…ups open web links only (pingdotgg#41757)

Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
…t on (pingdotgg#41761)

Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
…tgg#41769)

Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
…that use them (pingdotgg#41765)

Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
…gdotgg#41749)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
…shares are handled more strictly (pingdotgg#41767)

Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
…otgg#41773)

Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
…ir trailing space (pingdotgg#41760)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
…gg#30253)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
… is always consumed (pingdotgg#41778)

Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
…ows directory (pingdotgg#41782)

Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
…dotgg#41652)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
Sync shuv1337/s2code main (612212e) to upstream pingdotgg/t3code
cd128e7 (714 upstream commits since
merge base de0466f, 124 conflicted paths).

Fork behaviour re-applied:
- MCP PR origin-first default (#480): kept repository override and
  origin-first ChangeRequestRepository pinning in GitManager.ts and
  pullRequests/{tools,handlers}.ts while preserving upstream private PRs
  and rejecting private + repository.
- S2 Connect relay (#476): kept fork relay config/tests; pointed
  infra/relay monitoring runbooks and web WorkflowRunsView guide URL to
  shuv1337/s2code; accepted upstream Workers Logs sampling in worker.ts.
- Cursor SDK 1.4.2: adopted upstream @cursor/sdk@1.4.2 and
  CursorAgentSdkProcessRunner, kept @napi-rs/keyring + CursorKeychain,
  and ported s2code-retry.cjs into patches/@cursor__sdk@1.4.2.patch and
  dist/{cjs,esm}/977.js.
- Per-child grouping (#473), shared MCP servers, provider pools, spent-quota
  account sync (PeerLinks.stored + PeerLinks.names), cross-project
  delegate_task (projectWorktreePath + poolLaunchSelection), ThreadFork
  delegatedFrom preservation, and auto-settlement.
- Fork branding, product-ownership markers, CLI identity/channels, boot
  service channel units, WSL per-channel home/runtime paths, SSH guards,
  and release packaging (versioned AppImages for AUR, unsigned Windows
  packaging, Apple Speech macOS resources).
- Regenerated web/mobile/desktop i18n catalogs, restored fork translations
  by key from origin/main, and updated agentContextBudget.json to exact
  measured values (6245 / 7639 / 62464).

Deleted:
- 4 upstream mobile preview/build workflows (.github/workflows/mobile-eas-
  preview{,-fork,-build}.yml, mobile-eas-production-build.yml) not used by
  this fork; kept fork workflows and ported mobile-eas-production.yml
  credential scoping.
- 12 upstream-deleted old doc paths (docs/internals/{linux-snap-shot,
  remote,t3-connect,voice-input}.md, docs/operations/{android-notifications,
  connect-setup,development,mobile-app-store-screenshots,observability,
  relay-observability,release}.md, docs/orchestration-v2/
  orchestrator-mcp-server.md); fork-only operational content moved to
  docs/operations/hosted-fork.md.
- Obsolete patches/@cursor__sdk@1.3.1.patch (replaced by 1.4.2).
@shuv1337 shuv1337 added the agent-context-increase Approves growth in agent context budget label Nov 24, 2026
@socket-security

socket-security Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addednpm/​agent-device@​0.21.41661008696100
Updatednpm/​@​babel/​plugin-transform-export-namespace-from@​8.0.1 ⏵ 8.1.0100 +110069 +193 -2100
Updatednpm/​@​babel/​plugin-transform-modules-commonjs@​8.0.1 ⏵ 8.1.210010074 +189 -7100
Updatednpm/​@​babel/​cli@​8.0.6 ⏵ 8.1.0100 +110076 +196 +3100
Updatednpm/​rolldown@​1.2.14 ⏵ 1.3.29510078 +199 +1100
Updatednpm/​@​babel/​core@​8.0.10 ⏵ 8.1.2991007996 -1100
Updatednpm/​@​vitest/​coverage-v8@​5.0.5 ⏵ 5.1.099 +110079 +198100
Addednpm/​vitest@​5.1.0981007999100
Addednpm/​playwright@​1.65.11001001009980
Addednpm/​alchemy@​2.0.0-beta.87991001009880
Updatednpm/​@​effect/​atom-react@​4.1.2 ⏵ 4.1.510010081 +196 -1100
Updatednpm/​@​effect/​openapi-generator@​4.1.2 ⏵ 4.1.5100 +110082 +197100
Updatednpm/​@​effect/​platform-node@​4.1.2 ⏵ 4.1.5100 +110083 +197100
Addednpm/​dfx@​1.1.18310010094100
Updatednpm/​immer@​11.2.9 ⏵ 11.2.1099 +110083 +195100
Addednpm/​mdast-util-from-markdown@​2.1.09910010085100
Updatednpm/​fake-indexeddb@​6.2.5 ⏵ 6.2.810010010088 -1100
Addednpm/​rollup-plugin-visualizer@​7.1.39910010090100
Addednpm/​tar@​7.5.23971009991100
Updatednpm/​oxlint@​1.90.0 ⏵ 1.93.0991009196100
Addednpm/​vue@​3.5.45991009197100
Updatednpm/​postgres@​4.0.0 ⏵ 4.1.1100 +2100100 +191 +10100
Updatednpm/​tedious@​20.3.8 ⏵ 20.3.99810091 +1100 +3100
Addednpm/​@​alchemy.run/​cloudflare@​2.0.0-beta.87991009592100
Updatednpm/​glob@​14.0.3 ⏵ 14.0.698 +110099 +193100
Updatednpm/​@​opentelemetry/​semantic-conventions@​1.44.0 ⏵ 1.45.0100 +1100100 +193100
Updatednpm/​@​effect/​graphql-generator@​4.1.2 ⏵ 4.1.5100 +110010095 +1100
Updatednpm/​@​cloudflare/​workers-types@​5.20261101.1 ⏵ 5.20261114.1100 +2610096 +199100
Addednpm/​tinybench@​6.2.310010010096100
Updatednpm/​@​oxlint/​plugins@​1.90.0 ⏵ 1.93.01001009996 +1100
Updatednpm/​rollup@​4.67.3 ⏵ 4.68.396 +110010099100
Updatednpm/​hono@​4.13.14 ⏵ 4.13.18100 +1100 +697 +196100
See 11 more rows in the dashboard

View full report

@shuv1337

Copy link
Copy Markdown
Owner Author

Diagnosis of the four CI failures at 3d3686e. I confirmed the causes by reading the code, but I haven't run the patch below.

1. Agent context budget: this needs a label, not a code change. The PR raises agentContextBudget.json mcpToolListJsonBytes to 62464, which is right. Upstream is already at 61724 at cd128e7, up from main's 59198, so most of the growth is upstream's new tool text. About 740 bytes come from the fork's tools on top of that. agent-context-budget.yml fails any increase over main unless the PR has the agent-context-increase label. Once a maintainer adds the label, the labeled event reruns the check.

2 and 3. Test Server 1 (cli/thread.test.ts) and Test Server 3 (cli/workflow.test.ts) share one cause: the temp homes are missing the product marker file. Two setups from upstream create a temp baseDir without .product-identity:

  • the "list includes delegated threads across pages" test in thread.test.ts, line 63
  • the new setup in workflow.test.ts, line 65

resolveBaseDir in os-jank.ts calls the fork's ensureProductHome from packages/shared/src/productHome.ts, which refuses that home and raises UserError ("Cannot establish product ownership"). The fork's own tests in thread.test.ts (lines 173 and 260) already write the marker. Fix: write the marker right after makeTempDirectoryScoped.

4. Test Server 2 (ProviderInstanceRegistry.test.ts:1048, "usage-limit policy changes"): the merge dropped the fork's no-rebuild path for policy-only changes. The fork's entryEqual ignores disableOnUsageLimit and usageLimitDisabled. Upstream pingdotgg#41189 added a separate runtimeEqual, and that's what now decides replacedIds. It strips only displayName and accentColor, so a policy-only change replaces the instance, closes it, and builds it again. Fix: have withoutPresentation also strip the two policy fields. runtimeEqual is its only caller. "auto-disable rebuilds the instance like a manual disable" still rebuilds, because that test also sets enabled: false.

Proposed patch (+5 lines, unrun):

diff --git a/apps/server/src/cli/thread.test.ts b/apps/server/src/cli/thread.test.ts
index f71db1aa200..4e96321c5c7 100644
--- a/apps/server/src/cli/thread.test.ts
+++ b/apps/server/src/cli/thread.test.ts
@@ -61,6 +61,7 @@ it.effect("list includes delegated threads across pages and still leaves out sub
     const fs = yield* FileSystem.FileSystem;
     const path = yield* Path.Path;
     const baseDir = yield* fs.makeTempDirectoryScoped({ prefix: "t3-thread-list-" });
+    yield* fs.writeFileString(path.join(baseDir, PRODUCT_HOME_MARKER), `${PRODUCT_ID}\n`);
     yield* persistServerRuntimeState({
       path: path.join(baseDir, "userdata", "server-runtime.json"),
       state: yield* makePersistedServerRuntimeState({
diff --git a/apps/server/src/cli/workflow.test.ts b/apps/server/src/cli/workflow.test.ts
index 82b4705e45f..8b50596cdd1 100644
--- a/apps/server/src/cli/workflow.test.ts
+++ b/apps/server/src/cli/workflow.test.ts
@@ -3,6 +3,7 @@ import * as NodeServices from "@effect/platform-node/NodeServices";
 import { assert, it } from "@effect/vitest";
 import { AuthSessionId, type WorkflowRun } from "@t3tools/contracts";
 import * as NetService from "@t3tools/shared/Net";
+import { PRODUCT_HOME_MARKER, PRODUCT_ID } from "@t3tools/shared/productIdentity";
 import * as ConfigProvider from "effect/ConfigProvider";
 import * as DateTime from "effect/DateTime";
 import * as Effect from "effect/Effect";
@@ -63,6 +64,7 @@ const runCli = (
     const fs = yield* FileSystem.FileSystem;
     const path = yield* Path.Path;
     const baseDir = yield* fs.makeTempDirectoryScoped({ prefix: "t3-workflow-cli-" });
+    yield* fs.writeFileString(path.join(baseDir, PRODUCT_HOME_MARKER), `${PRODUCT_ID}\n`);
     yield* persistServerRuntimeState({
       path: path.join(baseDir, "userdata", "server-runtime.json"),
       state: yield* makePersistedServerRuntimeState({
diff --git a/apps/server/src/provider/ProviderInstanceRegistry.ts b/apps/server/src/provider/ProviderInstanceRegistry.ts
index b127c7119bf..f826c61b18a 100644
--- a/apps/server/src/provider/ProviderInstanceRegistry.ts
+++ b/apps/server/src/provider/ProviderInstanceRegistry.ts
@@ -76,6 +76,8 @@ const entryEqual = (a: ProviderInstanceConfig, b: ProviderInstanceConfig): boole
 const withoutPresentation = ({
   displayName: _displayName,
   accentColor: _accentColor,
+  disableOnUsageLimit: _disableOnUsageLimit,
+  usageLimitDisabled: _usageLimitDisabled,
   ...runtime
 }: ProviderInstanceConfig) => runtime;
 

Address Review Round 1 findings on sync/upstream-cd128e77 (on top of merge commit 3d3686e):

1. ProviderInstanceRegistry usage-limit policy: strip disableOnUsageLimit and
   usageLimitDisabled in entryEqual and runtimeEqual (via withoutUsageLimitPolicy)
   so policy toggles reconcile without rebuilding live provider instances while
   keeping presentationChanged strictly on displayName/accentColor.
2. CLI tests product marker: write PRODUCT_HOME_MARKER/PRODUCT_ID in
   thread.test.ts, workflow.test.ts, and feedback.test.ts, and match S2Code
   server-unreachable copy in feedback.test.ts.
3. Update CLI test shim: expect s2code.cmd in update.test.ts to match the fork's
   Windows shim name.
4. DesktopUpdates tests: verified packaged fork builds cannot cross channels on
   startup or via setChannel. Kept and adapted the two release-floor tests
   ("offers nothing below a track switch's checked release" and "keeps the
   current track's offers when a track switch fails to save") to packaged
   same-channel floor/rollback coverage. Removed four upstream cross-channel
   saved-track tests ("keeps a saved Stable track across a restart without
   offering an older release", "keeps a saved Nightly track across a restart
   without crossing on its own", "reports a track mismatch when the feed offers
   no release at all", and "does not name a blocked build track as the one to
   switch back to") because packaged fork builds pin to their install channel on
   startup while unpackaged dev builds disable auto-updates completely.
5. Browser test composer draft isolation: return a Disposable from setup() in
   ProjectSettingsPanel.browser.test.tsx (and clean storage in
   Sidebar.browser.test.tsx) so persisted drafts in localStorage cannot leak
   across browser test files.
6. GitManager PR base-branch check: resolve ChangeRequestRepository before
   ensurePrHeadIsNotBase so the base check runs under the resolved repository
   context; added unpushed-branch and repository-pin proof tests.
7. RFC links: update stale docs/internals links in
   docs/rfcs/watch-voice-control.md.
8. Dead WSL helper: remove unused buildWslRuntimeInvalidateScript from
   DesktopWslEnvironment.ts and its test.
9. Server shard 2/8 finding (watch admission vs. upstream e3ac310): apply
   holdRunAwaitingCapture to watch admission reads in Orchestrator.ts so
   requireIdle/requireActive/requireNativeSteerOf agree with dispatchOnce while
   turn-end checkpoint capture is in flight, and update fork-only
   WatchAdmission.integration.test.ts for runs settling to "completed".

Model: Gemini 4 Neon (Antigravity)

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

agent-context-increase Approves growth in agent context budget

Projects

None yet

Development

Successfully merging this pull request may close these issues.