panel-unlock: the panel reaches the door at the door's own address and unlocks by leaving for it — a failed request is never drawn as a decline; the fresh-unlock mode comes out (ADR 0282 amended 2026-09-29) #1995

Closed
opened 2026-09-29 06:12:21 +00:00 by ben · 2 comments
Owner

Parent

  • Design: ADR 0282, amended 2026-09-29 — a locked panel unlocks through the sign-in door. This ticket builds the amendment's obligations 3(a)–3(d), the panel's.
  • Flow: docs/ux/flows/panel-unlock.mermaid · Wireframes: docs/ux/wireframes/panel-unlock/ — pu-m0-members-locked.html, pu-m0x-couldnt-unlock.html
  • Siblings: the door and gate #1994 (blocks this), the wallet (matou-app), the live proof #1936.

Why

Found on Whakatōhea Demo, 2026-09-29. dashboard/src/lib/mountRegistry.ts builds the unlock transport with no door address (httpHandoverPort({ fetchImpl })), so /login/app/handover and /login/app/unlock/* go to the panel's own host, admin.<apex>. The front door hands that host whole to the control plane, which answers a GET with the dashboard's own page and refuses a POST. The golden has always said cross-origin to the door (id.<apex>).

Every such fault was folded into "no box" and drawn as PU-M0 with no message, so the unlock button read as dead.

What to build

  1. Reach the door at the door's own origin. The transport's address is the sign-in site's (id.<apex>), taken from what the gateway serves, never assumed to be the panel's own.
  2. The unlock leaves for the sign-in door. PU-M0's Unlock steward actions with your app navigates to the gate's sign-in start carrying the unlock marker (the door's ticket names it) and where to come back to — the panel URL the steward is on. The seat is locked, so the tab holds no passcode to lose.
  3. Landing back, the panel completes the handover it already knows how to — read the capability, mint the key, bind, collect, open, assert the agent (#1961, #1967, unchanged).
  4. Landing back from an unlock with nothing armed rests on PU-M0x cause 1, not on a silent PU-M0. The panel needs to know it has just come back from an unlock; how it knows is yours (ADR 0174), and it must not be a secret in a URL.
  5. A request that failed is never drawn as the steward declining — PU-M0x cause 3, data-reason="door-unreachable": the door did not answer the panel's ask, or answered something the panel could not read. An expired or refused answer is cause 1. Not now and an expired code return to PU-M0 quietly, as the steward's own choice.
  6. Take out the fresh-unlock mode: the transport's fresh-unlock leg, the session's unlockFromPhone code path and PhoneUnlockState.code / fingerprint, and the code region of PhoneUnlockScreen.vue. PU-M0q is retired.
  7. Copy and contract per the wireframes: your app, never your phone; data-action="unlock-with-phone" → unlock-with-app; unlock-leaves-note, keep-app-open-note, unlock-failed-detail added.

Acceptance criteria

  • Given the production composition, when the transport makes any request for a /login/app/* path, then its host is the sign-in site's — asserted against the composed port, not a port built by the test.
  • Given PU-M0, when the steward chooses the app, then the tab navigates to the gate's sign-in start with the unlock marker and a same-apex return destination, and no request is made to any /login/app/unlock/* route.
  • Given a landing from an armed sign-in or unlock, then Members renders unlocked with nothing typed.
  • Given a landing from an unlock that armed nothing, then PU-M0x cause 1 renders.
  • Given the door does not answer the collect, answers a non-JSON body, or answers 5xx, then PU-M0x renders with data-reason="door-unreachable" and names the host.
  • Given a plain load or reload with no unlock behind it, then PU-M0 renders plain-locked with no waiting screen.
  • Given the change lands, then fresh-unlock appears nowhere in dashboard/src, and no unlock-with-phone remains.
  • Given the whole path, then no sealed box, seed, passcode or capability appears in any URL, fragment or history entry — asserted.
  • Every data-field / data-action / data-reason drawn on PU-M0 and PU-M0x is present in the built surface.

Out of scope

  • The twelve-words dialog (P6-S11i) gaining an app door of its own. It is not drawn. A steward act that finds the seat locked keeps raising the words dialog.
  • Hiding Members from an administrator who is not a steward (AC-A1) — its own ticket.

Blocked by

  • #1994 (the door and gate) — the unlock marker, the unlock face and the routes this removes its callers of.

Task manifest

task: panel-unlocks-by-leaving-for-the-door
implements_flow: panel-unlock
implements_edge: "M0 -> PU-S1, A4d -> M1, A4d -> M0x (did not come through), A4d -> M0x (the sign-in site does not answer), A2u -> M0x"
wireframe:
  - docs/ux/wireframes/panel-unlock/pu-m0-members-locked.html
  - docs/ux/wireframes/panel-unlock/pu-m0x-couldnt-unlock.html
interface: |
  transport: every /login/app/* request goes to the sign-in site's origin
  panel: unlock = navigate to the gate's sign-in start with the unlock marker + a same-apex return destination
  panel: landing back with nothing armed -> PU-M0x cause 1
  panel: a failed collect -> PU-M0x cause 3 (door-unreachable)
  REMOVED: the fresh-unlock mode (transport, session, PhoneUnlockScreen's code region)
seam: dashboard/tests/unit (handoverPortClient, signingSession, idipRosterPanel, the composition root)
acceptance:
  - given: the production composition
    when: the transport asks the door for anything
    then: the request's host is the sign-in site's
  - given: the door does not answer the collect
    when: the panel gives up
    then: PU-M0x renders with data-reason door-unreachable
  - given: a landing from an unlock that armed nothing
    when: Members renders
    then: PU-M0x cause 1, never a silent PU-M0
depends_on: [unlock-through-the-sign-in-door]
out_of_scope: [the twelve-words dialog, AC-A1's Members tab]
needs_human_decision: []

Filed 2026-09-29 from the first live control-panel sign-in through the app (Whakatōhea Demo, app 0.8.1), which found the seat unlock has never worked on a live community. Every earlier ticket in the arc closed green against a fake of the other side; #1936 is the live proof, and the arc does not close without it.

🤖 Generated with Claude Code

https://claude.ai/code/session_01WgMdPvssS1d7W1v2dL7bcH

## Parent - **Design:** ADR 0282, **amended 2026-09-29** — *a locked panel unlocks through the sign-in door*. This ticket builds the amendment's obligations **3(a)–3(d)**, the panel's. - **Flow:** `docs/ux/flows/panel-unlock.mermaid` · **Wireframes:** `docs/ux/wireframes/panel-unlock/` — `pu-m0-members-locked.html`, `pu-m0x-couldnt-unlock.html` - **Siblings:** the door and gate **#1994** (blocks this), the wallet (matou-app), the live proof #1936. ## Why Found on Whakatōhea Demo, 2026-09-29. `dashboard/src/lib/mountRegistry.ts` builds the unlock transport with **no door address** (`httpHandoverPort({ fetchImpl })`), so `/login/app/handover` and `/login/app/unlock/*` go to the panel's own host, `admin.<apex>`. The front door hands that host whole to the control plane, which answers a GET with the dashboard's own page and refuses a POST. The golden has always said *cross-origin to the door (`id.<apex>`)*. Every such fault was folded into "no box" and drawn as PU-M0 with no message, so the unlock button read as dead. ## What to build 1. **Reach the door at the door's own origin.** The transport's address is the sign-in site's (`id.<apex>`), taken from what the gateway serves, never assumed to be the panel's own. 2. **The unlock leaves for the sign-in door.** PU-M0's *Unlock steward actions with your app* navigates to the gate's sign-in start carrying the unlock marker (the door's ticket names it) and where to come back to — the panel URL the steward is on. The seat is locked, so the tab holds no passcode to lose. 3. **Landing back, the panel completes the handover it already knows how to** — read the capability, mint the key, bind, collect, open, assert the agent (#1961, #1967, unchanged). 4. **Landing back from an unlock with nothing armed** rests on **PU-M0x cause 1**, not on a silent PU-M0. The panel needs to know it has just come back from an unlock; how it knows is yours (ADR 0174), and it must not be a secret in a URL. 5. **A request that failed is never drawn as the steward declining** — **PU-M0x cause 3**, `data-reason="door-unreachable"`: the door did not answer the panel's ask, or answered something the panel could not read. An `expired` or `refused` answer is cause 1. *Not now* and an expired code return to PU-M0 quietly, as the steward's own choice. 6. **Take out the fresh-unlock mode**: the transport's `fresh-unlock` leg, the session's `unlockFromPhone` code path and `PhoneUnlockState.code` / `fingerprint`, and the code region of `PhoneUnlockScreen.vue`. PU-M0q is retired. 7. **Copy and contract per the wireframes**: *your app*, never *your phone*; `data-action="unlock-with-phone"` → `unlock-with-app`; `unlock-leaves-note`, `keep-app-open-note`, `unlock-failed-detail` added. ## Acceptance criteria - [ ] **Given** the production composition, **when** the transport makes any request for a `/login/app/*` path, **then** its host is the sign-in site's — asserted against the composed port, not a port built by the test. - [ ] **Given** PU-M0, **when** the steward chooses the app, **then** the tab navigates to the gate's sign-in start with the unlock marker and a same-apex return destination, and no request is made to any `/login/app/unlock/*` route. - [ ] **Given** a landing from an armed sign-in or unlock, **then** Members renders unlocked with nothing typed. - [ ] **Given** a landing from an unlock that armed nothing, **then** PU-M0x cause 1 renders. - [ ] **Given** the door does not answer the collect, answers a non-JSON body, or answers 5xx, **then** PU-M0x renders with `data-reason="door-unreachable"` and names the host. - [ ] **Given** a plain load or reload with no unlock behind it, **then** PU-M0 renders plain-locked with no waiting screen. - [ ] **Given** the change lands, **then** `fresh-unlock` appears nowhere in `dashboard/src`, and no `unlock-with-phone` remains. - [ ] **Given** the whole path, **then** no sealed box, seed, passcode or capability appears in any URL, fragment or history entry — asserted. - [ ] Every `data-field` / `data-action` / `data-reason` drawn on PU-M0 and PU-M0x is present in the built surface. ## Out of scope - The twelve-words dialog (P6-S11i) gaining an app door of its own. It is not drawn. A steward act that finds the seat locked keeps raising the words dialog. - Hiding Members from an administrator who is not a steward (AC-A1) — its own ticket. ## Blocked by - **#1994** (the door and gate) — the unlock marker, the unlock face and the routes this removes its callers of. ## Task manifest ```yaml task: panel-unlocks-by-leaving-for-the-door implements_flow: panel-unlock implements_edge: "M0 -> PU-S1, A4d -> M1, A4d -> M0x (did not come through), A4d -> M0x (the sign-in site does not answer), A2u -> M0x" wireframe: - docs/ux/wireframes/panel-unlock/pu-m0-members-locked.html - docs/ux/wireframes/panel-unlock/pu-m0x-couldnt-unlock.html interface: | transport: every /login/app/* request goes to the sign-in site's origin panel: unlock = navigate to the gate's sign-in start with the unlock marker + a same-apex return destination panel: landing back with nothing armed -> PU-M0x cause 1 panel: a failed collect -> PU-M0x cause 3 (door-unreachable) REMOVED: the fresh-unlock mode (transport, session, PhoneUnlockScreen's code region) seam: dashboard/tests/unit (handoverPortClient, signingSession, idipRosterPanel, the composition root) acceptance: - given: the production composition when: the transport asks the door for anything then: the request's host is the sign-in site's - given: the door does not answer the collect when: the panel gives up then: PU-M0x renders with data-reason door-unreachable - given: a landing from an unlock that armed nothing when: Members renders then: PU-M0x cause 1, never a silent PU-M0 depends_on: [unlock-through-the-sign-in-door] out_of_scope: [the twelve-words dialog, AC-A1's Members tab] needs_human_decision: [] ``` --- *Filed 2026-09-29 from the first live control-panel sign-in through the app (Whakatōhea Demo, app 0.8.1), which found the seat unlock has never worked on a live community. Every earlier ticket in the arc closed green against a fake of the other side; **#1936 is the live proof, and the arc does not close without it.*** 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01WgMdPvssS1d7W1v2dL7bcH

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

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

close-report for #1995 — status success

✅ close-report gates passed — every claim verified against main; issue closed.

envelope
{
  "issue": 1995,
  "status": "success",
  "commits": [
    "524daa6cf50b383db4ececdb6479c134cc2e43d5"
  ],
  "changed_files": [
    "STATUS.md",
    "app/tests/e2e/fixtures/idip.test.ts",
    "dashboard/src/components/members/IdipRosterPanel.vue",
    "dashboard/src/components/members/PhoneUnlockScreen.vue",
    "dashboard/src/entry/served.ts",
    "dashboard/src/lib/api/handoverPortClient.ts",
    "dashboard/src/lib/handoverPort.ts",
    "dashboard/src/lib/mountRegistry.ts",
    "dashboard/src/lib/panelUnlock.ts",
    "dashboard/src/lib/signingSession.ts",
    "dashboard/tests/unit/handoverComposition.test.ts",
    "dashboard/tests/unit/handoverPortClient.test.ts",
    "dashboard/tests/unit/idipRosterPanel.test.ts",
    "dashboard/tests/unit/removeMember.test.ts",
    "dashboard/tests/unit/serveEntry.test.ts",
    "dashboard/tests/unit/signingSession.test.ts"
  ],
  "tests": [
    {
      "command": "cd dashboard && npx vitest run",
      "exit_code": 0
    },
    {
      "command": "cd dashboard && npx vue-tsc --noEmit -p tsconfig.json",
      "exit_code": 0
    },
    {
      "command": "cd app && npx vitest run tests/e2e/fixtures/idip.test.ts",
      "exit_code": 0
    }
  ],
  "criteria": {
    "the transport's every /login/app/* request goes to the sign-in site's host, asserted against the composed port": "tests/unit/handoverComposition.test.ts — builds productionDashboardDeps({signInOrigin:'https://id.example.nz'}) and asserts every collect URL host is id.example.nz; mountRegistry.ts wires httpHandoverPort({door: config.signInOrigin})",
    "PU-M0 app choice navigates to the gate sign-in start with the unlock marker + same-apex rd, no /login/app/unlock/* request": "tests/unit/idipRosterPanel.test.ts 'asks to unlock with their app' — navigate called once with /authz/signin?prompt=login&rd=..., handover.calls === 0; IdipRosterPanel.onAppDoor + panelUnlock.ts unlockHref",
    "landing from an armed sign-in or unlock renders Members unlocked with nothing typed": "tests/unit/idipRosterPanel.test.ts 'sign-in with the unlock line on' (armed+box -> seat-unlocked, asking false); signingSession.test.ts resumeSignInUnlock armed cases",
    "landing from an unlock that armed nothing renders PU-M0x cause 1": "tests/unit/idipRosterPanel.test.ts 'landing back from an unlock that armed NOTHING' (sessionStorage marker set -> phase no-handover, data-reason handover-not-received); signingSession.test.ts cameFromUnlock+not-armed case",
    "door does not answer / non-JSON / 5xx renders PU-M0x data-reason=door-unreachable naming the host": "tests/unit/handoverPortClient.test.ts unreachable trio (throw/5xx/non-JSON -> {kind:'unreachable',host}); signingSession.test.ts door-unreachable; idipRosterPanel.test.ts cause 3 asserts unlock-failed-detail contains id.example.nz",
    "plain load/reload with no unlock renders PU-M0 plain-locked, no waiting screen": "tests/unit/idipRosterPanel.test.ts 'the unlock line switched off, plain load' (phase idle, no awaiting-handover, seat-locked tab-reloaded)",
    "fresh-unlock appears nowhere in dashboard/src and no unlock-with-phone remains": "grep -rn 'fresh-unlock' dashboard/src -> none; grep -rn 'unlock-with-phone' dashboard/src -> none (verified post-commit)",
    "no sealed box, seed, passcode or capability appears in any URL/fragment/history, asserted": "tests/unit/handoverPortClient.test.ts asserts capability+verkey ride the POST body and no URL contains CAP-256; unlockHref carries only prompt=login + rd (no secret); the box opens only inside the bundle",
    "every data-field/data-action/data-reason on PU-M0 and PU-M0x is present in the built surface": "IdipRosterPanel.vue (unlock-with-app/data-leaves-for/unlock-leaves-note/locked-words-note/still-works-note) + PhoneUnlockScreen.vue (handover-not-received/agent-identity-mismatch/door-unreachable/unlock-failed-detail/keep-app-open-note); asserted in idipRosterPanel.test.ts and app/tests/e2e/fixtures/idip.test.ts"
  },
  "summary": "The panel unlocks through the sign-in door: the transport reaches the door at the sign-in site's own origin, the app door leaves for the door, a failed request is drawn as door-unreachable, and the fresh-unlock mode is removed.",
  "unproven_by_seam": "Every seam here is a fake of the door and the wallet: the composition test drives a scripted fetch, not a live id.<apex> app door, and the signingSession/idipRosterPanel seams drive a fake HandoverPort. The live legs the fakes never exercise — a real cross-origin collect to id.<apex> (and the door's CORS grant), the gate's prompt=login unlock hop, and an old wallet landing on PU-M0x cause 1 — remain #1936's to prove on a kept community; the arc does not close without it. The app-side live drive (journey.idip.spec.ts / qrRead.ts) still scans the retired in-place QR and belongs to that rewrite.",
  "blockers": []
}
**close-report** for #1995 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 1995, "status": "success", "commits": [ "524daa6cf50b383db4ececdb6479c134cc2e43d5" ], "changed_files": [ "STATUS.md", "app/tests/e2e/fixtures/idip.test.ts", "dashboard/src/components/members/IdipRosterPanel.vue", "dashboard/src/components/members/PhoneUnlockScreen.vue", "dashboard/src/entry/served.ts", "dashboard/src/lib/api/handoverPortClient.ts", "dashboard/src/lib/handoverPort.ts", "dashboard/src/lib/mountRegistry.ts", "dashboard/src/lib/panelUnlock.ts", "dashboard/src/lib/signingSession.ts", "dashboard/tests/unit/handoverComposition.test.ts", "dashboard/tests/unit/handoverPortClient.test.ts", "dashboard/tests/unit/idipRosterPanel.test.ts", "dashboard/tests/unit/removeMember.test.ts", "dashboard/tests/unit/serveEntry.test.ts", "dashboard/tests/unit/signingSession.test.ts" ], "tests": [ { "command": "cd dashboard && npx vitest run", "exit_code": 0 }, { "command": "cd dashboard && npx vue-tsc --noEmit -p tsconfig.json", "exit_code": 0 }, { "command": "cd app && npx vitest run tests/e2e/fixtures/idip.test.ts", "exit_code": 0 } ], "criteria": { "the transport's every /login/app/* request goes to the sign-in site's host, asserted against the composed port": "tests/unit/handoverComposition.test.ts — builds productionDashboardDeps({signInOrigin:'https://id.example.nz'}) and asserts every collect URL host is id.example.nz; mountRegistry.ts wires httpHandoverPort({door: config.signInOrigin})", "PU-M0 app choice navigates to the gate sign-in start with the unlock marker + same-apex rd, no /login/app/unlock/* request": "tests/unit/idipRosterPanel.test.ts 'asks to unlock with their app' — navigate called once with /authz/signin?prompt=login&rd=..., handover.calls === 0; IdipRosterPanel.onAppDoor + panelUnlock.ts unlockHref", "landing from an armed sign-in or unlock renders Members unlocked with nothing typed": "tests/unit/idipRosterPanel.test.ts 'sign-in with the unlock line on' (armed+box -> seat-unlocked, asking false); signingSession.test.ts resumeSignInUnlock armed cases", "landing from an unlock that armed nothing renders PU-M0x cause 1": "tests/unit/idipRosterPanel.test.ts 'landing back from an unlock that armed NOTHING' (sessionStorage marker set -> phase no-handover, data-reason handover-not-received); signingSession.test.ts cameFromUnlock+not-armed case", "door does not answer / non-JSON / 5xx renders PU-M0x data-reason=door-unreachable naming the host": "tests/unit/handoverPortClient.test.ts unreachable trio (throw/5xx/non-JSON -> {kind:'unreachable',host}); signingSession.test.ts door-unreachable; idipRosterPanel.test.ts cause 3 asserts unlock-failed-detail contains id.example.nz", "plain load/reload with no unlock renders PU-M0 plain-locked, no waiting screen": "tests/unit/idipRosterPanel.test.ts 'the unlock line switched off, plain load' (phase idle, no awaiting-handover, seat-locked tab-reloaded)", "fresh-unlock appears nowhere in dashboard/src and no unlock-with-phone remains": "grep -rn 'fresh-unlock' dashboard/src -> none; grep -rn 'unlock-with-phone' dashboard/src -> none (verified post-commit)", "no sealed box, seed, passcode or capability appears in any URL/fragment/history, asserted": "tests/unit/handoverPortClient.test.ts asserts capability+verkey ride the POST body and no URL contains CAP-256; unlockHref carries only prompt=login + rd (no secret); the box opens only inside the bundle", "every data-field/data-action/data-reason on PU-M0 and PU-M0x is present in the built surface": "IdipRosterPanel.vue (unlock-with-app/data-leaves-for/unlock-leaves-note/locked-words-note/still-works-note) + PhoneUnlockScreen.vue (handover-not-received/agent-identity-mismatch/door-unreachable/unlock-failed-detail/keep-app-open-note); asserted in idipRosterPanel.test.ts and app/tests/e2e/fixtures/idip.test.ts" }, "summary": "The panel unlocks through the sign-in door: the transport reaches the door at the sign-in site's own origin, the app door leaves for the door, a failed request is drawn as door-unreachable, and the fresh-unlock mode is removed.", "unproven_by_seam": "Every seam here is a fake of the door and the wallet: the composition test drives a scripted fetch, not a live id.<apex> app door, and the signingSession/idipRosterPanel seams drive a fake HandoverPort. The live legs the fakes never exercise — a real cross-origin collect to id.<apex> (and the door's CORS grant), the gate's prompt=login unlock hop, and an old wallet landing on PU-M0x cause 1 — remain #1936's to prove on a kept community; the arc does not close without it. The app-side live drive (journey.idip.spec.ts / qrRead.ts) still scans the retired in-place QR and belongs to that rewrite.", "blockers": [] } ``` </details>
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#1995
No description provided.