shell: appupdate-ladder — the operator app's own honest update ladder #30

Closed
opened 2026-07-25 04:54:24 +00:00 by ben · 1 comment
Owner

Parent

Feature spec: #22 (shell).

What to build

The operator app's own update, as a quiet strip on every app resting screen plus the AU screen (docs/ux/wireframes/shell/shell-au-app-update.html), driven by the appupdate state machine — shell's one owned engineering seam beside the UI kit (ADR 0098). The ladder is current → available → downloaded (verified) → applied | failed (→ retry); the app checks on launch and every 24 h, and checking is silent — nothing below available has any surface. Download happens in the background, and the release's signature is verified before downloaded; an artifact that fails signature verification becomes failed, is named, and is never offered for apply.

When a release has been fetched on the app's own channel (ADR 0033) and verified, any app resting screen (W/HO/HD) shows a quiet strip — "A new version of this app is ready · See what's new" — never a block. "See what's new" opens AU (edges HO → AU / W → AU / HD → AU). AU shows current vs ready versions (with "downloaded · signature verified ✓"), the release notes rendered verbatim as shipped signed with the release (ADR 0068 discipline — the app never rewrites them), and an "Apply & restart" action beside "Not now". Apply is always the operator's act, and the app never restarts itself (ADR 0098 — the seat that founds and rescues must not vanish mid-operation): "Apply & restart" applies and restarts as the operator's deliberate act (edge AU → HO). A security release makes the strip prominent (warn styling), saying so on both the strip and AU — advice, never veto (ADR 0015); no v1 state blocks the seat on an update. A failed apply is honest: it states plainly that nothing was changed and the current version keeps working, names what failed with a one-click log, and offers "Retry update" beside "Keep using " (edge AU → AU self-loop) — the updater applies atomically or not at all, no partial state.

Note: the channel client is faked for this slice. The update vocabulary is provisioning's (Release, Release notes) — shell references, never redefines it (ticket #9's double-spec guard). This is the app's own channel, independent of every community's fleet policy; the device-side agent is untouched.

Acceptance criteria

  • (story 6) Given a release has been fetched on the app's own channel (ADR 0033) and verified, When any app resting screen (W/HO/HD) renders, Then a quiet app-update strip appears — "A new version of this app is ready · See what's new" — never a block; nothing below available in the state machine has any surface.
  • (story 6) Given the strip, When I choose "See what's new", Then the AU screen opens (edge HO → AU / W → AU / HD → AU).
  • (story 7) Given AU with a downloaded, signature-verified release, When it renders, Then it shows current vs ready versions (with "downloaded · signature verified ✓"), the release notes rendered verbatim as shipped signed with the release (ADR 0068 — the app never rewrites them), and an "Apply & restart" action beside "Not now".
  • (story 7) Given AU, When I choose "Apply & restart", Then the update applies and the app restarts as my deliberate act (edge AU → HO); the app never restarts itself (ADR 0098 — the seat that founds and rescues must not vanish mid-operation).
  • (story 8) Given the ready release is a security release, When the strip renders, Then it is prominent (warn styling) and says so ("a security update for this app is ready"), and AU says so too — advice, never veto (ADR 0015); no v1 state blocks the seat on an update.
  • (story 9) Given an apply that failed, When AU renders the failed state, Then it states plainly that nothing was changed and the current version keeps working, names what failed with a one-click log, and offers "Retry update" beside "Keep using " (edge AU → AU, the self-loop; the updater applies atomically or not at all — no partial state).
  • (story 9) Given a release artifact that fails signature verification, When the state machine evaluates it, Then it becomes failed, is named, and is never offered for apply.

Blocked by

  • #28 — the strip rides the app's W/HO/HD resting screens

Task manifest

