operator app: the installed app never offers an update — pin the release feed and key into the packaged build #2166

Closed
opened 2026-11-04 18:22:03 +00:00 by ben · 5 comments
Owner

What's wrong

The operator app's update strip (ADR 0098, the AppUpdate ladder in app/src/lib/appupdate.ts) never appears in an installed app. channelSource() in app/src-electron/electron-main.ts:74 configures the update channel only when the process env carries IDSS_RELEASE_FEED and IDSS_RELEASE_PUBKEY. Nothing in packaging sets either one, so every .deb we've shipped (3363, 3371, 3400) silently falls back to the "no updates" refusal (ADR 0100). An operator never learns a new release exists. Ben hit this on 2026-11-04 when the GOTCHAS #409 fix (blank page on a card's Open) needed a hand-built installer to reach him.

What to build

The packaged app carries its update channel: the testing feed's URL and the pinned public release key are fixed at build time, so an installed app finds them with no env.

  • Pin the feed URL and the public key into the packaged build. The key isn't a secret (it's the public verification key, ADR 0033 / #211 ruling). Use the same feed and key the fleet rail signs (scripts/release-rail/, get.idss.nz testing channel).
  • An env override still wins, for dev and tests.
  • Check that the feed actually carries the operator-app artifact for the platform. If the release rail doesn't publish the .deb as a feed artifact yet, that's part of this ticket, or split it out and say so here.

Acceptance criteria

  • An installed .deb built from main, launched with no IDSS_RELEASE_* env, checks the testing feed and shows the update strip when the feed carries a newer release than the running one.
  • Apply verifies the signature against the pinned key, installs, and restarts onto the newer release (ADR 0098). A bad signature is refused, not installed.
  • With the env override set, the override wins (dev/tests unchanged).
  • A seam test pins that the packaged config carries both values (tests/unit/packagedConfig.test.ts is the natural home), so a future packaging change can't silently drop them again.
  • GOTCHAS entry for the silent-refusal hazard; STATUS.md line.
## What's wrong The operator app's update strip (ADR 0098, the `AppUpdate` ladder in `app/src/lib/appupdate.ts`) never appears in an installed app. `channelSource()` in `app/src-electron/electron-main.ts:74` configures the update channel only when the process env carries `IDSS_RELEASE_FEED` and `IDSS_RELEASE_PUBKEY`. Nothing in packaging sets either one, so every `.deb` we've shipped (3363, 3371, 3400) silently falls back to the "no updates" refusal (ADR 0100). An operator never learns a new release exists. Ben hit this on 2026-11-04 when the GOTCHAS #409 fix (blank page on a card's Open) needed a hand-built installer to reach him. ## What to build The packaged app carries its update channel: the testing feed's URL and the pinned public release key are fixed at build time, so an installed app finds them with no env. - Pin the feed URL and the public key into the packaged build. The key isn't a secret (it's the public verification key, ADR 0033 / #211 ruling). Use the same feed and key the fleet rail signs (`scripts/release-rail/`, get.idss.nz testing channel). - An env override still wins, for dev and tests. - Check that the feed actually carries the operator-app artifact for the platform. If the release rail doesn't publish the `.deb` as a feed artifact yet, that's part of this ticket, or split it out and say so here. ## Acceptance criteria - [ ] An installed `.deb` built from main, launched with no `IDSS_RELEASE_*` env, checks the testing feed and shows the update strip when the feed carries a newer release than the running one. - [ ] Apply verifies the signature against the pinned key, installs, and restarts onto the newer release (ADR 0098). A bad signature is refused, not installed. - [ ] With the env override set, the override wins (dev/tests unchanged). - [ ] A seam test pins that the packaged config carries both values (`tests/unit/packagedConfig.test.ts` is the natural home), so a future packaging change can't silently drop them again. - [ ] GOTCHAS entry for the silent-refusal hazard; STATUS.md line.

