{
  "number": 15386,
  "url": "https://github.com/pingdotgg/t3code/pull/15386",
  "headRepository": "TonybynMp4/t3code",
  "headBranch": "fix/desktop-updater-first-click-error",
  "head": "42344734a24db6a315ecbff45abc5d23089b52a9",
  "mergedMain": "10f7db7e38ea353c5b2b6c324c155cb6a6bedf72",
  "source": "/home/julius/.cache/t3-takeover-20261018/worktrees/pr-15386",
  "fixtureRoot": "/home/julius/.cache/t3-takeover-20261018/queue3/15386-runtime",
  "status": "PASS",
  "completedAt": "2026-10-19T17:27:49.999909+00:00",
  "commands": [
    "node /home/julius/.cache/t3-takeover-20261018/queue3/15386-runtime/build.mjs adapter",
    "node /home/julius/.cache/t3-takeover-20261018/queue3/15386-runtime/run.mjs adapter --red",
    "node /home/julius/.cache/t3-takeover-20261018/queue3/15386-runtime/run.mjs adapter",
    "node /home/julius/.cache/t3-takeover-20261018/queue3/15386-runtime/build.mjs service",
    "node /home/julius/.cache/t3-takeover-20261018/queue3/15386-runtime/run.mjs service"
  ],
  "dependencies": {
    "source": "/home/julius/.cache/t3-takeover-20261018/worktrees/pr-15386",
    "head": "42344734a24db6a315ecbff45abc5d23089b52a9",
    "base": "10f7db7e38ea353c5b2b6c324c155cb6a6bedf72",
    "updaterEntry": "/home/julius/.cache/t3-takeover-20261018/worktrees/pr-15386/node_modules/.pnpm/electron-updater@6.8.9/node_modules/electron-updater/out/main.js",
    "updaterVersion": "6.8.9",
    "electron": "/home/julius/.cache/t3-takeover-20261018/worktrees/pr-15386/node_modules/.pnpm/electron@44.4.5/node_modules/electron/dist/electron",
    "generatedAt": "2026-10-19T17:27:22.806Z",
    "sourceHashes": {
      "adapter-baseline": "2f40f114910f2efa5451c2d56a15af9d8ac71c73e9d705660d647c140ebaf7ee",
      "adapter-head": "16dfd35a940766f1be3b6cfca28cc9e8add8a8bc4b6bc06640a1720506ac7423",
      "harnessOriginal": "6c3e00b12112a7b9f2cf3801d430156118837e99dc8cbd72ae913af17d28135e",
      "harnessAdapted": "4af72b9b0ba244af4effb631690d1368cacc53c815c8bc72f324034a6ab6fd98"
    },
    "substitution": "baseline differs only in production ElectronUpdater.ts, from merged main; all other source is pinned head"
  },
  "sourceHashesAfter": {
    "apps/desktop/src/electron/ElectronUpdater.ts": "16dfd35a940766f1be3b6cfca28cc9e8add8a8bc4b6bc06640a1720506ac7423",
    "apps/desktop/src/updates/DesktopUpdates.ts": "3f572174499e66fec91131b1572070f98f97f5fe29f8e0c0ad9f15da18081996",
    "pnpm-lock.yaml": "0609bd1ec42bc1d36ca2f2a2621cb6dcfe1981fa8c2f49ad27872b530d4c7f61"
  },
  "sourceUnchanged": true,
  "results": {
    "adapter-baseline": {
      "kind": "production-adapter-real-updater",
      "baseline": true,
      "observations": [
        {
          "scenario": "missing-path",
          "firstCallFailed": false,
          "typedFailure": null,
          "globalDeliveriesDuringCall": 1,
          "nativeSynchronousEmissions": 1,
          "laterGlobalDeliveries": 2,
          "sameErrorDeliveredAfterCall": true,
          "captureListenerRemoved": true,
          "cause": "No update filepath provided, can't quit and install",
          "scopedListenerRemoved": true
        },
        {
          "scenario": "controlled-native-failure",
          "firstCallFailed": false,
          "typedFailure": null,
          "globalDeliveriesDuringCall": 1,
          "nativeSynchronousEmissions": 1,
          "laterGlobalDeliveries": 2,
          "sameErrorDeliveredAfterCall": true,
          "captureListenerRemoved": true,
          "cause": "Controlled native install boundary refused",
          "scopedListenerRemoved": true
        }
      ],
      "head": "42344734a24db6a315ecbff45abc5d23089b52a9",
      "base": "10f7db7e38ea353c5b2b6c324c155cb6a6bedf72",
      "versions": {
        "node": "24.21.0",
        "acorn": "8.18.0",
        "ada": "4.0.0",
        "amaro": "1.1.11",
        "ares": "1.34.8",
        "brotli": "1.2.0",
        "cldr": "48.0",
        "icu": "78.2",
        "llhttp": "9.4.3",
        "merve": "1.2.2",
        "modules": "149",
        "napi": "10",
        "nbytes": "0.1.4",
        "ncrypto": "0.0.1",
        "nghttp2": "1.70.0",
        "nghttp3": "",
        "ngtcp2": "",
        "openssl": "0.0.0",
        "simdjson": "4.6.7",
        "simdutf": "7.7.0",
        "sqlite": "3.53.4",
        "tz": "2025c",
        "undici": "7.29.1",
        "unicode": "17.0",
        "uv": "1.52.1",
        "uvwasi": "0.0.23",
        "v8": "15.2.124.28-electron.0",
        "zlib": "1.3.2.1-motley",
        "zstd": "1.6.0",
        "electron": "44.4.5",
        "chrome": "152.0.7977.130"
      },
      "updaterClass": "AppImageUpdater",
      "electronProcessType": "browser",
      "tripwires": [],
      "actualInstallerRan": false,
      "appQuitOrRelaunchCalled": false
    },
    "adapter-head": {
      "kind": "production-adapter-real-updater",
      "baseline": false,
      "observations": [
        {
          "scenario": "missing-path",
          "firstCallFailed": true,
          "typedFailure": "ElectronUpdaterQuitAndInstallError",
          "globalDeliveriesDuringCall": 0,
          "nativeSynchronousEmissions": 1,
          "laterGlobalDeliveries": 2,
          "sameErrorDeliveredAfterCall": true,
          "captureListenerRemoved": true,
          "cause": "No update filepath provided, can't quit and install",
          "scopedListenerRemoved": true
        },
        {
          "scenario": "controlled-native-failure",
          "firstCallFailed": true,
          "typedFailure": "ElectronUpdaterQuitAndInstallError",
          "globalDeliveriesDuringCall": 0,
          "nativeSynchronousEmissions": 1,
          "laterGlobalDeliveries": 2,
          "sameErrorDeliveredAfterCall": true,
          "captureListenerRemoved": true,
          "cause": "Controlled native install boundary refused",
          "scopedListenerRemoved": true
        }
      ],
      "head": "42344734a24db6a315ecbff45abc5d23089b52a9",
      "base": "10f7db7e38ea353c5b2b6c324c155cb6a6bedf72",
      "versions": {
        "node": "24.21.0",
        "acorn": "8.18.0",
        "ada": "4.0.0",
        "amaro": "1.1.11",
        "ares": "1.34.8",
        "brotli": "1.2.0",
        "cldr": "48.0",
        "icu": "78.2",
        "llhttp": "9.4.3",
        "merve": "1.2.2",
        "modules": "149",
        "napi": "10",
        "nbytes": "0.1.4",
        "ncrypto": "0.0.1",
        "nghttp2": "1.70.0",
        "nghttp3": "",
        "ngtcp2": "",
        "openssl": "0.0.0",
        "simdjson": "4.6.7",
        "simdutf": "7.7.0",
        "sqlite": "3.53.4",
        "tz": "2025c",
        "undici": "7.29.1",
        "unicode": "17.0",
        "uv": "1.52.1",
        "uvwasi": "0.0.23",
        "v8": "15.2.124.28-electron.0",
        "zlib": "1.3.2.1-motley",
        "zstd": "1.6.0",
        "electron": "44.4.5",
        "chrome": "152.0.7977.130"
      },
      "updaterClass": "AppImageUpdater",
      "electronProcessType": "browser",
      "tripwires": [],
      "actualInstallerRan": false,
      "appQuitOrRelaunchCalled": false
    },
    "service-baseline": {
      "kind": "production-desktop-updates-real-adapter",
      "baseline": true,
      "install": {
        "accepted": true,
        "completed": false,
        "state": {
          "enabled": true,
          "status": "downloaded",
          "channel": "latest",
          "currentVersion": "1.2.3",
          "hostArch": "x64",
          "appArch": "x64",
          "runningUnderArm64Translation": false,
          "availableVersion": "1.2.4",
          "downloadedVersion": "1.2.4",
          "releaseNotes": [],
          "omittedReleaseCount": 0,
          "downloadPercent": 100,
          "checkedAt": null,
          "message": "Desktop updater install operation reported an error.",
          "errorContext": "install",
          "canRetry": true
        }
      },
      "stops": 1,
      "starts": 1,
      "quitting": false,
      "remainingRestartMarkers": 0,
      "remainingInstallRecords": 0,
      "logs": [
        {
          "component": "desktop-updater",
          "errorTag": "DesktopUpdaterReportedError",
          "cause": "Error: No update filepath provided, can't quit and install",
          "operation": "install"
        }
      ],
      "sameErrorGlobalRoutingChecked": false,
      "head": "42344734a24db6a315ecbff45abc5d23089b52a9",
      "base": "10f7db7e38ea353c5b2b6c324c155cb6a6bedf72",
      "versions": {
        "node": "24.21.0",
        "acorn": "8.18.0",
        "ada": "4.0.0",
        "amaro": "1.1.11",
        "ares": "1.34.8",
        "brotli": "1.2.0",
        "cldr": "48.0",
        "icu": "78.2",
        "llhttp": "9.4.3",
        "merve": "1.2.2",
        "modules": "149",
        "napi": "10",
        "nbytes": "0.1.4",
        "ncrypto": "0.0.1",
        "nghttp2": "1.70.0",
        "nghttp3": "",
        "ngtcp2": "",
        "openssl": "0.0.0",
        "simdjson": "4.6.7",
        "simdutf": "7.7.0",
        "sqlite": "3.53.4",
        "tz": "2025c",
        "undici": "7.29.1",
        "unicode": "17.0",
        "uv": "1.52.1",
        "uvwasi": "0.0.23",
        "v8": "15.2.124.28-electron.0",
        "zlib": "1.3.2.1-motley",
        "zstd": "1.6.0",
        "electron": "44.4.5",
        "chrome": "152.0.7977.130"
      },
      "updaterClass": "AppImageUpdater",
      "electronProcessType": "browser",
      "tripwires": [],
      "actualInstallerRan": false,
      "appQuitOrRelaunchCalled": false
    },
    "service-head": {
      "kind": "production-desktop-updates-real-adapter",
      "baseline": false,
      "install": {
        "accepted": true,
        "completed": false,
        "state": {
          "enabled": true,
          "status": "downloaded",
          "channel": "latest",
          "currentVersion": "1.2.3",
          "hostArch": "x64",
          "appArch": "x64",
          "runningUnderArm64Translation": false,
          "availableVersion": "1.2.4",
          "downloadedVersion": "1.2.4",
          "releaseNotes": [],
          "omittedReleaseCount": 0,
          "downloadPercent": 100,
          "checkedAt": null,
          "message": "Electron updater failed to quit and install the update on channel latest (silent: true, force run after: true).",
          "errorContext": "install",
          "canRetry": true
        }
      },
      "stops": 1,
      "starts": 1,
      "quitting": false,
      "remainingRestartMarkers": 0,
      "remainingInstallRecords": 0,
      "logs": [
        {
          "component": "desktop-updater",
          "errorTag": "ElectronUpdaterQuitAndInstallError",
          "cause": "Error: No update filepath provided, can't quit and install",
          "channel": "latest",
          "isSilent": true,
          "isForceRunAfter": true,
          "reason": "no-installer-path"
        },
        {
          "component": "desktop-updater",
          "errorTag": "DesktopUpdaterReportedError",
          "cause": "Error: No update filepath provided, can't quit and install",
          "operation": "background"
        }
      ],
      "sameErrorGlobalRoutingChecked": true,
      "head": "42344734a24db6a315ecbff45abc5d23089b52a9",
      "base": "10f7db7e38ea353c5b2b6c324c155cb6a6bedf72",
      "versions": {
        "node": "24.21.0",
        "acorn": "8.18.0",
        "ada": "4.0.0",
        "amaro": "1.1.11",
        "ares": "1.34.8",
        "brotli": "1.2.0",
        "cldr": "48.0",
        "icu": "78.2",
        "llhttp": "9.4.3",
        "merve": "1.2.2",
        "modules": "149",
        "napi": "10",
        "nbytes": "0.1.4",
        "ncrypto": "0.0.1",
        "nghttp2": "1.70.0",
        "nghttp3": "",
        "ngtcp2": "",
        "openssl": "0.0.0",
        "simdjson": "4.6.7",
        "simdutf": "7.7.0",
        "sqlite": "3.53.4",
        "tz": "2025c",
        "undici": "7.29.1",
        "unicode": "17.0",
        "uv": "1.52.1",
        "uvwasi": "0.0.23",
        "v8": "15.2.124.28-electron.0",
        "zlib": "1.3.2.1-motley",
        "zstd": "1.6.0",
        "electron": "44.4.5",
        "chrome": "152.0.7977.130"
      },
      "updaterClass": "AppImageUpdater",
      "electronProcessType": "browser",
      "tripwires": [],
      "actualInstallerRan": false,
      "appQuitOrRelaunchCalled": false
    }
  },
  "red": {
    "expectedFailure": true,
    "assertion": "first native emitted error must fail the call",
    "file": "/home/julius/.cache/t3-takeover-20261018/queue3/15386-runtime/runs/adapter-baseline-red/expected-red.json"
  },
  "conclusions": [
    "Baseline fails the identical head expectation in a real Electron process. Both missing-path and controlled doInstall failure emit synchronously but incorrectly return adapter success; production global error listener sees one delivery.",
    "Head turns the first call into ElectronUpdaterQuitAndInstallError with the exact original cause and suppresses global delivery only during that call. Both post-call unrelated and same-Error emissions reach global listeners once. Capture and scoped listeners are removed.",
    "Production DesktopUpdates at head performs one stop and one recovery start, resets quitting, clears in-memory install/restart records, logs exactly one typed first-call install failure with no-installer-path, and delivers later same-Error re-emission to global background handling without a second recovery.",
    "Baseline DesktopUpdates also eventually recovers through its global event handler; completed is false in BOTH variants. Do not claim baseline completed=true or a UI rendering bug was reproduced. The proven difference is method-level failure versus success and the corresponding typed service diagnostic/control path."
  ],
  "boundaries": [
    "Real headless Electron browser/main process, no BrowserWindow or renderer. No UI, preload, IPC, toast, Settings, or physical host claim.",
    "Actual electron-updater 6.8.9 platform singleton is AppImageUpdater; its unchanged BaseUpdater.quitAndInstall/install and AppUpdater.dispatchError implement this proof. Does not run DebUpdater package-manager/elevation logic.",
    "Missing-path case uses real untouched native guard with no downloaded helper. Controlled-failure case supplies only in-memory downloaded metadata and replaces doInstall with an exact Error throw; no installer file exists or is executed.",
    "Production DesktopUpdates uses an adapted copy of its existing test harness for fake window, backend pool, environment/settings and filesystem. Only the updater layer is replaced with the real production layer. Backend starts/stops are counted effects, not live servers.",
    "Fake filesystem marker/record cleanup and one restart are proven as service behavior, not actual filesystem or backend lifecycle integration. /proc NoNewPrivs/elevation is not exercised.",
    "Isolated Electron uses --no-sandbox and ozone headless. Native process and updater network/install/quit/relaunch boundaries have tripwires. No updater checks/downloads, native privileged helpers, app quit or relaunch occurred.",
    "No repository tests, install, desktop application build, dev server, live database, browser/device automation, fleet change, child delegation, or GitHub content write performed in this task. Only small standalone esbuild bundles ran after explicit heavy-slot authorization."
  ],
  "cleanup": {
    "processes": [
      {
        "run": "adapter-baseline",
        "pid": 2601497,
        "status": 0,
        "signal": null,
        "reaped": true,
        "procExistsAfterReap": false
      },
      {
        "run": "adapter-baseline-red",
        "pid": 2601452,
        "status": 1,
        "signal": null,
        "reaped": true,
        "procExistsAfterReap": false
      },
      {
        "run": "adapter-head",
        "pid": 2601520,
        "status": 0,
        "signal": null,
        "reaped": true,
        "procExistsAfterReap": false
      },
      {
        "run": "service-baseline",
        "pid": 2601041,
        "status": 0,
        "signal": null,
        "reaped": true,
        "procExistsAfterReap": false
      },
      {
        "run": "service-head",
        "pid": 2601079,
        "status": 0,
        "signal": null,
        "reaped": true,
        "procExistsAfterReap": false
      }
    ],
    "allTrackedProcessesExited": true,
    "initialAttempt": {
      "runnerPid": 2598371,
      "spawnedChildren": [
        2598395
      ],
      "basis": "exact children of this turn owned runner, cwd verified; graceful timeout stuck after process.exit",
      "signal": "SIGKILL"
    },
    "initialPidsVerifiedGone": [
      2598371,
      2598395,
      2598397,
      2598433,
      2598445
    ],
    "exitMethod": "process.reallyExit for isolated harness termination, not app.quit/relaunch/exit. Async runner records PID at spawn and has 30s SIGKILL watchdog.",
    "note": "Initial process.exit returned without exiting Electron; isolated first attempt was terminated through its exact runner-child relationship after verifying cwd. Subsequent runs exit 0 and are reaped."
  },
  "fixtureCorrections": [
    "Optional service build marked unavailable macOS-only @electron-webauthn/macos external; never executed on Linux.",
    "Removed fixture assertion for public updates.install.failed: source intentionally strips that internal field. Public service result and typed logs are asserted. Initial failed fixture artifact retained as superseded-fixture-assertion.json."
  ],
  "fixtureHashes": {
    "build.mjs": "86599a562cc7987991dcec027fc24f120950aa6b7efb5ebace2b5fb96ff9ddc0",
    "run.mjs": "d3a7af100a219e8c43e59187e9a7d4f14904c6fcb966a9241afa2f6670fc9d65",
    "electron-main.cjs": "a1b44c037b92272712dfad0ebea347187b34eceeea4e6c943e380b1cf75cd485",
    "adapter-proof.ts": "818f6bfb20a928a303da060267e026ca2dd09fcccc3cf7c69af3e81be9876d4e",
    "service-proof.ts": "868bc33d70d19251e4efd8b56d3b289e8b425289a179d5376e99058f1119987f",
    "ElectronUpdater.head.ts": "16dfd35a940766f1be3b6cfca28cc9e8add8a8bc4b6bc06640a1720506ac7423",
    "ElectronUpdater.baseline.ts": "2f40f114910f2efa5451c2d56a15af9d8ac71c73e9d705660d647c140ebaf7ee",
    "updatesTestHarness.adapted.ts": "4af72b9b0ba244af4effb631690d1368cacc53c815c8bc72f324034a6ab6fd98"
  },
  "publicArtifact": null,
  "publicArtifactReason": "No UI claim or GitHub write required; local structured logs and reproducible scripts are sufficient.",
  "prLinked": true
}