task: shell:appupdate-ladder
implements_flow: shell
implements_edge: W→AU, HO→AU, HD→AU, AU→HO, AU→AU (failed loop)
wireframe: docs/ux/wireframes/shell/shell-au-app-update.html
interface: the appupdate state machine (ADR 0098) — current → available → downloaded (verified) → applied | failed (→ retry); silent check on launch + every 24 h; background download; signature verified before downloaded; apply is operator-only and the app never restarts itself; security-release prominence; honest atomic failed → retry. Channel client faked; references provisioning's Release / Release notes vocabulary, never redefines it
seam: appupdate state-machine tests — channel client faked (feed fetch, download, signature verify); asserts every transition, the verify-before-downloaded gate, apply-is-operator-only / never-self-restart, the security-release prominence, and the honest atomic failed → retry (plus a failed-verification artifact never offered)
acceptance:
  - given: a release fetched on the app's own channel and verified
    when: any app resting screen (W/HO/HD) renders
    then: a quiet strip appears ("A new version is ready · See what's new"), never a block; nothing below available has a surface; "See what's new" opens AU
  - given: AU with a downloaded, signature-verified release
    when: it renders
    then: it shows current vs ready versions ("downloaded · signature verified ✓"), the release notes verbatim, and "Apply & restart" beside "Not now"
  - given: AU
    when: I choose "Apply & restart"
    then: the update applies and the app restarts as my deliberate act (AU → HO); the app never restarts itself
  - given: a security release
    when: the strip and AU render
    then: they are prominent and say so — advice never veto; no state blocks the seat
  - given: an apply that failed, or an artifact that fails signature verification
    when: the state machine evaluates it
    then: failed is honest and atomic — nothing changed, current keeps working, named with a one-click log, "Retry update" beside "Keep using <current>" (AU → AU); a failed-verification artifact is never offered for apply
