Skip to content

fix(dev): one t3.json setup action that works on every OS - #13589

Merged
t3dotgg merged 1 commit into
mainfrom
t3code/fix-worktree-setup-script
Sep 25, 2026
Merged

t3dotgg merged 1 commit into
mainfrom
t3code/fix-worktree-setup-script

Conversation

@t3dotgg

@t3dotgg t3dotgg commented Sep 25, 2026

Copy link
Copy Markdown
Member

Worktree setup broke on every Mac and Linux machine I have. t3.json has two setup actions, one for macOS/Linux and one for Windows, and both are marked to run on worktree create. Only one setup action can be active. Importing an action from Settings saves it to every environment. So importing "Setup Worktree (Windows)" once made it the setup action on six machines. Then zsh and bash failed on New-Item with exit 127.

The fix: t3.json now has one "Setup Worktree" action, node scripts/setup-worktree.ts. The script uses only Node built-ins, because it runs before dependencies exist. It runs vp i, links the main checkout's .env files into the worktree, and warms the web dependency cache. The command has no shell syntax, so it works the same in zsh, bash, fish, and PowerShell. It also works when one import is saved to environments on different OSes.

Small changes from the old commands:

  • A missing source .env is skipped, so the script makes no broken link.
  • When the script runs in the main checkout itself, it does not relink, so it cannot replace the real .env.

This is a smaller version of the idea in #6268.

Proof: I ran the script in this worktree under zsh and bash. Results: deps installed, cache warmed, and .env linked to the main checkout. A missing infra/relay/.env was skipped. When root equals the worktree, an existing .env was left as is. With no vp on PATH, it exits 127. With no T3CODE_PROJECT_ROOT, it stops with a clear error. tsc for scripts/ passes, and lint and format checks are clean.

Created with Claude Opus 5.5 in Claude Code.

🤖 Generated with Claude Code

t3.json had a macOS/Linux setup action and a PowerShell one, both marked
to run on worktree create. Only one setup action can be active, and
importing from Settings fans out to every environment. Importing the
Windows entry made it the setup action on every Mac and Linux machine,
where zsh and bash fail on New-Item.

Replace both with `node scripts/setup-worktree.ts`, a Node-only script
that installs dependencies, links the main checkout's env files, and
warms the web dependency cache. It has no shell syntax, so the same
command works in zsh, bash, fish, and PowerShell.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels Sep 25, 2026
@macroscopeapp

macroscopeapp Bot commented Sep 25, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Not approved

Macroscope's review found this PR not approvable — This is a focused development-workflow refactor that consolidates OS-specific worktree setup without changing product runtime behavior. The new bootstrap file also adds a static-analysis diagnostic suppression, so human review is warranted.

You can add or adjust custom eligibility rules. Learn more.

@github-actions

Copy link
Copy Markdown
Contributor

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire 13.5 KiB 13.5 KiB +10 B (+0.1%) 15.1 KiB ✅
Codex Thread snapshot wire 7.1 KiB 7.1 KiB −3 B (−0.0%) 7.3 KiB ✅
Codex Live turn WebSocket wire 6.4 KiB 6.5 KiB +13 B (+0.2%) 7.8 KiB ✅
Codex Live turn WebSocket decoded 56.2 KiB 56.3 KiB +44 B (+0.1%) 66.4 KiB ✅
Codex Live turn messages 9 10 +1 (+11.1%) 21 ✅
Claude Total thread wire 13.5 KiB 13.5 KiB +11 B (+0.1%) 15.1 KiB ✅
Claude Thread snapshot wire 7.1 KiB 7.1 KiB +7 B (+0.1%) 7.3 KiB ✅
Claude Live turn WebSocket wire 6.4 KiB 6.5 KiB +4 B (+0.1%) 7.8 KiB ✅
Claude Live turn WebSocket decoded 57.0 KiB 57.0 KiB 0 B (0.0%) 66.4 KiB ✅
Claude Live turn messages 9 9 0 (0.0%) 21 ✅

