PR #31539 variant: proof transcript
main 82ce7456de (patch parent; origin/main 82ce7456de at upload), patch e20bb560cb, PR head e765fa9317
node v26.13.1, electron-updater 6.8.9 (repo's patched copy), Darwin arm64

===== MacUpdater sessions: node drive-electron-updater.cjs <worktree> <package> =====
mock-update-server pid=17923 port=51498 root=<proof-dir>/harness/feed
[s1 first launch, user clicks Download] info: Checking for update
[s1 first launch, user clicks Download] info: Found version 0.1.7 (url: T3-Code-0.1.7-arm64-mac.zip, T3-Code-0.1.7-mac.zip)
[s1 first launch, user clicks Download] EVENT update-available version=0.1.7
[s1 first launch, user clicks Download] info: Downloading update from T3-Code-0.1.7-arm64-mac.zip, T3-Code-0.1.7-mac.zip
[s1 first launch, user clicks Download] info: Unable to locate previous update.zip for differential download (is this first install?), falling back to full download
[s1 first launch, user clicks Download] info: New version 0.1.7 has been downloaded to <proof-dir>/harness/cache/t3code-updater/pending/T3-Code-0.1.7-arm64-mac.zip
[s1 first launch, user clicks Download] EVENT update-downloaded version=0.1.7
{"label":"s1 first launch, user clicks Download","downloadedStateAfterCheckOnly":false,"downloadUpdateMs":269.6,"packageGets":1,"pendingAfter":["T3-Code-0.1.7-arm64-mac.zip 181731595B","update-info.json 173B"]}
[s2 relaunch, cache intact] info: Checking for update
[s2 relaunch, cache intact] info: Found version 0.1.7 (url: T3-Code-0.1.7-arm64-mac.zip, T3-Code-0.1.7-mac.zip)
[s2 relaunch, cache intact] EVENT update-available version=0.1.7
[s2 relaunch, cache intact] info: Downloading update from T3-Code-0.1.7-arm64-mac.zip, T3-Code-0.1.7-mac.zip
[s2 relaunch, cache intact] info: Update has already been downloaded to <proof-dir>/harness/cache/t3code-updater/pending/T3-Code-0.1.7-arm64-mac.zip).
[s2 relaunch, cache intact] EVENT update-downloaded version=0.1.7
{"label":"s2 relaunch, cache intact","downloadedStateAfterCheckOnly":false,"downloadUpdateMs":217.7,"packageGets":0,"pendingAfter":["T3-Code-0.1.7-arm64-mac.zip 181731595B","update-info.json 173B"]}
[s3 relaunch, one cached byte flipped] info: Checking for update
[s3 relaunch, one cached byte flipped] info: Found version 0.1.7 (url: T3-Code-0.1.7-arm64-mac.zip, T3-Code-0.1.7-mac.zip)
[s3 relaunch, one cached byte flipped] EVENT update-available version=0.1.7
[s3 relaunch, one cached byte flipped] info: Downloading update from T3-Code-0.1.7-arm64-mac.zip, T3-Code-0.1.7-mac.zip
[s3 relaunch, one cached byte flipped] warn: Sha512 checksum doesn't match the latest available update. New update must be downloaded. Cached: /tlWKQjIwK+4DzLI5y0uToC+DwRjVp3a2ui+lx1gSgFwV3muamIl6lk4a1aOJeqS6X/hAL9UqED5tbNJEG9TSw==, expected: 1cCBdiw6yG1DXXHuK7IJJC
[s3 relaunch, one cached byte flipped] info: Download block maps (old: "http://localhost:51498/T3-Code-0.1.6-arm64-mac.zip.blockmap", new: http://localhost:51498/T3-Code-0.1.7-arm64-mac.zip.blockmap)
[s3 relaunch, one cached byte flipped] error: Cannot download differentially, fallback to full download: Error: Cannot download "http://localhost/T3-Code-0.1.7-arm64-mac.zip.blockmap", status 404: Not Found
[s3 relaunch, one cached byte flipped] info: New version 0.1.7 has been downloaded to <proof-dir>/harness/cache/t3code-updater/pending/T3-Code-0.1.7-arm64-mac.zip
[s3 relaunch, one cached byte flipped] EVENT update-downloaded version=0.1.7
{"label":"s3 relaunch, one cached byte flipped","downloadedStateAfterCheckOnly":false,"downloadUpdateMs":419,"packageGets":1,"pendingAfter":["T3-Code-0.1.7-arm64-mac.zip 181731595B","update-info.json 173B"]}
[s4 relaunch, pending cache purged] info: Checking for update
[s4 relaunch, pending cache purged] info: Found version 0.1.7 (url: T3-Code-0.1.7-arm64-mac.zip, T3-Code-0.1.7-mac.zip)
[s4 relaunch, pending cache purged] EVENT update-available version=0.1.7
[s4 relaunch, pending cache purged] info: Downloading update from T3-Code-0.1.7-arm64-mac.zip, T3-Code-0.1.7-mac.zip
[s4 relaunch, pending cache purged] info: Download block maps (old: "http://localhost:51498/T3-Code-0.1.6-arm64-mac.zip.blockmap", new: http://localhost:51498/T3-Code-0.1.7-arm64-mac.zip.blockmap)
[s4 relaunch, pending cache purged] error: Cannot download differentially, fallback to full download: Error: Cannot download "http://localhost/T3-Code-0.1.7-arm64-mac.zip.blockmap", status 404: Not Found
[s4 relaunch, pending cache purged] info: New version 0.1.7 has been downloaded to <proof-dir>/harness/cache/t3code-updater/pending/T3-Code-0.1.7-arm64-mac.zip
[s4 relaunch, pending cache purged] EVENT update-downloaded version=0.1.7
{"label":"s4 relaunch, pending cache purged","downloadedStateAfterCheckOnly":false,"downloadUpdateMs":274.3,"packageGets":1,"pendingAfter":["T3-Code-0.1.7-arm64-mac.zip 181731595B","update-info.json 173B"]}
mock server package GETs in order: ["/T3-Code-0.1.7-arm64-mac.zip","/T3-Code-0.1.7-arm64-mac.zip","/T3-Code-0.1.7-arm64-mac.zip"]
all mock server requests: ["/latest-mac.yml","/latest-mac.yml","/T3-Code-0.1.7-arm64-mac.zip","/latest-mac.yml","/latest-mac.yml","/T3-Code-0.1.7-arm64-mac.zip.blockmap","/T3-Code-0.1.7-arm64-mac.zip","/latest-mac.yml","/T3-Code-0.1.7-arm64-mac.zip.blockmap","/T3-Code-0.1.7-arm64-mac.zip"]

===== sha512 cost: node bench-hash.mjs <worktree> <package> 5 =====
wrote 181731595 random bytes to <proof-dir>/pkg-180mb.bin
{
  "node": "v26.13.1",
  "bytes": 181731595,
  "runs": 5,
  "pageCache": "warm (file written by this process or a prior run; no purge, root required)",
  "results": [
    {
      "name": "electron-updater hashFile (1 MiB stream)",
      "digest": "1cCBdiw6yG1DXXHu",
      "mean": 116.4,
      "p95": 119.7,
      "min": 113.2,
      "samples": [
        118.9,
        113.2,
        113.5,
        116.6,
        119.7
      ]
    },
    {
      "name": "PR #31539 pre-check (Effect fs.stream 64 KiB)",
      "digest": "1cCBdiw6yG1DXXHu",
      "mean": 147.3,
      "p95": 151.4,
      "min": 142.1,
      "samples": [
        151.4,
        151,
        147.2,
        144.9,
        142.1
      ]
    }
  ]
}

===== patch: vp test run apps/desktop/src/updates/ =====
 Test Files  6 passed (6)
      Tests  114 passed (114)

===== patch: vp test run apps/desktop/src/updates/DesktopUpdates.test.ts =====
 Test Files  1 passed (1)
      Tests  56 passed (56)

===== patch: new cases (-t 'relaunch|finished download after quitting|track switch held|own download|install that applied') =====
 ✓ |@t3tools/desktop (unit)| src/updates/DesktopUpdates.test.ts > DesktopUpdates > restores a finished download after quitting without installing 13ms
 ✓ |@t3tools/desktop (unit)| src/updates/DesktopUpdates.test.ts > DesktopUpdates > restores on the next check when a track switch held the updater 2ms
 ✓ |@t3tools/desktop (unit)| src/updates/DesktopUpdates.test.ts > DesktopUpdates > does not restore after the user's own download of that release failed 3ms
 ✓ |@t3tools/desktop (unit)| src/updates/DesktopUpdates.test.ts > DesktopUpdates > keeps a newer release than the one downloaded click-to-download after relaunch 1ms
 ✓ |@t3tools/desktop (unit)| src/updates/DesktopUpdates.test.ts > DesktopUpdates > keeps a download another build recorded click-to-download after relaunch 1ms
 ✓ |@t3tools/desktop (unit)| src/updates/DesktopUpdates.test.ts > DesktopUpdates > keeps an offer that changed while the restore… click-to-download after relaunch 1ms
 ✓ |@t3tools/desktop (unit)| src/updates/DesktopUpdates.test.ts > DesktopUpdates > keeps a release offered as quitting begins click-to-download after relaunch 1ms
 ✓ |@t3tools/desktop (unit)| src/updates/DesktopUpdates.test.ts > DesktopUpdates > does not flag an install that applied 1ms
      Tests  8 passed | 48 skipped (56)

===== main DesktopUpdates.ts + the patch's tests (--testTimeout=5000) =====
 × |@t3tools/desktop (unit)| src/updates/DesktopUpdates.test.ts > DesktopUpdates > restores a finished download after quitting without installing 5017ms
   → Test timed out in 5000ms.
 × |@t3tools/desktop (unit)| src/updates/DesktopUpdates.test.ts > DesktopUpdates > restores on the next check when a track switch held the updater 5004ms
   → Test timed out in 5000ms.
 ✓ |@t3tools/desktop (unit)| src/updates/DesktopUpdates.test.ts > DesktopUpdates > does not restore after the user's own download of that release failed 9ms
 ✓ |@t3tools/desktop (unit)| src/updates/DesktopUpdates.test.ts > DesktopUpdates > keeps a newer release than the one downloaded click-to-download after relaunch 3ms
 ✓ |@t3tools/desktop (unit)| src/updates/DesktopUpdates.test.ts > DesktopUpdates > keeps a download another build recorded click-to-download after relaunch 2ms
 ✓ |@t3tools/desktop (unit)| src/updates/DesktopUpdates.test.ts > DesktopUpdates > keeps an offer that changed while the restore… click-to-download after relaunch 2ms
 ✓ |@t3tools/desktop (unit)| src/updates/DesktopUpdates.test.ts > DesktopUpdates > keeps a release offered as quitting begins click-to-download after relaunch 3ms
 × |@t3tools/desktop (unit)| src/updates/DesktopUpdates.test.ts > DesktopUpdates > does not flag an install that applied 4ms
   → expected '{"fromVersion":"1.2.2","targetVersion…' to equal undefined
⎯⎯⎯⎯⎯⎯⎯ Failed Tests 3 ⎯⎯⎯⎯⎯⎯⎯
      Tests  3 failed | 5 passed | 48 skipped (56)

===== patch: remove one guard at a time (mutations.sh), restore and applied-install tests =====
== record from another build accepted
     × keeps a download another build recorded click-to-download after relaunch 5ms
     × does not flag an install that applied 2ms
⎯⎯⎯⎯⎯⎯⎯ Failed Tests 2 ⎯⎯⎯⎯⎯⎯⎯
      Tests  2 failed | 6 passed | 48 skipped (56)
== changed offer not refused
     × keeps an offer that changed while the restore… click-to-download after relaunch 5ms
⎯⎯⎯⎯⎯⎯⎯ Failed Tests 1 ⎯⎯⎯⎯⎯⎯⎯
      Tests  1 failed | 7 passed | 48 skipped (56)
== quitting not refused
     × keeps a release offered as quitting begins click-to-download after relaunch 5ms
⎯⎯⎯⎯⎯⎯⎯ Failed Tests 1 ⎯⎯⎯⎯⎯⎯⎯
      Tests  1 failed | 7 passed | 48 skipped (56)
== no restore on a later check
     × restores on the next check when a track switch held the updater 5004ms
⎯⎯⎯⎯⎯⎯⎯ Failed Tests 1 ⎯⎯⎯⎯⎯⎯⎯
      Tests  1 failed | 7 passed | 48 skipped (56)
== record written before the ready state
     × restores a finished download after quitting without installing 17ms
⎯⎯⎯⎯⎯⎯⎯ Failed Tests 1 ⎯⎯⎯⎯⎯⎯⎯
      Tests  1 failed | 7 passed | 48 skipped (56)
== stale record kept
     × does not flag an install that applied 4ms
⎯⎯⎯⎯⎯⎯⎯ Failed Tests 1 ⎯⎯⎯⎯⎯⎯⎯
      Tests  1 failed | 7 passed | 48 skipped (56)
== admitted download leaves the restore armed
     × does not restore after the user's own download of that release failed 6ms
⎯⎯⎯⎯⎯⎯⎯ Failed Tests 1 ⎯⎯⎯⎯⎯⎯⎯
      Tests  1 failed | 7 passed | 48 skipped (56)
== restore admitted after a download used it up
     × does not restore after the user's own download of that release failed 6ms
⎯⎯⎯⎯⎯⎯⎯ Failed Tests 1 ⎯⎯⎯⎯⎯⎯⎯
      Tests  1 failed | 7 passed | 48 skipped (56)
source restored

===== PR head: DesktopUpdates.test.ts + DesktopRemoteUpdates.test.ts =====
 Test Files  2 passed (2)
      Tests  74 passed (74)

===== patch: vp run check:changed (summary) =====
check:changed summary
  pass  format  0.2s
  pass  lint  0.4s
  pass  knip 1/2  6.0s
  pass  knip 2/2  9.8s
  pass  typecheck (2 packages)  0.3s
  pass  test (1 files)  6.0s
  CI also runs: full test suites, build
  unused patch check skipped: no dependency files changed

