panel-unlock — the app-door golden carries the panel handover, so matou-app stops guessing the wire (#1929, unblocks matou-app#663) #1939

Closed
opened 2026-09-27 22:16:08 +00:00 by matou-build-agent · 2 comments

Parent

  • Spec: #1929 — panel unlock
  • Completes the cross-repo half of: #1933 (the relay, landed) — its behaviour is proven in Go seam tests but never reached the fixture the other repo copies.
  • Unblocks: matou-app#663, whose claiming agent stopped on exactly this (needs-info, 2026-09-27 20:45).

What to build

internal/idp/testdata/app-door-golden.json is the cross-repo wire contract: its own note says "matou-app copies THIS file so neither side guesses the wire" (#574, #1669). #1933 added the sealed-passcode relay and proved every behaviour in appdoor_seam_test.go — but never extended the golden. A grep of it for ek, seal, handover or panel returns nothing: it still lists deep_link_params: [c, door, name, present, s, svc] and the plain present body {aid, challenge_id, response, presentation}.

So the wallet side cannot be built without guessing the envelope, which the discipline forbids. matou-app#663's agent read the golden, searched its whole repo, found nothing, and stopped — the right call, and the reason this ticket exists.

Extend the golden to carry the panel handover, and assert the new fields from the existing seam tests so the fixture cannot drift from the code again.

What the code actually does (read off internal/idp/appdoor.go on main)

Where Field Value
challenge descriptor (panel only) sealing_key the tab's Ed25519 verkey qb64, echoed from ?ek=
deep link / QR / code (panel only) ek= the same value, as a query param
present request (panel challenges only) sealed_passcode CESR qb64 X25519_Cipher_Salt (1AAH…)
status response, verified, once handover the same ciphertext, then deleted

Refusals already built, which the golden should show as named cases:

  • a box on a service sign-in, or on a panel challenge whose code carried no key → HTTP 400, {"status":"refused","refusal":"sealed-box-refused"}
  • a second box for the same challenge → the existing single-use guard, 409 spent
  • a box after expiry → the existing expiry guard, 410 expired
  • a second status poll after the handover was taken → handover absent (it is omitempty), no error, nothing leaking that one ever existed

An ordinary service sign-in must appear in the golden with neither sealing_key nor ek= — the negative case is as much of the contract as the positive one.

The material riding those fields is settled (#1938, ADR 0282's 2026-09-27 amendment): an Ed25519 verkey qb64 in ek=, and a cipher produced by signify's exported Encrypter. The door validates neither — it relays opaque strings — but the golden is where the wallet learns the shape.

Acceptance criteria

  • Given the golden, when read, then deep_link_params includes ek, and a panel challenge example carries both sealing_key and an ek= in its deep_link.
  • Given the golden, when read, then an ordinary service challenge example carries neither sealing_key nor ek=.
  • Given the golden, when read, then the present request example carries sealed_passcode with a realistically-shaped CESR qb64 1AAH… value, and the plain (non-panel) request example does not.
  • Given the golden, when read, then a verified status example carries handover, and a second-poll example omits it.
  • Given the golden, when read, then the sealed-box-refused case is present with 400 and its refusal string, alongside the existing spent (409) and expired (410) cases.
  • Given appdoor_seam_test.go, when it runs, then the new golden fields are asserted against the handlers' real output — a code change that alters the wire without updating the golden fails the test.
  • Given no behaviour change is intended, then none is made: this ticket edits a fixture and its assertions only.
  • STATUS.md updated in the same commit.

Then, in matou-app (not this ticket)

matou-app#663 copies the updated golden into frontend/tests/scripts/fixtures/app-door/app-door-golden.json and its needs-info label is dropped for ready-for-agent. Whoever lands this ticket should say so on #663 so it is re-queued.

Blocked by

None — can start immediately.

Task manifest

task: app-door-golden-carries-the-handover
implements_flow: panel-unlock
implements_edge: A2u "hands over the passcode sealed to the tab's key" (the cross-repo contract for it)
wireframe: n/a — a fixture, not a surface
interface: |
  app-door-golden.json gains, on panel examples only:
    descriptor.sealing_key, deep_link_params += ek, deep_link "…&ek=<verkey qb64>"
    present.request.sealed_passcode (CESR qb64 1AAH…)
    status.verified.body.handover (once; omitted on a second poll)
    present.sealed_box_refused -> 400 {status: refused, refusal: sealed-box-refused}
seam: internal/idp/appdoor_seam_test.go (the new fields asserted against handler output)
acceptance:
  - given: the golden
    when: read
    then: panel examples carry sealing_key + ek=; service examples carry neither
  - given: the golden
    when: read
    then: present.request carries sealed_passcode and a verified status carries handover once
  - given: a wire change without a golden update
    when: the seam test runs
    then: it fails
depends_on: []
out_of_scope: [any door behaviour change, the wallet side (matou-app#663), the panel side (landed)]
needs_human_decision: []

Filed after matou-app#663's claiming agent stopped rather than guess the wire — correctly: the golden was never extended. Ben confirmed filing and the #663 edge 2026-09-27.

🤖 Generated with Claude Code

https://claude.ai/code/session_015es4bpK4qRqZhrRYQBWCiY

## Parent - **Spec:** [#1929 — panel unlock](https://git.matou.nz/Matou/idss/issues/1929) - **Completes the cross-repo half of:** #1933 (the relay, landed) — its behaviour is proven in Go seam tests but never reached the fixture the other repo copies. - **Unblocks:** matou-app#663, whose claiming agent stopped on exactly this (`needs-info`, 2026-09-27 20:45). ## What to build `internal/idp/testdata/app-door-golden.json` is the **cross-repo wire contract**: its own note says *"matou-app copies THIS file so neither side guesses the wire"* (#574, #1669). #1933 added the sealed-passcode relay and proved every behaviour in `appdoor_seam_test.go` — but **never extended the golden**. A grep of it for `ek`, `seal`, `handover` or `panel` returns nothing: it still lists `deep_link_params: [c, door, name, present, s, svc]` and the plain present body `{aid, challenge_id, response, presentation}`. So the wallet side cannot be built without guessing the envelope, which the discipline forbids. matou-app#663's agent read the golden, searched its whole repo, found nothing, and stopped — the right call, and the reason this ticket exists. Extend the golden to carry the panel handover, and **assert the new fields from the existing seam tests** so the fixture cannot drift from the code again. ### What the code actually does (read off `internal/idp/appdoor.go` on main) | Where | Field | Value | |---|---|---| | challenge descriptor (panel only) | `sealing_key` | the tab's Ed25519 verkey qb64, echoed from `?ek=` | | deep link / QR / code (panel only) | `ek=` | the same value, as a query param | | present request (panel challenges only) | `sealed_passcode` | CESR qb64 `X25519_Cipher_Salt` (`1AAH…`) | | status response, verified, **once** | `handover` | the same ciphertext, then deleted | Refusals already built, which the golden should show as named cases: - a box on a service sign-in, **or** on a panel challenge whose code carried no key → **HTTP 400**, `{"status":"refused","refusal":"sealed-box-refused"}` - a **second** box for the same challenge → the existing single-use guard, **409** `spent` - a box after expiry → the existing expiry guard, **410** `expired` - a second status poll after the handover was taken → `handover` **absent** (it is `omitempty`), no error, nothing leaking that one ever existed An ordinary service sign-in must appear in the golden with **neither** `sealing_key` nor `ek=` — the negative case is as much of the contract as the positive one. **The material riding those fields is settled** (#1938, ADR 0282's 2026-09-27 amendment): an Ed25519 verkey qb64 in `ek=`, and a cipher produced by signify's exported `Encrypter`. The door validates neither — it relays opaque strings — but the golden is where the wallet learns the shape. ## Acceptance criteria - [ ] **Given** the golden, **when** read, **then** `deep_link_params` includes `ek`, and a panel challenge example carries both `sealing_key` and an `ek=` in its `deep_link`. - [ ] **Given** the golden, **when** read, **then** an ordinary service challenge example carries **neither** `sealing_key` nor `ek=`. - [ ] **Given** the golden, **when** read, **then** the present request example carries `sealed_passcode` with a realistically-shaped CESR qb64 `1AAH…` value, and the plain (non-panel) request example does not. - [ ] **Given** the golden, **when** read, **then** a verified status example carries `handover`, and a second-poll example omits it. - [ ] **Given** the golden, **when** read, **then** the `sealed-box-refused` case is present with **400** and its refusal string, alongside the existing `spent` (409) and `expired` (410) cases. - [ ] **Given** `appdoor_seam_test.go`, **when** it runs, **then** the new golden fields are **asserted against the handlers' real output** — a code change that alters the wire without updating the golden fails the test. - [ ] **Given** no behaviour change is intended, **then** none is made: this ticket edits a fixture and its assertions only. - [ ] STATUS.md updated in the same commit. ## Then, in matou-app (not this ticket) matou-app#663 copies the updated golden into `frontend/tests/scripts/fixtures/app-door/app-door-golden.json` and its `needs-info` label is dropped for `ready-for-agent`. Whoever lands this ticket should say so on #663 so it is re-queued. ## Blocked by None — can start immediately. ## Task manifest ```yaml task: app-door-golden-carries-the-handover implements_flow: panel-unlock implements_edge: A2u "hands over the passcode sealed to the tab's key" (the cross-repo contract for it) wireframe: n/a — a fixture, not a surface interface: | app-door-golden.json gains, on panel examples only: descriptor.sealing_key, deep_link_params += ek, deep_link "…&ek=<verkey qb64>" present.request.sealed_passcode (CESR qb64 1AAH…) status.verified.body.handover (once; omitted on a second poll) present.sealed_box_refused -> 400 {status: refused, refusal: sealed-box-refused} seam: internal/idp/appdoor_seam_test.go (the new fields asserted against handler output) acceptance: - given: the golden when: read then: panel examples carry sealing_key + ek=; service examples carry neither - given: the golden when: read then: present.request carries sealed_passcode and a verified status carries handover once - given: a wire change without a golden update when: the seam test runs then: it fails depends_on: [] out_of_scope: [any door behaviour change, the wallet side (matou-app#663), the panel side (landed)] needs_human_decision: [] ``` --- *Filed after matou-app#663's claiming agent stopped rather than guess the wire — correctly: the golden was never extended. Ben confirmed filing and the #663 edge 2026-09-27.* 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_015es4bpK4qRqZhrRYQBWCiY
Author
Member

swarm-claim host=matou-dev-server-01 run=34461
(automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=matou-dev-server-01 run=34461 (automated multi-host claim — lowest live claim id works this ticket)
Author
Member

close-report for #1939 — status success

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

envelope
{
  "issue": 1939,
  "status": "success",
  "commits": [
    "cb183eac"
  ],
  "changed_files": [
    "STATUS.md",
    "internal/idp/appdoor_seam_test.go",
    "internal/idp/testdata/app-door-golden.json"
  ],
  "tests": [
    {
      "command": "go test ./internal/idp/",
      "exit_code": 0
    },
    {
      "command": "go test ./internal/idp/ -run TestSeam_AppDoor_PanelGoldenMatchesTheWire",
      "exit_code": 0
    },
    {
      "command": "gofmt -l internal/idp/appdoor_seam_test.go (empty)",
      "exit_code": 0
    },
    {
      "command": "go vet ./internal/idp/",
      "exit_code": 0
    }
  ],
  "criteria": {
    "deep_link_params includes ek, and a panel challenge example carries both sealing_key and an ek= in its deep_link": "app-door-golden.json: deep_link_params now lists 'ek'; panel.challenge.adds_to_ask_response.sealing_key + panel.challenge.deep_link '…&ek=DXwPc9…'. Bound to real output by TestSeam_AppDoor_PanelGoldenMatchesTheWire (a panel challenge really serves sealing_key + an ek= deep-link param).",
    "an ordinary service challenge example carries neither sealing_key nor ek=": "app-door-golden.json: ask.response has no sealing_key and its deep_link has no ek= (response_note states so). Test asserts a real ordinary challenge serves no sealing_key and no ek= param.",
    "present request example carries sealed_passcode with a realistically-shaped CESR qb64 1AAH… value, and the plain request example does not": "app-door-golden.json: panel.present.request.sealed_passcode = '1AAHXSl-r-…' (100 chars, 1AAH prefix); present.request (plain) has none. Test asserts appPresentRequest serializes sealed_passcode, the plain golden request lacks it, and the value is a 1AAH… CESR qb64.",
    "a verified status example carries handover, and a second-poll example omits it": "app-door-golden.json: panel.status_poll.verified_first_poll.handover set; verified_second_poll omits it. Test verifies a real first verified status serves handover once and the second poll omits it (omitempty).",
    "the sealed-box-refused case is present with 400 and its refusal string, alongside the existing spent (409) and expired (410) cases": "app-door-golden.json: present.sealed_box_refused -> {status:400, body:{status:refused, refusal:sealed-box-refused}}, beside present.spent_challenge (409) and present.expired_challenge (410). Test posts a box without a key and asserts 400 + {refused, sealed-box-refused} matching the golden.",
    "the new golden fields are asserted against the handlers' real output — a code change that alters the wire without updating the golden fails the test": "TestSeam_AppDoor_PanelGoldenMatchesTheWire uses a fieldSet marshal-and-compare of real descriptor/appPresentRequest/appStatus + live handler calls. Verified by a negative run: deleting panel.present.request.sealed_passcode from the golden reds the test.",
    "none is made: this ticket edits a fixture and its assertions only": "Commit cb183eac changes only the golden fixture, the seam test, and STATUS.md — no non-test Go source (internal/idp/appdoor.go et al. untouched).",
    "STATUS.md updated in the same commit": "STATUS.md gains the #1939 DONE milestone entry in commit cb183eac."
  },
  "summary": "Extended the app-door golden with the panel handover (ek/sealing_key, sealed_passcode, handover, sealed-box-refused) and bound every new field to real handler output in a new seam test, no behaviour change.",
  "blockers": []
}
**close-report** for #1939 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 1939, "status": "success", "commits": [ "cb183eac" ], "changed_files": [ "STATUS.md", "internal/idp/appdoor_seam_test.go", "internal/idp/testdata/app-door-golden.json" ], "tests": [ { "command": "go test ./internal/idp/", "exit_code": 0 }, { "command": "go test ./internal/idp/ -run TestSeam_AppDoor_PanelGoldenMatchesTheWire", "exit_code": 0 }, { "command": "gofmt -l internal/idp/appdoor_seam_test.go (empty)", "exit_code": 0 }, { "command": "go vet ./internal/idp/", "exit_code": 0 } ], "criteria": { "deep_link_params includes ek, and a panel challenge example carries both sealing_key and an ek= in its deep_link": "app-door-golden.json: deep_link_params now lists 'ek'; panel.challenge.adds_to_ask_response.sealing_key + panel.challenge.deep_link '…&ek=DXwPc9…'. Bound to real output by TestSeam_AppDoor_PanelGoldenMatchesTheWire (a panel challenge really serves sealing_key + an ek= deep-link param).", "an ordinary service challenge example carries neither sealing_key nor ek=": "app-door-golden.json: ask.response has no sealing_key and its deep_link has no ek= (response_note states so). Test asserts a real ordinary challenge serves no sealing_key and no ek= param.", "present request example carries sealed_passcode with a realistically-shaped CESR qb64 1AAH… value, and the plain request example does not": "app-door-golden.json: panel.present.request.sealed_passcode = '1AAHXSl-r-…' (100 chars, 1AAH prefix); present.request (plain) has none. Test asserts appPresentRequest serializes sealed_passcode, the plain golden request lacks it, and the value is a 1AAH… CESR qb64.", "a verified status example carries handover, and a second-poll example omits it": "app-door-golden.json: panel.status_poll.verified_first_poll.handover set; verified_second_poll omits it. Test verifies a real first verified status serves handover once and the second poll omits it (omitempty).", "the sealed-box-refused case is present with 400 and its refusal string, alongside the existing spent (409) and expired (410) cases": "app-door-golden.json: present.sealed_box_refused -> {status:400, body:{status:refused, refusal:sealed-box-refused}}, beside present.spent_challenge (409) and present.expired_challenge (410). Test posts a box without a key and asserts 400 + {refused, sealed-box-refused} matching the golden.", "the new golden fields are asserted against the handlers' real output — a code change that alters the wire without updating the golden fails the test": "TestSeam_AppDoor_PanelGoldenMatchesTheWire uses a fieldSet marshal-and-compare of real descriptor/appPresentRequest/appStatus + live handler calls. Verified by a negative run: deleting panel.present.request.sealed_passcode from the golden reds the test.", "none is made: this ticket edits a fixture and its assertions only": "Commit cb183eac changes only the golden fixture, the seam test, and STATUS.md — no non-test Go source (internal/idp/appdoor.go et al. untouched).", "STATUS.md updated in the same commit": "STATUS.md gains the #1939 DONE milestone entry in commit cb183eac." }, "summary": "Extended the app-door golden with the panel handover (ek/sealing_key, sealed_passcode, handover, sealed-box-refused) and bound every new field to real handler output in a new seam test, no behaviour change.", "blockers": [] } ``` </details>
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.

Blocks
You do not have permission to read 1 dependency
Reference
Matou/idss#1939
No description provided.