Baseline: d10bd13 · PR result: 066a9de · Source CI: success

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: 114.0 KiB
  • Claude decoded thread snapshot: 114.7 KiB

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

@t3dotgg
t3dotgg merged commit b3de243 into main Sep 25, 2026
20 of 21 checks passed
@t3dotgg
t3dotgg deleted the t3code/fix-worktree-setup-script branch September 25, 2026 06:56
github-actions Bot added a commit to omarcresp/t3code-flake that referenced this pull request Sep 25, 2026
## What's Changed
* feat(web): control Android foldables in the Device panel by @juliusmarminge in pingdotgg/t3code#13534
* fix(mcp): preview snapshots fit in the agent's tool output again by @t3dotgg in pingdotgg/t3code#13558
* fix(web): paste after clicking away from the composer lands in it again by @t3dotgg in pingdotgg/t3code#13553
* feat(desktop): keep running threads synced in the background by @t3dotgg in pingdotgg/t3code#13554
* fix(mcp): preview errors tell agents what to do instead by @t3dotgg in pingdotgg/t3code#13559
* feat(web): agents working banner links to the Agents panel by @t3dotgg in pingdotgg/t3code#13572
* fix(web): size the Android fold model from the inner display by @juliusmarminge in pingdotgg/t3code#13574
* fix(clients): a preview app no longer knocks the desktop's own server offline by @t3dotgg in pingdotgg/t3code#13577
* fix(web): keep nested task states out of parent bullets by @dominic-r in pingdotgg/t3code#11477
* feat(release): ship a Linux .deb that updates itself by @t3dotgg in pingdotgg/t3code#13575
* perf(desktop): cache compiled JavaScript between launches by @t3dotgg in pingdotgg/t3code#13501
* fix(dev): one t3.json setup action that works on every OS by @t3dotgg in pingdotgg/t3code#13589
* fix(web): new worktree threads no longer say "checkout" during setup by @t3dotgg in pingdotgg/t3code#13590
* fix(desktop): `t3 app` keeps working after a second desktop app quits by @t3dotgg in pingdotgg/t3code#13585
* fix(usage): price Claude fast-mode requests at the fast rate by @t3dotgg in pingdotgg/t3code#13599
* fix: update OpenAI logo to current brand asset by @aaditagrawal in pingdotgg/t3code#13611
* fix(mobile): render assigned project icons in chat list by @SunkenInTime in pingdotgg/t3code#12810

## New Contributors
* @aaditagrawal made their first contribution in pingdotgg/t3code#13611

