# Desktop updater supplementary runtime evidence

**Known boundary reproduced:** D6 deletes a newer download on relaunch if unlinking the kept applied record fails. This qualifies any unconditional claim that a new download can never be deleted. No other PR-specific behavior outside cleanup/record handling was observed.

PR [#32559](https://git.cafe/pingdotgg/t3code/pull/32559), mirrored as [#32559](https://github.com/pingdotgg/t3code/pull/32559). Before [20c3dd3689](https://git.cafe/pingdotgg/t3code/commit/20c3dd3689782bfcb1a04332086d08017028c718); after [cc3188460e](https://git.cafe/pingdotgg/t3code/commit/cc3188460ec3d52aa9acaffa7418784ddb04c264).

**Coverage: 6/7 requested runtime rows** (L3, Y4, F3, D3, D4, D6), plus the optional Y4 trailing-comment variant: 14 successful recordings, 22 Electron launches. D5 is **unit/harness only**, not runtime verified.

Environment: Ubuntu 24.04.4 LTS x86_64; Electron 44.10.1; Xvfb 21.1.12 (2:21.1.12-1ubuntu1.9); app 0.1.8. UID 1000, real Unix permission failures. Each commit was installed with vp install and built with vp pack in its own detached worktree. Runtime uses headless-desktop with --no-sandbox --disable-gpu and native packaged resources/app; bundle hash is unchanged from each build. Synthetic AppImage/feed only; no installer executed. Linux evidence does not establish native Windows/macOS lock behavior.

Both sides use the same driver and fresh synthetic state per row. Relaunch steps reuse that row’s isolated HOME/T3CODE_HOME/cache. No live database was read or seeded, and the local backend was disabled. The reused wrapper invokes the registered updater IPC listener/service and passively observes pending fs.mkdir, without a renderer roundtrip or an updater mock. The supported mock-feed configuration directs the real electron-updater to an in-process HTTP fixture. Logs, script timing replay, per-milestone listings/modes/sizes/SHA256, feed requests, result assertions and build/source provenance are in each archive. Full UI readiness is not claimed; bootstrap registered IPC is the synchronization milestone.

All rows assert unchanged SHA256 for update.zip (`bd8c1f84b7486d391150e4b507a7ac6d7d2cd8faf54b00eda484f4c6eaa6576b`), current.blockmap (`d399573a178ca290c08ff0878012e56621d777c9d97a99c1d698a5db9d9a4a56`), and unrelated sentinel (`a94ef07b1e5d1691b7a594916d338d2112ba78276853a47b356ba896b56a7b69`). The downloaded artifact SHA256 is `fac34219bb9958117cceba09631ea89ddeccb73794f9a535e3dcb84f3471994e`.

## L3

Steps: Applied record, writable cache, configured local feed, updater enabled. Launch → inspect cleanup → check → quit.

UTC: before 2026-11-10T16:03:07.807Z → 2026-11-10T16:03:08.596Z; after 2026-11-10T16:03:08.597Z → 2026-11-10T16:03:09.404Z.

| Before | After |
| --- | --- |
| [20c3dd3689](https://git.cafe/pingdotgg/t3code/commit/20c3dd3689782bfcb1a04332086d08017028c718) | [cc3188460e](https://git.cafe/pingdotgg/t3code/commit/cc3188460ec3d52aa9acaffa7418784ddb04c264) |
| [before-L3-recording.zip](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/ec7f44385469cd4a/before-L3-recording.zip) | [after-L3-recording.zip](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/451cf5242ea76a06/after-L3-recording.zip) |
| Pending remains; record consumed. Enabled check returns available 99.0.0. | Pending and record removed. Enabled check returns available 99.0.0; archive/blockmap/sentinel hashes unchanged. |

State diff: `L3-state-diff.md` and `L3-state-diff.json` in [state-diffs.zip](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/b4210d0f68e3168d/state-diffs.zip). All filesystem differences outside the pending subtree/install record: 151 before, 151 after, enumerated in [what-else-changed.md](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/7014fd91fc403cd3/what-else-changed.md).

## Y4

Steps: Quoted updaterCacheDirName: 't3code-updater'; normal pending and unrelated decoy; literal quoted path absent. Launch → inspect → quit.

UTC: before 2026-11-10T16:03:09.405Z → 2026-11-10T16:03:10.233Z; after 2026-11-10T16:03:10.233Z → 2026-11-10T16:03:12.937Z.

| Before | After |
| --- | --- |
| [20c3dd3689](https://git.cafe/pingdotgg/t3code/commit/20c3dd3689782bfcb1a04332086d08017028c718) | [cc3188460e](https://git.cafe/pingdotgg/t3code/commit/cc3188460ec3d52aa9acaffa7418784ddb04c264) |
| [before-Y4-recording.zip](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/94d428fd9afa871d/before-Y4-recording.zip) | [after-Y4-recording.zip](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/4413b0f4e27061ad/after-Y4-recording.zip) |
| Normal pending and decoy retained; record consumed. | Normal pending and decoy retained; record consumed. Cleanup targets the nonexistent literal quoted name, so force removal succeeds without removing real cache files. |

State diff: `Y4-state-diff.md` and `Y4-state-diff.json` in [state-diffs.zip](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/b4210d0f68e3168d/state-diffs.zip). All filesystem differences outside the pending subtree/install record: 140 before, 98 after, enumerated in [what-else-changed.md](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/7014fd91fc403cd3/what-else-changed.md).

## Y4-comment

Steps: Trailing-comment updaterCacheDirName: t3code-updater # comment; normal pending and unrelated decoy; literal commented path absent. Launch → inspect → quit.

UTC: before 2026-11-10T16:03:12.937Z → 2026-11-10T16:03:13.525Z; after 2026-11-10T16:03:13.525Z → 2026-11-10T16:03:14.120Z.

| Before | After |
| --- | --- |
| [20c3dd3689](https://git.cafe/pingdotgg/t3code/commit/20c3dd3689782bfcb1a04332086d08017028c718) | [cc3188460e](https://git.cafe/pingdotgg/t3code/commit/cc3188460ec3d52aa9acaffa7418784ddb04c264) |
| [before-Y4-comment-recording.zip](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/a5e90330adbcccba/before-Y4-comment-recording.zip) | [after-Y4-comment-recording.zip](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/7560ce9a4aada08c/after-Y4-comment-recording.zip) |
| Normal pending and decoy retained; record consumed. | Normal pending and decoy retained; record consumed. The literal comment stays in the parsed name; nonexistent target gives successful no-op. |

State diff: `Y4-comment-state-diff.md` and `Y4-comment-state-diff.json` in [state-diffs.zip](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/b4210d0f68e3168d/state-diffs.zip). All filesystem differences outside the pending subtree/install record: 140 before, 140 after, enumerated in [what-else-changed.md](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/7014fd91fc403cd3/what-else-changed.md).

## F3

Steps: Record parent mode 0555, cache writable. Launch 1 → inspect denied unlink → quit → parent 0755 → same-home launch 2 → inspect → quit.

UTC: before 2026-11-10T16:03:14.120Z → 2026-11-10T16:03:15.158Z; after 2026-11-10T16:03:15.158Z → 2026-11-10T16:03:16.336Z.

| Before | After |
| --- | --- |
| [20c3dd3689](https://git.cafe/pingdotgg/t3code/commit/20c3dd3689782bfcb1a04332086d08017028c718) | [cc3188460e](https://git.cafe/pingdotgg/t3code/commit/cc3188460ec3d52aa9acaffa7418784ddb04c264) |
| [before-F3-recording.zip](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/d88b3dc8bf91ce07/before-F3-recording.zip) | [after-F3-recording.zip](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/d044ee672c1d1ed8/after-F3-recording.zip) |
| Launch 1 retains record and pending. Launch 2 consumes record, pending remains. | Launch 1 removes pending but retains record (ignored unlink failure). Launch 2 consumes record with pending already absent, no cleanup warning or false did-not-apply warning. |

State diff: `F3-state-diff.md` and `F3-state-diff.json` in [state-diffs.zip](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/b4210d0f68e3168d/state-diffs.zip). All filesystem differences outside the pending subtree/install record: 144 before, 143 after, enumerated in [what-else-changed.md](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/7014fd91fc403cd3/what-else-changed.md).

## D3

Steps: Cache/pending mode 0555 at launch 1 → restore 0755 → check → real HTTP download with wrong SHA512 → observe failure → quit/relaunch same home → inspect → quit.

UTC: before 2026-11-10T16:03:49.359Z → 2026-11-10T16:03:50.687Z; after 2026-11-10T16:03:50.687Z → 2026-11-10T16:03:52.101Z.

| Before | After |
| --- | --- |
| [20c3dd3689](https://git.cafe/pingdotgg/t3code/commit/20c3dd3689782bfcb1a04332086d08017028c718) | [cc3188460e](https://git.cafe/pingdotgg/t3code/commit/cc3188460ec3d52aa9acaffa7418784ddb04c264) |
| [before-D3-recording.zip](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/f03936c14a6dcb90/before-D3-recording.zip) | [after-D3-recording.zip](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/36fbe1ace35c4be1/after-D3-recording.zip) |
| Applied record consumed at configure, before download; transfer fails, leaving empty pending. Relaunch leaves it unchanged. | Cleanup failure keeps record at launch 1. Record absent at real pending mkdir and artifact HTTP request; checksum fails. Record stays absent; updater removes failed bytes itself, leaving empty pending. Relaunch leaves empty pending unchanged and has no false did-not-apply warning. |

State diff: `D3-state-diff.md` and `D3-state-diff.json` in [state-diffs.zip](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/b4210d0f68e3168d/state-diffs.zip). All filesystem differences outside the pending subtree/install record: 154 before, 154 after, enumerated in [what-else-changed.md](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/7014fd91fc403cd3/what-else-changed.md).

## D4

Steps: Cache/pending mode 0555 at launch 1 → request download in idle state before checking → compare manifests → quit → restore 0755 → same-home launch 2 → inspect → quit.

UTC: before 2026-11-10T16:03:52.101Z → 2026-11-10T16:03:53.393Z; after 2026-11-10T16:03:53.393Z → 2026-11-10T16:03:54.661Z.

| Before | After |
| --- | --- |
| [20c3dd3689](https://git.cafe/pingdotgg/t3code/commit/20c3dd3689782bfcb1a04332086d08017028c718) | [cc3188460e](https://git.cafe/pingdotgg/t3code/commit/cc3188460ec3d52aa9acaffa7418784ddb04c264) |
| [before-D4-recording.zip](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/4c0c8375ff25bb35/before-D4-recording.zip) | [after-D4-recording.zip](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/bfd5af9e241f06e2/after-D4-recording.zip) |
| Applied record already consumed at configure. Refusal leaves cache unchanged; next launch cannot clean pending. | Refusal returns accepted=false/completed=false and preserves exact kept record/cache hashes. Next launch retries successfully, removing pending and record. |

State diff: `D4-state-diff.md` and `D4-state-diff.json` in [state-diffs.zip](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/b4210d0f68e3168d/state-diffs.zip). All filesystem differences outside the pending subtree/install record: 152 before, 149 after, enumerated in [what-else-changed.md](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/7014fd91fc403cd3/what-else-changed.md).

## D6

Steps: Cache/pending mode 0555 at launch 1 → restore cache 0755 → record parent 0555 → check/download → verify SHA256 → quit → record parent 0755 → same-home launch 2 → inspect → quit.

UTC: before 2026-11-10T16:03:54.661Z → 2026-11-10T16:03:56.168Z; after 2026-11-10T16:03:56.169Z → 2026-11-10T16:03:57.626Z.

| Before | After |
| --- | --- |
| [20c3dd3689](https://git.cafe/pingdotgg/t3code/commit/20c3dd3689782bfcb1a04332086d08017028c718) | [cc3188460e](https://git.cafe/pingdotgg/t3code/commit/cc3188460ec3d52aa9acaffa7418784ddb04c264) |
| [before-D6-recording.zip](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/c856ec37acfc6432/before-D6-recording.zip) | [after-D6-recording.zip](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/e21ff35c299d01a8/after-D6-recording.zip) |
| Configure already consumed applied record. Successful new pending download survives launch 2. | Record unlink at download start fails silently; HTTP download completes while record survives. Launch 2 consumes stale applied record and DELETES the new pending payload. This demonstrates the accepted limitation. One needed re-download is an inference; a second transfer was not performed. |

State diff: `D6-state-diff.md` and `D6-state-diff.json` in [state-diffs.zip](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/b4210d0f68e3168d/state-diffs.zip). All filesystem differences outside the pending subtree/install record: 154 before, 154 after, enumerated in [what-else-changed.md](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/7014fd91fc403cd3/what-else-changed.md).

## D5 — unit/harness only

No deterministic production-interface trigger for setup failure/interruption before record removal. The differential-setup setter is a synchronous property assignment, and IPC exposes no internal-fiber cancellation/barrier. HTTP failure starts after the mutation. Injecting a defect or internal cancellation would change the test into a harness. Existing setup-failure/interruption tests inspect state recovery but do not seed a kept applied record; they were inspected, not rerun. D5 record retention remains unverified by this capture step. [D5-driveability.md](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/cb8336f0cdd40c8d/D5-driveability.md)

## What else changed

Beyond expected pending/record changes: test-restored cache/runtime directory modes; Electron profile, cache, local storage, partition and updater-ID files; desktop URL-handler registration; isolated D-Bus/ibus/runtime state; GNOME keyring/NSS profile metadata; normalized desktop settings; CLI-first-launch marker; shell-environment cache; desktop/renderer logs. Every changed path under the isolated home/cache/XDG/T3 roots is listed with type/mode/size/hash in [what-else-changed.md](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/7014fd91fc403cd3/what-else-changed.md). Generated files and timing-dependent startup counts differ between runs; those differences are not attributed to this PR. Capture outputs and inert fixture outside those roots are excluded; transient syscalls between snapshots are not claimed. Raw generated profile/keyring/credential/database contents were excluded from uploads.

## Drivers and supporting evidence

These are ghdrop output links verbatim. Seed state, permissions, feed artifacts and checks are all created by run.mjs.

- [prepare.mjs](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/e5c80cf9c4d0a42c/prepare.mjs)
- [capture-entry.cjs](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/74f7b7fd650ff6c9/capture-entry.cjs)
- [run.mjs](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/e35daaf15e6ff724/run.mjs)
- [record.mjs](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/f4c8b0375cb4ea9c/record.mjs)
- [package.mjs](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/f1118d26a3c15acc/package.mjs)
- [supervise.py](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/f0cd762c09caf157/supervise.py)
- [state-diffs.zip](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/b4210d0f68e3168d/state-diffs.zip)
- [what-else-changed.md](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/7014fd91fc403cd3/what-else-changed.md)
- [build-provenance.zip](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/549f16590848d2f4/build-provenance.zip)
- [diagnostic-attempts.zip](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/f7741431356a5bd9/diagnostic-attempts.zip)
- [inventory.json](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/456f0b0edff03454/inventory.json)

The diagnostic archive preserves the first baseline D3 attempt: it reached checksum failure but stopped on an incorrect driver expectation (status=error). The expected product state is available with errorContext=download; the assertion was corrected and both sides reran from fresh state. No app source was changed.

## Cleanup and attribution

Every successful Electron launch exited zero; all 23 observed Electron PIDs (22 successful launches plus the diagnostic) were verified exited, and every headless session’s descendants were reaped by the subreaper. In-process feed servers were closed. Both extra worktrees were removed after uploads; the lead worktree was untouched. No commit, push, PR edit or comment was made. Build and evidence files remain only under the assigned scratch directory.

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

FRICTION:
- tool | First D3 driver assertion expected error instead of available/errorContext=download; diagnostic preserved and both sides rerun | Read the update-state reducer before asserting the failure status.
- brief | D5 has no deterministic trigger through the real app; marked unit/harness only, with no runtime claim | An explicitly labelled injected harness case is needed to prove retained-record behavior at that boundary.