depends_on: [app-side-shell]
out_of_scope: [provisioning's Release / Release notes vocabulary and the community's fleet-update mechanism (provisioning's), the device-side agent's update (updates with the fleet's pinned release via /get, ADR 0054), a blocking "you must update" gate or silent auto-apply on quit (ADR 0098 rejected)]
needs_human_decision: []
## Parent Feature spec: #22 (shell). ## What to build The operator app's own update, as a quiet strip on every app resting screen plus the AU screen (`docs/ux/wireframes/shell/shell-au-app-update.html`), driven by the `appupdate` state machine — shell's one owned engineering seam beside the UI kit (ADR 0098). The ladder is `current → available → downloaded (verified) → applied | failed (→ retry)`; the app checks on launch and every 24 h, and checking is silent — nothing below `available` has any surface. Download happens in the background, and the release's **signature is verified before `downloaded`**; an artifact that fails signature verification becomes `failed`, is named, and is never offered for apply. When a release has been fetched on the app's own channel (ADR 0033) and verified, any app resting screen (W/HO/HD) shows a quiet strip — "A new version of this app is ready · See what's new" — never a block. "See what's new" opens AU (edges HO → AU / W → AU / HD → AU). AU shows current vs ready versions (with "downloaded · signature verified ✓"), the release notes rendered **verbatim** as shipped signed with the release (ADR 0068 discipline — the app never rewrites them), and an "Apply & restart" action beside "Not now". **Apply is always the operator's act, and the app never restarts itself** (ADR 0098 — the seat that founds and rescues must not vanish mid-operation): "Apply & restart" applies and restarts as the operator's deliberate act (edge AU → HO). A security release makes the strip prominent (warn styling), saying so on both the strip and AU — advice, never veto (ADR 0015); no v1 state blocks the seat on an update. A failed apply is honest: it states plainly that nothing was changed and the current version keeps working, names what failed with a one-click log, and offers "Retry update" beside "Keep using <current>" (edge AU → AU self-loop) — the updater applies atomically or not at all, no partial state. Note: the channel client is faked for this slice. The update vocabulary is provisioning's (**Release**, **Release notes**) — shell references, never redefines it (ticket #9's double-spec guard). This is the app's own channel, independent of every community's fleet policy; the device-side agent is untouched. ## Acceptance criteria - [ ] (story 6) Given a release has been fetched on the app's own channel (ADR 0033) and verified, When any app resting screen (W/HO/HD) renders, Then a quiet app-update strip appears — "A new version of this app is ready · See what's new" — never a block; nothing below `available` in the state machine has any surface. - [ ] (story 6) Given the strip, When I choose "See what's new", Then the AU screen opens (edge HO → AU / W → AU / HD → AU). - [ ] (story 7) Given AU with a downloaded, signature-verified release, When it renders, Then it shows current vs ready versions (with "downloaded · signature verified ✓"), the release notes rendered **verbatim** as shipped signed with the release (ADR 0068 — the app never rewrites them), and an "Apply & restart" action beside "Not now". - [ ] (story 7) Given AU, When I choose "Apply & restart", Then the update applies and the app restarts as my deliberate act (edge AU → HO); the app **never** restarts itself (ADR 0098 — the seat that founds and rescues must not vanish mid-operation). - [ ] (story 8) Given the ready release is a security release, When the strip renders, Then it is prominent (warn styling) and says so ("a security update for this app is ready"), and AU says so too — advice, never veto (ADR 0015); no v1 state blocks the seat on an update. - [ ] (story 9) Given an apply that failed, When AU renders the failed state, Then it states plainly that nothing was changed and the current version keeps working, names what failed with a one-click log, and offers "Retry update" beside "Keep using <current>" (edge AU → AU, the self-loop; the updater applies atomically or not at all — no partial state). - [ ] (story 9) Given a release artifact that fails signature verification, When the state machine evaluates it, Then it becomes `failed`, is named, and is never offered for apply. ## Blocked by - #28 — the strip rides the app's W/HO/HD resting screens ## Task manifest ```yaml task: shell:appupdate-ladder implements_flow: shell implements_edge: W→AU, HO→AU, HD→AU, AU→HO, AU→AU (failed loop) wireframe: docs/ux/wireframes/shell/shell-au-app-update.html interface: the appupdate state machine (ADR 0098) — current → available → downloaded (verified) → applied | failed (→ retry); silent check on launch + every 24 h; background download; signature verified before downloaded; apply is operator-only and the app never restarts itself; security-release prominence; honest atomic failed → retry. Channel client faked; references provisioning's Release / Release notes vocabulary, never redefines it seam: appupdate state-machine tests — channel client faked (feed fetch, download, signature verify); asserts every transition, the verify-before-downloaded gate, apply-is-operator-only / never-self-restart, the security-release prominence, and the honest atomic failed → retry (plus a failed-verification artifact never offered) acceptance: - given: a release fetched on the app's own channel and verified when: any app resting screen (W/HO/HD) renders then: a quiet strip appears ("A new version is ready · See what's new"), never a block; nothing below available has a surface; "See what's new" opens AU - given: AU with a downloaded, signature-verified release when: it renders then: it shows current vs ready versions ("downloaded · signature verified ✓"), the release notes verbatim, and "Apply & restart" beside "Not now" - given: AU when: I choose "Apply & restart" then: the update applies and the app restarts as my deliberate act (AU → HO); the app never restarts itself - given: a security release when: the strip and AU render then: they are prominent and say so — advice never veto; no state blocks the seat - given: an apply that failed, or an artifact that fails signature verification when: the state machine evaluates it then: failed is honest and atomic — nothing changed, current keeps working, named with a one-click log, "Retry update" beside "Keep using <current>" (AU → AU); a failed-verification artifact is never offered for apply depends_on: [app-side-shell] out_of_scope: [provisioning's Release / Release notes vocabulary and the community's fleet-update mechanism (provisioning's), the device-side agent's update (updates with the fleet's pinned release via /get, ADR 0054), a blocking "you must update" gate or silent auto-apply on quit (ADR 0098 rejected)] needs_human_decision: [] ```
Author
Owner

Done — committed as e74247b (sandcastle: shell #30 — appupdate-ladder).

The seam (app/src/lib/appupdate.ts) — the appupdate state machine behind one faked ChannelClient (feed fetch / download / signature verify / atomic apply), the ladder current → available → downloaded (verified) → applied | failed (→ retry):

  • poll() is the silent launch + 24 h check — it never applies and never restarts.
  • The signature is verified before downloaded; a bad-signature artifact becomes failed, is named, and is structurally never offered for apply (readyRelease is non-null only at downloaded).
  • applyAndRestart() is the only place the restart hook fires (ADR 0098 — the app never restarts itself). retry() re-attempts the atomic apply (AU → AU) or re-polls after a signature failure.

The UI:

  • AppUpdateStrip.vue rides every resting screen (W/HO/HD) via RestingRoot — quiet "a new version is ready · See what's new" that opens AU; prominent (warn) and reworded for a security release — advice, never veto (ADR 0015).
  • AppUpdateScreen.vue (AU) — current vs ready + "downloaded · signature verified ✓" pill, release notes rendered verbatim as shipped signed (ADR 0068), "Apply & restart" beside "Not now" (AU → HO), and the honest atomic failed state (nothing changed, current keeps working, named with a one-click log, "Retry update" beside "Keep using ", AU → AU).

Acceptance — all six clauses (stories 6–9) covered and asserted at the seam.

Evidence: 58 app tests green (23 new — 8 state-machine seam tests/unit/appupdate.test.ts, 3 strip, 7 AU, 5 RestingRoot integration), vue-tsc build + eslint clean. Channel client faked; references provisioning's Release / Release notes vocabulary, never redefines it. The device-side agent is untouched (updates with the fleet's pinned release, ADR 0054). STATUS.md + docs/slices/shell.yaml/map.html marked done in the same commit.

Done — committed as `e74247b` (`sandcastle: shell #30 — appupdate-ladder`). **The seam** (`app/src/lib/appupdate.ts`) — the `appupdate` state machine behind one faked `ChannelClient` (feed fetch / download / signature verify / atomic apply), the ladder `current → available → downloaded (verified) → applied | failed (→ retry)`: - `poll()` is the silent launch + 24 h check — it **never applies and never restarts**. - The signature is **verified before `downloaded`**; a bad-signature artifact becomes `failed`, is named, and is structurally never offered for apply (`readyRelease` is non-null only at `downloaded`). - `applyAndRestart()` is the **only** place the restart hook fires (ADR 0098 — the app never restarts itself). `retry()` re-attempts the atomic apply (AU → AU) or re-polls after a signature failure. **The UI**: - `AppUpdateStrip.vue` rides every resting screen (W/HO/HD) via `RestingRoot` — quiet "a new version is ready · See what's new" that opens AU; prominent (warn) and reworded for a security release — advice, never veto (ADR 0015). - `AppUpdateScreen.vue` (AU) — current vs ready + "downloaded · signature verified ✓" pill, release notes rendered **verbatim** as shipped signed (ADR 0068), "Apply & restart" beside "Not now" (AU → HO), and the honest atomic `failed` state (nothing changed, current keeps working, named with a one-click log, "Retry update" beside "Keep using <current>", AU → AU). **Acceptance** — all six clauses (stories 6–9) covered and asserted at the seam. **Evidence**: 58 app tests green (23 new — 8 state-machine seam `tests/unit/appupdate.test.ts`, 3 strip, 7 AU, 5 `RestingRoot` integration), `vue-tsc` build + eslint clean. Channel client faked; references provisioning's Release / Release notes vocabulary, never redefines it. The device-side agent is untouched (updates with the fleet's pinned release, ADR 0054). STATUS.md + `docs/slices/shell.yaml`/`map.html` marked done in the same commit.
ben closed this issue 2026-07-25 06:28:06 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
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#30
No description provided.