**Full Changelog**: pingdotgg/t3code@v0.0.43-nightly.20260925.2237...v0.0.43-nightly.20260925.2251

Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.0.43-nightly.20260925.2251
ZytriuNks added a commit to ZytriuNks/t3code that referenced this pull request Sep 28, 2026
* test(relay): remove constant-restating database mode test (pingdotgg#13932)

* fix(server): let agents use simctl and adb alongside device tools (pingdotgg#13908)

* feat(observability): honor OTEL_*_EXPORTER=none per signal (pingdotgg#13736)

Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>

* fix(clients): hide duplicate Cursor Keychain prompts (pingdotgg#13870)

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

* fix(build): validate Linux node-pty prebuilds in Windows artifacts (pingdotgg#13867)

* test(usage): assert contract mismatch details (pingdotgg#13861)

* fix(usage): identify client version mismatches (pingdotgg#8208)

* fix(usage): omit Cursor warning when no login is saved (pingdotgg#13820)

* fix(usage): tolerate newer provider variants (pingdotgg#10076)

* fix(server): background git status fetches no longer fill the disk with failed repacks (pingdotgg#13812)

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

* perf(server): cut idle wakeups from the Connect relay and session reaper (pingdotgg#13774)

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

* perf(clients): saving the thread list cache no longer freezes the UI (pingdotgg#13767)

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

* perf(server): background sweeps only read threads that can still settle (pingdotgg#13765)

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

* fix(observability): the renderer trace proxy stops tracing itself (pingdotgg#13761)

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

* perf(clients): sort projects and settled threads without re-parsing dates per comparison (pingdotgg#13759)

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

* perf(server): opening Diagnostics no longer loads the whole trace ring into memory (pingdotgg#13763)

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

* perf(observability): stop writing empty spans on spawns, projected events, and idle polls (pingdotgg#13756)

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

* fix(server): let Antigravity inspect unsupported files by path (pingdotgg#13339)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* Show a focus ring on sidebar thread and draft rows (pingdotgg#13344)

* fix(server): bump node-pty to 1.2.0-beta.15 for linux-arm64 prebuild (pingdotgg#13748)

* fix(server): prune expired replay-protection files from the secrets directory (pingdotgg#13695)

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

* fix(server): installed editors no longer vanish when discovery is slow (pingdotgg#13669)

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

* fix(editors): stop treating the agy CLI as the Antigravity IDE (pingdotgg#7079)

* fix(opencode): accept v2 serve ready line when spawning server (pingdotgg#13651)

* fix(usage): hide the Cursor keychain prompt when Cursor isn't set up (pingdotgg#13714)

* perf(server): stop re-running git for every project each minute (pingdotgg#13689)

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

* feat(observability): record event loop stalls in the server trace (pingdotgg#13697)

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

* perf(server): per-thread settlement and PR checks no longer rebuild the whole thread list (pingdotgg#13691)

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

* fix(client): slow servers finish loading the thread list instead of loading it twice (pingdotgg#13683)

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

* perf(server): build the thread list snapshot without decoding it twice (pingdotgg#13693)

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

* feat(observability): write a server heap snapshot on SIGUSR2 (pingdotgg#13694)

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

* perf(server): pull request sync reads only threads with linked pull requests (pingdotgg#13704)

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

* feat(cli): summarize the server trace file from the command line (pingdotgg#13698)

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

* fix(server): the SQLite WAL file shrinks back after large writes (pingdotgg#13684)

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

* fix(cli): t3 triage points agents at log files that exist (pingdotgg#13685)

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

* feat(observability): name the command on subprocess spans (pingdotgg#13701)

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

* perf(server): stop remapping every thread on each thread event (pingdotgg#13720)

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

* refactor(observability): name each service after its application (pingdotgg#13699)

Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>

* fix(usage): price Cursor cache savings by base model (pingdotgg#13731)

* perf(server): avoid rereading unchanged files in review previews (pingdotgg#13395)

* fix(server): load Cursor keyring with createRequire (pingdotgg#13678)

* fix(terminal): settling a thread closes its idle shells (pingdotgg#13673)

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

* feat(observability): honor the standard OTLP endpoint, headers, and protocol variables (pingdotgg#13492)

Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>

* fix(sqlite): retry failed statement preparations (pingdotgg#10584)

Co-authored-by: shivam <91240327+shivamhwp@users.noreply.github.com>

* feat(usage): read cursor, opencode, and antigravity history (pingdotgg#10409)

Co-authored-by: Yash Singh <saiansh2525@gmail.com>

* fix(usage): price Claude fast-mode requests at the fast rate (pingdotgg#13599)

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

* fix(dev): one t3.json setup action that works on every OS (pingdotgg#13589)

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

* feat(release): ship a Linux .deb that updates itself (pingdotgg#13575)

The Linux release build now also makes a .deb in the same electron-builder
run as the AppImage, and the release publishes it. electron-builder lists it
in latest-linux.yml and writes resources/package-type into it, so the app
updates a .deb install through electron-updater, which installs the new .deb
with dpkg. The desktop updater now allows that path.

The .deb uses xz in threaded mode (XZ_DEFAULTS=-T0): 113 MB in place of
141 MB with gzip. The Linux arm64 release job moves to a 16-vCPU Blacksmith
arm64 runner. The download page, README, install guide, and release docs
list the .deb.

Based on community work in pingdotgg#4071, pingdotgg#5139, pingdotgg#4900, and pingdotgg#4887.

Co-authored-by: chukfinley <chuk@chuk.dev>
Co-authored-by: Primož Ajdišek <bigpod@bigpod.si>
Co-authored-by: benthecarman <benthecarman@live.com>
Co-authored-by: NaveDanan <nave0712@gmail.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* fix(clients): a preview app no longer knocks the desktop's own server offline (pingdotgg#13577)

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

* fix(mcp): preview errors tell agents what to do instead (pingdotgg#13559)

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

* fix(mcp): preview snapshots fit in the agent's tool output again (pingdotgg#13558)

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

* fix(server): newer Codex models get T3 Code's instructions again (pingdotgg#13547)

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

* fix(clients): sync status no longer flickers when opening running threads (pingdotgg#13551)

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

* ci(relay): add a forced manual relay deploy (pingdotgg#13550)

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

* fix(server): report the Grok account email so usage limits merge across environments (pingdotgg#12588)

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-authored-by: macroscopeapp[bot] <170038800+macroscopeapp[bot]@users.noreply.github.com>

* fix(server): Grok accounts with no usage yet no longer vanish from Limits (pingdotgg#12799)

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

* fix(relay): export tunnel cleanup counters to Axiom (pingdotgg#13528)

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

* feat(grok): offer one-click updates through `grok update` (pingdotgg#13523)

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

* fix(connect): remove tunnels after hosts go offline (pingdotgg#9386)

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
Co-authored-by: Julius Marminge <51714798+juliusmarminge@users.noreply.github.com>

* feat(codex): require Codex 0.156 and regenerate its protocol (pingdotgg#13481)

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

* fix(codex): the protocol generator runs again on Effect rc.115 (pingdotgg#13480)

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

* fix(antigravity): keep Windows runtime unpacking under MAX_PATH (pingdotgg#13389)

Co-authored-by: javiergusart <42075376+javiergusart@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* fix(acp): keep one answer when a running tool reports progress (pingdotgg#13386)

Co-authored-by: adeebahmad01 <52380344+adeebahmad01@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* fix(marketing): use the official OpenCode and Antigravity logos (pingdotgg#13365)

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

* fix(observability): a malformed OTEL_RESOURCE_ATTRIBUTES no longer stops startup (pingdotgg#13469)

Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>

* feat(server): show and redeem Claude banked resets (pingdotgg#13118)

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>

* chore(ci): use GPT 6 Sol Max for check agents (pingdotgg#13473)

* fix(server): keep Codex's reset answer when the re-probe fails (pingdotgg#13363)

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

* fix(server): preserve racy edits in review diff previews (pingdotgg#12613)

Co-authored-by: shivam <91240327+shivamhwp@users.noreply.github.com>

* feat(observability): honor the OpenTelemetry kill switch (pingdotgg#13355)

Co-authored-by: Yordis Prieto <yordis.prieto@gmail.com>
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>

* fix(shared): preserve final quoted empty CSV records (pingdotgg#11425)

Co-authored-by: Simone <185146821+Lucenx9@users.noreply.github.com>

* fix(server): stop replaying old agent alerts on restart (pingdotgg#13340)

* fix(providers): restore compatibility ranges for every harness (pingdotgg#13328)

* fix(ci): shard release tests like pull request CI (pingdotgg#13321)

* fix(sync): resolve wave1 test/build fallout from upstream rebase

After rebase of 78 upstream commits (78 picks, 70 drops) onto c37294d,
the following merge-conflict artefacts remained because the rebase
strategy kept fork-exclusive V2/Pi source while picking upstream
implementations of shared files:

- packages/shared/src/usageMerge.test.ts: removed orphan nested it()
  declaration from commit 9, removed dangling expect+}) from rebase
  residue, and renamed staleEnvironments -> contractMismatches to
  match the upstream field that commit 9/11/13 introduced (the fork
  exclusively uses the contractMismatches field name).
- apps/server/src/usage/usagePricing.ts: collapsed the doubly-nested
  conflict markers left by commits 61 and 75 in cacheSavingsUsd into
  the upstream clause that resolves to rateModel ?? record.model.
- apps/server/src/provider/Drivers/CursorDriver.ts: replaced with the
  upstream main implementation so the file matches the upstream
  auth/modelDiscovery shape; the fork V2 Cursor path was already
  covered by PiAdapterV2.test.ts (61/61 green) and is not touched.
- apps/server/src/provider/Layers/CursorProvider.test.ts: restored
  the fork-main version (252 lines) because the upstream version
  exercises a CursorProvider path that this fork does not implement
  (fork ships only the V2 Pi adapter and the legacy Cursor provider
  layer tests); 7/7 green.

Wave1 critical-point verification (vp test):
  packages/shared/src/usageMerge.test.ts                       30/30
  apps/server/src/orchestration-v2/Adapters/PiAdapterV2.test.ts 61/61
  apps/server/src/usage/UsageService.test.ts                  14/14
  apps/server/src/provider/Layers/CursorProvider.test.ts        7/7
  apps/server/src/provider/cursorCredentialStore.test.ts        1/1
  packages/shared/src/usageFormat.test.ts                      9/9
  packages/client-runtime/src/state/usage.test.ts              9/9
  apps/server/src/serverLogger.test.ts                         6/6
                                                              137/137

---------

Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
Co-authored-by: t3-code[bot] <269035359+t3-code[bot]@users.noreply.github.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
Co-authored-by: Yordis Prieto <yordis.prieto@gmail.com>
Co-authored-by: Yash Singh <saiansh2525@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Tristan Knight <admin@snappeh.com>
Co-authored-by: Theo Browne <me@t3.gg>
Co-authored-by: Bilal Bakr <62337003+Bil0000@users.noreply.github.com>
Co-authored-by: Ryan Ilano <ryanilano@users.noreply.github.com>
Co-authored-by: Ephraim <ephraim39hr14m@gmail.com>
Co-authored-by: Bob Fowler <bob@rjf.ca>
Co-authored-by: Ishaan Kothari <ishaanko.mail@gmail.com>
Co-authored-by: Shirish Pothi <183252392+shirishpothi@users.noreply.github.com>
Co-authored-by: Guillermo Casanova <75276669+Gigioxx@users.noreply.github.com>
Co-authored-by: shivam <91240327+shivamhwp@users.noreply.github.com>
Co-authored-by: Aditya Garud <153842990+yashranaway@users.noreply.github.com>
Co-authored-by: maria <maria@kuuro.net>
Co-authored-by: chukfinley <chuk@chuk.dev>
Co-authored-by: Primož Ajdišek <bigpod@bigpod.si>
Co-authored-by: benthecarman <benthecarman@live.com>
Co-authored-by: NaveDanan <nave0712@gmail.com>
Co-authored-by: Jake Leventhal <jakeleventhal@me.com>
Co-authored-by: macroscopeapp[bot] <170038800+macroscopeapp[bot]@users.noreply.github.com>
Co-authored-by: Julius Marminge <51714798+juliusmarminge@users.noreply.github.com>
Co-authored-by: javiergusart <42075376+javiergusart@users.noreply.github.com>
Co-authored-by: adeebahmad01 <52380344+adeebahmad01@users.noreply.github.com>
Co-authored-by: oliver <97427849+flamboh@users.noreply.github.com>
Co-authored-by: Simone <lucenz@proton.me>
Co-authored-by: Simone <185146821+Lucenx9@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 changed lines (additions + deletions). 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.

1 participant