# Desktop updater cleanup: focused runtime evidence

Captured **4/4 requested rows**, with nine successful terminal recordings (four base/head pairs and one parent-commit reproducer) for [#32559](https://git.cafe/pingdotgg/t3code/pull/32559), mirrored as [#32559](https://github.com/pingdotgg/t3code/pull/32559). No additional PR behavior outside updater cleanup/record handling was observed. Ordinary startup side effects are inventoried separately below.

Environment: Ubuntu 24.04.4 LTS x86_64; Electron 44.10.1 (Node 24.22.1); Xvfb 21.1.12 via headless-desktop; app 0.1.8. Every launch passed --no-sandbox --disable-gpu --password-store=basic. Native standalone resources/app launch reports app.isPackaged=true, with no property override. Each commit was installed and built in its own detached worktree using vp install and vp pack. The production main bundle was copied unchanged; hashes and source provenance are in each archive.

The wrapper invokes the real registered updater IPC listener (the same decoding/Effect/service path as the renderer, without a renderer roundtrip). A passive fs.mkdir observer forwards its original call and records the install record at pending-directory preparation. Neither updater logic nor filesystem results are mocked. D1/D2 use the supported T3CODE_DESKTOP_MOCK_UPDATES feed override and real HTTP downloads of matching-SHA512 synthetic AppImage bytes. Their artifact has no embedded blockmap, so electron-updater reports its normal differential failure and completes a full download. This proves download, persistence, and configure-time behavior; it does not prove native installation, renderer interaction, or differential downloading.

Fresh synthetic HOME/T3CODE_HOME/XDG/TMPDIR for every row and side; T3CODE_DEV_SEED=0; local backend disabled. Each relaunch reuses that run's exact home/cache/record. No live database was read or seeded. Script transcripts include timestamps, seeded file listings/SHA256, each update action/result, updater warnings, and milestone snapshots. Timing files support scriptreplay; raw Electron logs and manifests accompany them.

## D1

UTC windows: before 2026-11-10T15:44:30.454Z–2026-11-10T15:44:31.537Z; after 2026-11-10T15:44:31.537Z–2026-11-10T15:44:32.675Z.

| Step | Before UTC | After UTC |
| --- | --- | --- |
| Seed applied record and mode-0555 cache/pending | 2026-11-10T15:44:30.517Z | 2026-11-10T15:44:31.594Z |
| Launch 1: configured updater / record state | 2026-11-10T15:44:30.877Z | 2026-11-10T15:44:32.009Z |
| Restore cache and pending permissions in the SAME process | 2026-11-10T15:44:30.908Z | 2026-11-10T15:44:32.042Z |
| Check local update feed | 2026-11-10T15:44:30.915Z | 2026-11-10T15:44:32.048Z |
| Real updater prepares pending; record absent | 2026-11-10T15:44:30.944Z | 2026-11-10T15:44:32.092Z |
| Download accepted and completed | 2026-11-10T15:44:30.966Z | 2026-11-10T15:44:32.100Z |
| Relaunch same HOME; compare downloaded SHA256 | 2026-11-10T15:44:31.459Z | 2026-11-10T15:44:32.595Z |
| Quit and final listing | 2026-11-10T15:44:31.513Z | 2026-11-10T15:44:32.655Z |

| Before | After |
| --- | --- |
| SHA [20c3dd3689](https://git.cafe/pingdotgg/t3code/commit/20c3dd3689782bfcb1a04332086d08017028c718) | SHA [989c770fb9](https://git.cafe/pingdotgg/t3code/commit/989c770fb97f1eb0909047311074a5990338e79d) |
| [before-D1-recording.zip](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/303a9b9aff0d2861/before-D1-recording.zip) | [after-D1-recording.zip](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/de1fa0937f9b0f3d/after-D1-recording.zip) |
| Base consumes the applied record at launch 1 because it has no pending cleanup. Real download completes; new payload survives relaunch. | Head warns on launch-1 cleanup failure and retains the applied record. After permission restoration, the record is absent at pending-directory preparation and HTTP artifact request. New download survives same-home relaunch with the same SHA256. |

Listing/hash comparison: [state-diffs.zip](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/144a6b87f734584d/state-diffs.zip) contains `D1-state-diff.md` (every scoped milestone) and `D1-state-diff.json` (scoped plus exhaustive settled before/after differences).
## D2

UTC windows: before 2026-11-10T15:44:32.675Z–2026-11-10T15:44:33.829Z; after 2026-11-10T15:44:33.830Z–2026-11-10T15:44:35.001Z.

| Step | Before UTC | After UTC |
| --- | --- | --- |
| Seed not-applied record | 2026-11-10T15:44:32.733Z | 2026-11-10T15:44:33.891Z |
| Launch 1 reports failed install | 2026-11-10T15:44:33.168Z | 2026-11-10T15:44:34.342Z |
| Check local update feed | 2026-11-10T15:44:33.168Z | 2026-11-10T15:44:34.342Z |
| Real updater prepares pending; record retained | 2026-11-10T15:44:33.217Z | 2026-11-10T15:44:34.383Z |
| Download accepted and completed | 2026-11-10T15:44:33.230Z | 2026-11-10T15:44:34.406Z |
| Relaunch same HOME; notAppliedVersion remains | 2026-11-10T15:44:33.747Z | 2026-11-10T15:44:34.870Z |
| Quit and final listing | 2026-11-10T15:44:33.807Z | 2026-11-10T15:44:34.941Z |

| Before | After |
| --- | --- |
| SHA [20c3dd3689](https://git.cafe/pingdotgg/t3code/commit/20c3dd3689782bfcb1a04332086d08017028c718) | SHA [989c770fb9](https://git.cafe/pingdotgg/t3code/commit/989c770fb97f1eb0909047311074a5990338e79d) |
| [before-D2-recording.zip](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/b58a187358b98026/before-D2-recording.zip) | [after-D2-recording.zip](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/df23d7dc8e7272cc/after-D2-recording.zip) |
| Not-applied record survives real download and relaunch; notAppliedVersion=99.0.0 remains. | Not-applied record survives real download and relaunch unchanged; notAppliedVersion=99.0.0 and the did-not-apply warning remain. |

Listing/hash comparison: [state-diffs.zip](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/144a6b87f734584d/state-diffs.zip) contains `D2-state-diff.md` (every scoped milestone) and `D2-state-diff.json` (scoped plus exhaustive settled before/after differences).
## L2

UTC windows: before 2026-11-10T15:44:35.021Z–2026-11-10T15:44:35.611Z; after 2026-11-10T15:44:35.612Z–2026-11-10T15:44:36.233Z.

| Step | Before UTC | After UTC |
| --- | --- | --- |
| Seed under HOME/.cache; XDG_CACHE_HOME omitted | 2026-11-10T15:44:35.078Z | 2026-11-10T15:44:35.669Z |
| Launch configured updater and list filesystem | 2026-11-10T15:44:35.480Z | 2026-11-10T15:44:36.101Z |
| Quit and final listing | 2026-11-10T15:44:35.590Z | 2026-11-10T15:44:36.211Z |

| Before | After |
| --- | --- |
| SHA [20c3dd3689](https://git.cafe/pingdotgg/t3code/commit/20c3dd3689782bfcb1a04332086d08017028c718) | SHA [989c770fb9](https://git.cafe/pingdotgg/t3code/commit/989c770fb97f1eb0909047311074a5990338e79d) |
| [before-L2-recording.zip](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/af98a3d25b711558/before-L2-recording.zip) | [after-L2-recording.zip](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/fcb825e9c40e8208/after-L2-recording.zip) |
| HOME/.cache/t3code-updater/pending remains; applied record consumed. | HOME/.cache/t3code-updater/pending is removed; update.zip, current.blockmap and unrelated sentinel retain their original SHA256; applied record consumed. |

Listing/hash comparison: [state-diffs.zip](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/144a6b87f734584d/state-diffs.zip) contains `L2-state-diff.md` (every scoped milestone) and `L2-state-diff.json` (scoped plus exhaustive settled before/after differences).
## Y3

UTC windows: before 2026-11-10T15:44:36.233Z–2026-11-10T15:44:36.850Z; after 2026-11-10T15:44:37.450Z–2026-11-10T15:44:38.084Z.

| Step | Before UTC | After UTC |
| --- | --- | --- |
| Seed blank cache-name YAML and cache/pending decoy | 2026-11-10T15:44:36.288Z | 2026-11-10T15:44:37.519Z |
| Launch configured updater and list filesystem | 2026-11-10T15:44:36.701Z | 2026-11-10T15:44:37.946Z |
| Quit and final listing | 2026-11-10T15:44:36.825Z | 2026-11-10T15:44:38.062Z |

| Before | After |
| --- | --- |
| SHA [20c3dd3689](https://git.cafe/pingdotgg/t3code/commit/20c3dd3689782bfcb1a04332086d08017028c718) | SHA [989c770fb9](https://git.cafe/pingdotgg/t3code/commit/989c770fb97f1eb0909047311074a5990338e79d) |
| [before-Y3-recording.zip](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/6abe77331d9ccc3e/before-Y3-recording.zip) | [after-Y3-recording.zip](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/0d031c4330f90ae9/after-Y3-recording.zip) |
| Blank updaterCacheDirName (five trailing spaces) leaves cache/pending decoy untouched; applied record consumed. | Blank updaterCacheDirName leaves cache/pending decoy untouched; sibling hashes unchanged; applied record consumed. |

Listing/hash comparison: [state-diffs.zip](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/144a6b87f734584d/state-diffs.zip) contains `Y3-state-diff.md` (every scoped milestone) and `Y3-state-diff.json` (scoped plus exhaustive settled before/after differences).

Parent bug reproducer (not the merge-base): UTC 2026-11-10T15:44:36.850Z–2026-11-10T15:44:37.450Z. Seed 2026-11-10T15:44:36.908Z → launch 2026-11-10T15:44:37.315Z → final 2026-11-10T15:44:37.427Z.

| Parent reproducer | Fixed head |
| --- | --- |
| SHA [0c10ad88d2](https://git.cafe/pingdotgg/t3code/commit/0c10ad88d22df9bec1a3217b58fdd26761f5673c) | SHA [989c770fb9](https://git.cafe/pingdotgg/t3code/commit/989c770fb97f1eb0909047311074a5990338e79d) |
| [parent-Y3-recording.zip](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/3c117eca3e8c2a56/parent-Y3-recording.zip) | [after-Y3-recording.zip](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/0d031c4330f90ae9/after-Y3-recording.zip) |
| Decoy cache/pending and both seeded files removed despite blank updaterCacheDirName. | Same decoy and both files preserved with matching SHA256. |

## What else changed

[what-else-changed.md](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/e946b67f814c19c3/what-else-changed.md) lists **every other observed path change** at settled snapshots, with before/after type, mode, size and SHA256. Each recording also contains what-else-changed.json, full milestone manifests, and a settlement diff after session descendant cleanup.

- Chromium creates isolated caches, profile/partition databases, preferences and local storage; generated bytes can differ between runs and are not attributed to the PR.
- Desktop URL-handler registration creates mimeapps.list, an applications entry and MIME cache.
- headless-desktop creates isolated keyring/NSS and D-Bus/accessibility/session state; ephemeral session cleanup is listed separately.
- T3 creates clerk/log directories, shell-environment cache and first-launch marker; its settings loader normalizes desktop-settings.json.
- D1's harness explicitly changes cache parent and pending modes from 0555 to 0755; actual download replaces old pending content/update-info with the newer artifact. Those expected fixture/download changes are shown in scoped diffs.
- update.zip, current.blockmap and unrelated sentinel hashes remain unchanged in all nine recordings. No pre-existing file outside the scoped pending/record state and normal desktop-settings normalization was modified in the observed snapshots.

Inventories cover snapshots, not every transient syscall. Uploaded manifests contain metadata only, not generated credentials, keyring/profile/database contents. Native macOS and Windows remain **cannot-verify macos / cannot-verify windows** on this Linux VM. No requested Linux row is missing. Existing L1/N1/R1/F1/F2 were not recaptured.

## Drivers and build provenance

[prepare.mjs](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/3b9473f315a9d5c5/prepare.mjs)
[capture-entry.cjs](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/0d79430566845963/capture-entry.cjs)
[run.mjs](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/77e6baf507030366/run.mjs)
[record.mjs](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/05213abb5700d55b/record.mjs)
[package.mjs](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/de4c9e306e44c6ee/package.mjs)
[supervise.py](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/5182d8ba0fbce019/supervise.py)
[build-provenance.zip](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/0c2022b12e36d399/build-provenance.zip)
[inventory.json](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/973ea111d3ace31b/inventory.json)

All 13 final-set Electron launches exited with code 0. Their tracked PIDs were verified gone; each recording ends with the subreaper confirming all started descendants reaped. Local feed servers were closed. The three capture worktrees were removed after uploading their evidence. Nothing was edited/committed in the lead worktree; no push or PR mutation occurred. Scratch evidence is retained locally.

AI-assisted; verified with the tests and tools listed above.

## Upload output (verbatim)

[before-D1-recording.zip](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/303a9b9aff0d2861/before-D1-recording.zip)
[after-D1-recording.zip](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/de1fa0937f9b0f3d/after-D1-recording.zip)
[before-D2-recording.zip](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/b58a187358b98026/before-D2-recording.zip)
[after-D2-recording.zip](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/df23d7dc8e7272cc/after-D2-recording.zip)
[before-L2-recording.zip](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/af98a3d25b711558/before-L2-recording.zip)
[after-L2-recording.zip](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/fcb825e9c40e8208/after-L2-recording.zip)
[before-Y3-recording.zip](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/6abe77331d9ccc3e/before-Y3-recording.zip)
[parent-Y3-recording.zip](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/3c117eca3e8c2a56/parent-Y3-recording.zip)
[after-Y3-recording.zip](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/0d031c4330f90ae9/after-Y3-recording.zip)
[state-diffs.zip](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/144a6b87f734584d/state-diffs.zip)
[what-else-changed.md](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/e946b67f814c19c3/what-else-changed.md)
[build-provenance.zip](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/0c2022b12e36d399/build-provenance.zip)
[prepare.mjs](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/3b9473f315a9d5c5/prepare.mjs)
[capture-entry.cjs](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/0d79430566845963/capture-entry.cjs)
[run.mjs](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/77e6baf507030366/run.mjs)
[record.mjs](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/05213abb5700d55b/record.mjs)
[package.mjs](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/de4c9e306e44c6ee/package.mjs)
[supervise.py](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/5182d8ba0fbce019/supervise.py)
[inventory.json](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/973ea111d3ace31b/inventory.json)

FRICTION:
- runbook | An executable named electron reports app.isPackaged=false even with resources/app; downloads are intentionally disabled by T3 in that mode | Stage a standalone executable renamed to t3code-capture; native app.isPackaged then becomes true without overriding it.
- tool | An unquoted YAML releaseDate became a Date and failed the app update-info schema in the initial probe | Quote the fixture timestamp; final recordings all complete the real transfer.
- runbook | electron-updater is bundled, so requiring a separate module to observe its download entry watched the wrong instance | Observe the forwarded fs.mkdir call that the actual bundled updater uses to prepare pending; final captures prove record state there.
- infra | Headless sessions report absent PipeWire/portal integration; dummy AppImage has no differential blockmap and triggers full-download fallback | Treat these as explicit environment/fixture limits; verify full HTTP transfer and hashes, as done here.