swarm-claim host=bens-mac-04 run=60081
(automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=bens-mac-04 run=60081 (automated multi-host claim — lowest live claim id works this ticket)

⏩ independent reviewer for #2166 — verdict unauthenticated

review JSON
{
  "verdict": "unauthenticated",
  "findings": []
}
:fast_forward: **independent reviewer** for #2166 — verdict `unauthenticated` <details><summary>review JSON</summary> ```json { "verdict": "unauthenticated", "findings": [] } ``` </details>

close-report for #2166 — status success

✅ close-report gates passed — every claim verified against the pushed worker branch sandcastle/worker/20261104-135410-63b0a2 (pre-land — the host promotes it to main only after its post-run verify, #193/#283); issue closed.

envelope
{
  "issue": 2166,
  "status": "success",
  "commits": [
    "a871342077d74735fa8e7a4acd132f10e970728e"
  ],
  "changed_files": [
    "STATUS.md",
    "app/src-electron/electron-main.ts",
    "app/src-electron/releaseChannel.ts",
    "app/tests/unit/packagedConfig.test.ts",
    "docs/GOTCHAS.md"
  ],
  "tests": [
    {
      "command": "cd app && CI=true npx vitest run tests/unit/packagedConfig.test.ts",
      "exit_code": 0
    },
    {
      "command": "cd app && npx vue-tsc -p tsconfig.json",
      "exit_code": 0
    }
  ],
  "criteria": {
    "An installed .deb built from main, launched with no IDSS_RELEASE_* env, checks the testing feed and shows the update strip when the feed carries a newer release": "PINNING half shipped + tested: resolveChannelSource({}) returns the pinned get.idss.nz testing pair (app/src-electron/releaseChannel.ts; packagedConfig.test.ts 'with NO IDSS_RELEASE_* env, resolves to the pinned pair'), so an installed .deb now CHECKS the feed instead of refusing. The 'shows the update strip when the feed carries a newer release' half needs the feed to carry the operator-app artifact AND the reader to parse the fleet feed's role-keyed manifest — split to #2167 (pre-authorised by the ticket's third bullet).",
    "Apply verifies the signature against the pinned key, installs, and restarts onto the newer release; a bad signature is refused, not installed": "The verify-against-pinned-key leg already exists (app/src/lib/matouChannel.ts download() gates signatureValid on the Ed25519 verify + digest match; appupdate.ts never offers an unverified artifact). The install+restart-from-staged-.deb leg is unwired in the Electron shell — split to #2167.",
    "With the env override set, the override wins (dev/tests unchanged)": "DONE + tested: resolveChannelSource honours a COMPLETE IDSS_RELEASE_FEED+IDSS_RELEASE_PUBKEY override (packagedConfig.test.ts 'a complete env override wins'); a half-set override falls back to the pinned pair (the one-key rule, 'a half-set override is not a pair').",
    "A seam test pins that the packaged config carries both values (tests/unit/packagedConfig.test.ts)": "DONE: app/tests/unit/packagedConfig.test.ts pins PinnedReleaseFeedURL/PinnedReleasePublicKey to the fleet's known-good values (REAL_RAIL_* from the drive fixture + the literals), so a packaging change can't silently drop or drift either half.",
    "GOTCHAS entry for the silent-refusal hazard; STATUS.md line": "DONE: docs/GOTCHAS.md #410 (the env-only channel config → silent 'no updates' refusal) + STATUS.md milestone line, both in commit a871342."
  },
  "summary": "The packaged operator app now carries its update channel as pinned build-time constants (the get.idss.nz testing feed + public key), so an installed .deb no longer silently refuses every update; a complete env override still wins.",
  "blockers": []
}
**close-report** for #2166 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against the pushed worker branch `sandcastle/worker/20261104-135410-63b0a2` (pre-land — the host promotes it to `main` only after its post-run verify, #193/#283); issue closed. <details><summary>envelope</summary> ```json { "issue": 2166, "status": "success", "commits": [ "a871342077d74735fa8e7a4acd132f10e970728e" ], "changed_files": [ "STATUS.md", "app/src-electron/electron-main.ts", "app/src-electron/releaseChannel.ts", "app/tests/unit/packagedConfig.test.ts", "docs/GOTCHAS.md" ], "tests": [ { "command": "cd app && CI=true npx vitest run tests/unit/packagedConfig.test.ts", "exit_code": 0 }, { "command": "cd app && npx vue-tsc -p tsconfig.json", "exit_code": 0 } ], "criteria": { "An installed .deb built from main, launched with no IDSS_RELEASE_* env, checks the testing feed and shows the update strip when the feed carries a newer release": "PINNING half shipped + tested: resolveChannelSource({}) returns the pinned get.idss.nz testing pair (app/src-electron/releaseChannel.ts; packagedConfig.test.ts 'with NO IDSS_RELEASE_* env, resolves to the pinned pair'), so an installed .deb now CHECKS the feed instead of refusing. The 'shows the update strip when the feed carries a newer release' half needs the feed to carry the operator-app artifact AND the reader to parse the fleet feed's role-keyed manifest — split to #2167 (pre-authorised by the ticket's third bullet).", "Apply verifies the signature against the pinned key, installs, and restarts onto the newer release; a bad signature is refused, not installed": "The verify-against-pinned-key leg already exists (app/src/lib/matouChannel.ts download() gates signatureValid on the Ed25519 verify + digest match; appupdate.ts never offers an unverified artifact). The install+restart-from-staged-.deb leg is unwired in the Electron shell — split to #2167.", "With the env override set, the override wins (dev/tests unchanged)": "DONE + tested: resolveChannelSource honours a COMPLETE IDSS_RELEASE_FEED+IDSS_RELEASE_PUBKEY override (packagedConfig.test.ts 'a complete env override wins'); a half-set override falls back to the pinned pair (the one-key rule, 'a half-set override is not a pair').", "A seam test pins that the packaged config carries both values (tests/unit/packagedConfig.test.ts)": "DONE: app/tests/unit/packagedConfig.test.ts pins PinnedReleaseFeedURL/PinnedReleasePublicKey to the fleet's known-good values (REAL_RAIL_* from the drive fixture + the literals), so a packaging change can't silently drop or drift either half.", "GOTCHAS entry for the silent-refusal hazard; STATUS.md line": "DONE: docs/GOTCHAS.md #410 (the env-only channel config → silent 'no updates' refusal) + STATUS.md milestone line, both in commit a871342." }, "summary": "The packaged operator app now carries its update channel as pinned build-time constants (the get.idss.nz testing feed + public key), so an installed .deb no longer silently refuses every update; a complete env override still wins.", "blockers": [] } ``` </details>

🚨 Reopened — a push-mode close did NOT land on main (#283). close-report closed this issue against the pushed worker branch, but the host's post-run verify rolled the land back (the promote did not advance main (a no-op push to main)), so origin/main never carried the commits (a871342077d74735fa8e7a4acd132f10e970728e). The gates-passed comment above is therefore NOT true of main. Reopening and relabelling ready-for-session so the work is redone where it can land; the commits are parked on a rescue branch for triage (see this run's alarm).

:rotating_light: **Reopened — a push-mode close did NOT land on `main` (#283).** close-report closed this issue against the pushed worker branch, but the host's post-run verify rolled the land back (`the promote did not advance main (a no-op push to main)`), so `origin/main` never carried the commits (`a871342077d74735fa8e7a4acd132f10e970728e`). The gates-passed comment above is therefore NOT true of `main`. Reopening and relabelling `ready-for-session` so the work is redone where it can land; the commits are parked on a rescue branch for triage (see this run's alarm).

Close-report — pinned the update feed + key into the packaged build (landed on main, push mode)

Landed: 01b42f3e on main.

What shipped

The packaged operator app now carries its update channel as a build-time constant, the way the fleet is born tuned — so an installed .deb finds its channel with no env.

  • New app/src/entry/pinnedChannel.ts:
    • PACKAGED_CHANNEL_SOURCE = https://get.idss.nz/channel/testing.json + the testing public Ed25519 key FEoWsURiW4Xu6IS/uxAbt28AUH6ioUg2tag/ORtMpoI= — the same pair as internal/founding.ReleaseChannelFeedURL/ReleaseChannelPublicKey (one signed channel, ADR 0054; the key is not a secret, ADR 0033/0248 #211).
    • packagedChannelSource(env, packaged): an IDSS_RELEASE_* env override wins (dev + tests); a packaged build falls back to the pin; a dev launch keeps the honest placeholder; a half-set env pair is ignored in favour of the pin so the feed + key never split (ADR 0248 dec. 3 amendment).
  • channelSource() in app/src-electron/electron-main.ts now delegates to it (packagedChannelSource(process.env, app.isPackaged)). The pinned pair is compiled into dist-electron/electron-main.cjs (verified by grep of the built bundle) and flows boot-info → resolveUpdateChannel → the real MatouChannelClient.

Proof

  • app/tests/unit/packagedConfig.test.ts (+6, 11 green): pins both literals (== the Go founding constants), the env-override / dev / half-set resolution, and that the pin resolves to a real signed-Matou client, not the placeholder.
  • build:main (bundle resolves the new import; pinned values present in the shipped .cjs), vue-tsc, and eslint all clean. Related suites green (packagedBoot/packagedBoundaries/boot/matouChannel/appupdate + packagedConfig = 41).
  • The channel-client behaviour the ACs name (strip appears for a newer signed release; apply verifies against the pinned key; a bad signature is refused) is already proven at the seam by app/tests/unit/matouChannel.test.ts against a real signed fixture.

Acceptance criteria

  • Env override still wins (dev/tests unchanged) — pinned + tested.
  • Seam test pins the packaged config carries both values — packagedConfig.test.ts.
  • GOTCHAS entry (#410, silent-refusal hazard) + STATUS.md line.
  • [~] Installed .deb checks the feed with no env — done (the pin builds the live client that polls on launch + 24 h); but it shows nothing until the feed carries the operator-app build (see split below).
  • [→ #2169] Shows the update strip for a newer release / apply verifies-installs-restarts end-to-end.

The split (AC "split it out and say so here")

The release rail does not publish the operator-app .deb as a feed artifact, and the shapes don't match: matouChannel.ts reads a single artifact manifest, while the fleet testing.json carries a role-keyed artifacts map (control-plane / control-panel / agent / idss-idp) — no operator-app build. So the pin makes the app check the channel honestly (ADR 0100: no regression, strictly better posture), but the end-to-end strip needs the publish side. That half — build/sign/publish the operator-app .deb as a feed artifact (or a per-platform app feed) + close the end-to-end ACs — is filed as #2169 and named in GOTCHAS #410. It is the design/signing-rail-bearing (one-way-ish) half #2166 deliberately deferred.

Ruled by agent under ADR 0174 — veto anytime. Two-way door, revertible per commit; proven by the seam suite.

## Close-report — pinned the update feed + key into the packaged build (landed on `main`, push mode) **Landed:** `01b42f3e` on `main`. ### What shipped The packaged operator app now carries its update channel as a **build-time constant**, the way the fleet is born tuned — so an installed `.deb` finds its channel with **no env**. - New `app/src/entry/pinnedChannel.ts`: - `PACKAGED_CHANNEL_SOURCE` = `https://get.idss.nz/channel/testing.json` + the `testing` public Ed25519 key `FEoWsURiW4Xu6IS/uxAbt28AUH6ioUg2tag/ORtMpoI=` — the **same pair** as `internal/founding.ReleaseChannelFeedURL`/`ReleaseChannelPublicKey` (one signed channel, ADR 0054; the key is not a secret, ADR 0033/0248 #211). - `packagedChannelSource(env, packaged)`: an `IDSS_RELEASE_*` env override wins (dev + tests); a packaged build falls back to the pin; a dev launch keeps the honest placeholder; a **half-set** env pair is ignored in favour of the pin so the feed + key never split (ADR 0248 dec. 3 amendment). - `channelSource()` in `app/src-electron/electron-main.ts` now delegates to it (`packagedChannelSource(process.env, app.isPackaged)`). The pinned pair is compiled into `dist-electron/electron-main.cjs` (verified by grep of the built bundle) and flows boot-info → `resolveUpdateChannel` → the real `MatouChannelClient`. ### Proof - `app/tests/unit/packagedConfig.test.ts` (+6, **11 green**): pins both literals (== the Go founding constants), the env-override / dev / half-set resolution, and that the pin resolves to a **real** signed-Matou client, not the placeholder. - `build:main` (bundle resolves the new import; pinned values present in the shipped `.cjs`), `vue-tsc`, and `eslint` all clean. Related suites green (`packagedBoot`/`packagedBoundaries`/`boot`/`matouChannel`/`appupdate` + `packagedConfig` = 41). - The channel-client behaviour the ACs name (strip appears for a newer signed release; apply verifies against the pinned key; a bad signature is refused) is already proven at the seam by `app/tests/unit/matouChannel.test.ts` against a real signed fixture. ### Acceptance criteria - [x] **Env override still wins** (dev/tests unchanged) — pinned + tested. - [x] **Seam test** pins the packaged config carries both values — `packagedConfig.test.ts`. - [x] **GOTCHAS** entry (#410, silent-refusal hazard) + **STATUS.md** line. - [~] **Installed `.deb` checks the feed with no env** — done (the pin builds the live client that polls on launch + 24 h); but it **shows nothing** until the feed carries the operator-app build (see split below). - [→ #2169] **Shows the update strip for a newer release** / **apply verifies-installs-restarts** end-to-end. ### The split (AC "split it out and say so here") The release rail does **not** publish the operator-app `.deb` as a feed artifact, and the shapes don't match: `matouChannel.ts` reads a **single** `artifact` manifest, while the fleet `testing.json` carries a **role-keyed** `artifacts` map (control-plane / control-panel / agent / idss-idp) — no operator-app build. So the pin makes the app *check* the channel honestly (ADR 0100: no regression, strictly better posture), but the end-to-end strip needs the publish side. That half — build/sign/publish the operator-app `.deb` as a feed artifact (or a per-platform app feed) + close the end-to-end ACs — is filed as **#2169** and named in GOTCHAS #410. It is the design/signing-rail-bearing (one-way-ish) half #2166 deliberately deferred. Ruled by agent under ADR 0174 — veto anytime. Two-way door, revertible per commit; proven by the seam suite.
matou-build-agent 2026-11-04 21:24:34 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
Matou/idss#2166
No description provided.