Repository navigation
Description
FYI this is gemini 4 neon, sorry for the slop issue.
Before submitting
- I searched existing issues and did not find a duplicate.
- I included enough detail to reproduce or investigate the problem.
Area
apps/server
Steps to reproduce
- Run a headless Linux T3 Code service and let it auto-update over several weeks while using T3 Connect and the preview browser.
- Inspect
~/.t3/runtime/versions/and~/.t3/tools/after updates commit and tool pins bump.
Expected behavior
After updates finish and new tool versions activate, stale staging directories and unneeded old binaries should be pruned so disk usage stays bounded.
Actual behavior
Nearly 1 GB of old binaries and stale update artifacts accumulated under ~/.t3 across four code paths on main at 997103b, plus another 286 MB from the pinned old launcher tracked in #37705.
-
Abandoned
.staging-*runtime directories are never pruned.
installPinnedRuntimecreates.staging-*directories underruntime/versionsand only deletes them insideEffect.ensuringat line 481. If the process crashes, is killed, or hitsENOSPCduring extraction, the directory remains forever becauseselectUnusedRuntimesskips every entry that does not matchisExactServiceVersion. UnlikePreviewBrowser.ts, there is no stale-age sweep for leftover staging trees. On this host,.staging-67BQG5from October 25 sat at 149 MB for a month. -
prunePinnedRuntimeskeepsfromVersionindefinitely after an update iscommitted.
AtpinnedRuntime.ts:856-859,selectUnusedRuntimesadds bothstate.update.fromVersionandstate.update.targetVersiontokeepregardless ofstate.update.status. Becauseservice-state.jsonretains the lastcommittedupdate entry until a future update replaces it, the previous ~494 MB runtime stays on disk permanently even after the new version is running and committed. -
cloudflaredretains an older binary even when it falls belowCLOUDFLARED_MIN_VERSION.
AtrelayClient.ts:424-435,pruneManagedVersionskeeps(yield* olderManagedVersions).slice(1)without checking whether that retained version meetsCLOUDFLARED_MIN_VERSION. On this host,tools/cloudflared/2026.10.0at 39 MB is kept permanently beside2026.10.4even thoughcompatibleCandidaterejects anything below2026.10.3due to the eMudhra block from [Bug]: T3 Connect still accepts cloudflared versions affected by the eMudhra compromise #25608. -
chrome-headless-shellkeeps a full ~280 MB previous copy permanently.
AtPreviewBrowser.ts:326-331,installalways preserves onepreviousversion alongside the current pin, and no later startup sweep removes it once nothing uses it. On this host,157.0.8103.78at 277 MB stayed beside active158.0.8127.36at 283 MB. By contrast,AntigravityInstallation.ts:821-830prunes inactive releases as soon as no lease references them.
Combined with the systemd launcher still pinned to 0.0.46-nightly.20261006.2735 at 286 MB, which is tracked in #37705, old T3 binaries occupied ~1.24 GB on a 50 GB volume.
Impact
Minor bug or occasional failure
Version or commit
Server 0.1.12-nightly.20261122.5085, source references at 997103b
Environment
Ubuntu 24.04.5 LTS, Linux 6.8.0-147-generic x86_64, headless systemd user service with ~/.t3 symlinked to /mnt/HC_Volume_107060327/.t3
Logs or stack traces
$ cat ~/.t3/runtime/service-state.json
{
"protocol": 3,
"activeVersion": "0.1.12-nightly.20261122.5085",
"update": {
"id": "573b5048-d574-4fc8-beb1-dedd73e43066",
"fromVersion": "0.1.12-nightly.20261121.5038",
"targetVersion": "0.1.12-nightly.20261122.5085",
"status": "committed"
}
}
$ du -sh ~/.t3/runtime/versions/* ~/.t3/runtime/versions/.staging-* ~/.t3/tools/chrome-headless-shell/linux64/* ~/.t3/tools/cloudflared/*
494M ~/.t3/runtime/versions/0.1.12-nightly.20261121.5038
493M ~/.t3/runtime/versions/0.1.12-nightly.20261122.5085
286M ~/.t3/runtime/versions/0.0.46-nightly.20261006.2735
149M ~/.t3/runtime/versions/.staging-67BQG5
277M ~/.t3/tools/chrome-headless-shell/linux64/157.0.8103.78
283M ~/.t3/tools/chrome-headless-shell/linux64/158.0.8127.36
39M ~/.t3/tools/cloudflared/2026.10.0
39M ~/.t3/tools/cloudflared/2026.10.4Workaround
Delete .staging-*, older tool versions under ~/.t3/tools/, and the previous committed runtime version manually.
Activity