Destroy community 3/9 — the page's own witness: the browser asks IDSS whether the name is free; DC6u when the gateway goes quiet first #1787

Closed
opened 2026-09-23 18:06:38 +00:00 by ben · 2 comments
Owner

Parent

#1784 (spec) — from #1781.

What to build

After the gateway replies, the page confirms the freed name itself by calling the broker's public availability check straight from the browser. That is a second witness that doesn't depend on the dying gateway. The broker's availability route answers the CORS preflight and the call from any origin. No other broker route gains CORS, and the check stays a snapshot that writes nothing (#1404). The control plane exposes the broker's public URL to the SPA as config.

If the destroy request errors or times out with no reply, the page shows DC6u: what it can confirm (the name) and an admission of what it can't (the server), never a hopeful green (ADR 0100, DDR 0096).

Acceptance criteria

  • broker: POST /v1/subdomains/available answers an OPTIONS preflight and the POST with CORS headers for any origin; no other route carries CORS (spec #1784 story 49); broker test pins both halves
  • DC6: name-freed shows the time of the page's own successful availability call; if that call fails, it says the name couldn't be confirmed from this page (32)
  • an errored or timed-out act with no reply → DC6u (data-status="unconfirmed") with name-check in exactly one variant (free / still reserved / couldn't ask), server-check "can't be confirmed from this page", app-finishes-note, open-operator-app and check-again (35)
  • check-again repeats only the name check and updates name-check in place
  • dashboard vitest covers the reply → DC6, refusal → DC6x and timeout → DC6u selection, and the witness success and failure; broker go test green

On landing: the CORS half is in the broker tree, so it goes deploy-pending for the broker deploy.

Design contract: DDR 0274, flow docs/ux/flows/destroy-community.mermaid, frames docs/ux/wireframes/destroy-community/ — the data-field / data-action / data-status attributes are the element contract design-verify checks.

Blocked by

## Parent #1784 (spec) — from #1781. ## What to build After the gateway replies, the page **confirms the freed name itself** by calling the broker's public availability check straight from the browser. That is a second witness that doesn't depend on the dying gateway. The broker's availability route answers the CORS preflight and the call from any origin. **No other broker route gains CORS**, and the check stays a snapshot that writes nothing (#1404). The control plane exposes the broker's public URL to the SPA as config. If the destroy request errors or times out with no reply, the page shows **DC6u**: what it can confirm (the name) and an admission of what it can't (the server), never a hopeful green (ADR 0100, DDR 0096). ## Acceptance criteria - [ ] broker: `POST /v1/subdomains/available` answers an OPTIONS preflight and the POST with CORS headers for any origin; no other route carries CORS (spec #1784 story 49); broker test pins both halves - [ ] DC6: `name-freed` shows the time of the page's own successful availability call; if that call fails, it says the name couldn't be confirmed from this page (32) - [ ] an errored or timed-out act with no reply → DC6u (`data-status="unconfirmed"`) with `name-check` in exactly one variant (free / still reserved / couldn't ask), `server-check` "can't be confirmed from this page", `app-finishes-note`, `open-operator-app` and `check-again` (35) - [ ] `check-again` repeats only the name check and updates `name-check` in place - [ ] dashboard vitest covers the reply → DC6, refusal → DC6x and timeout → DC6u selection, and the witness success and failure; broker `go test` green **On landing:** the CORS half is in the broker tree, so it goes `deploy-pending` for the broker deploy. Design contract: DDR 0274, flow `docs/ux/flows/destroy-community.mermaid`, frames `docs/ux/wireframes/destroy-community/` — the `data-field` / `data-action` / `data-status` attributes are the element contract `design-verify` checks. ## Blocked by - #1786

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

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

close-report for #1787 — status success

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

envelope
{
  "issue": 1787,
  "status": "success",
  "commits": [
    "85e300b8"
  ],
  "changed_files": [
    "STATUS.md",
    "broker/internal/broker/http.go",
    "broker/internal/broker/http_test.go",
    "control-plane/cmd/control-plane/destroy_wiring.go",
    "control-plane/cmd/control-plane/main.go",
    "dashboard/src/components/shell/DestroyTerminal.vue",
    "dashboard/src/lib/api/destroyClient.ts",
    "dashboard/src/lib/api/generated.ts",
    "dashboard/src/lib/dashboardNavigator.ts",
    "dashboard/src/lib/destroy.ts",
    "dashboard/tests/fakes/destroy.ts",
    "dashboard/tests/unit/destroy.test.ts",
    "internal/brokerclient/client.go",
    "internal/controlapi/destroy.go",
    "packages/openapi-spec/openapi.yaml"
  ],
  "tests": [
    {
      "command": "go test ./internal/broker/ (broker module)",
      "exit_code": 0
    },
    {
      "command": "go test ./internal/controlapi/ ./internal/brokerclient/ ./control-plane/...",
      "exit_code": 0
    },
    {
      "command": "npx vitest run (full dashboard suite, 1939 passed)",
      "exit_code": 0
    },
    {
      "command": "npx vue-tsc --noEmit",
      "exit_code": 0
    },
    {
      "command": "node scripts/generate-client.mjs --check",
      "exit_code": 0
    }
  ],
  "criteria": {
    "broker: POST /v1/subdomains/available answers OPTIONS preflight and POST with CORS for any origin; no other route carries CORS; broker test pins both halves": "broker/internal/broker/http.go setAvailabilityCORS + OPTIONS route; TestAPI_AvailableAnswersCORSForAnyOrigin_NoOtherRouteDoes asserts preflight+POST carry '*' and /claim carries none (green)",
    "DC6: name-freed shows the time of the page's own successful availability call; if that call fails, it says the name couldn't be confirmed from this page": "DestroyTerminal.vue nameFreedLine drives off the page's witnessName result; destroy.test.ts 'name-freed shows the time...' and 'name-freed admits it when the witness could not confirm...'",
    "errored/timed-out act with no reply -> DC6u (data-status=unconfirmed) with name-check one variant (free/still reserved/couldn't ask), server-check, app-finishes-note, open-operator-app, check-again": "navigator destroyUnconfirmed()/'unconfirmed' phase + DestroyTerminal DC6u section; HttpDestroySource maps no-reply to DestroyNoReplyError; destroy.test.ts 'a no-reply act selects DC6u', 'a relayed refusal still selects DC6x', 'name-check shows exactly one variant per witness result'",
    "check-again repeats only the name check and updates name-check in place": "DestroyTerminal runWitness() bound to data-action=check-again; destroy.test.ts 'check-again repeats ONLY the name check and updates name-check in place' (destroyCalls stays 1, witnessCalls goes 2)",
    "dashboard vitest covers reply->DC6, refusal->DC6x, timeout->DC6u selection, witness success and failure; broker go test green": "destroy.test.ts DC6/DC6x/DC6u selection + witness success/failure; broker go test green"
  },
  "summary": "The panel witnesses the freed name itself via the broker's CORS-enabled availability check, showing the confirmation time on DC6 and a first-class DC6u unconfirmed state when the gateway goes quiet.",
  "reason": "",
  "blockers": [],
  "no_code_change": ""
}
**close-report** for #1787 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 1787, "status": "success", "commits": [ "85e300b8" ], "changed_files": [ "STATUS.md", "broker/internal/broker/http.go", "broker/internal/broker/http_test.go", "control-plane/cmd/control-plane/destroy_wiring.go", "control-plane/cmd/control-plane/main.go", "dashboard/src/components/shell/DestroyTerminal.vue", "dashboard/src/lib/api/destroyClient.ts", "dashboard/src/lib/api/generated.ts", "dashboard/src/lib/dashboardNavigator.ts", "dashboard/src/lib/destroy.ts", "dashboard/tests/fakes/destroy.ts", "dashboard/tests/unit/destroy.test.ts", "internal/brokerclient/client.go", "internal/controlapi/destroy.go", "packages/openapi-spec/openapi.yaml" ], "tests": [ { "command": "go test ./internal/broker/ (broker module)", "exit_code": 0 }, { "command": "go test ./internal/controlapi/ ./internal/brokerclient/ ./control-plane/...", "exit_code": 0 }, { "command": "npx vitest run (full dashboard suite, 1939 passed)", "exit_code": 0 }, { "command": "npx vue-tsc --noEmit", "exit_code": 0 }, { "command": "node scripts/generate-client.mjs --check", "exit_code": 0 } ], "criteria": { "broker: POST /v1/subdomains/available answers OPTIONS preflight and POST with CORS for any origin; no other route carries CORS; broker test pins both halves": "broker/internal/broker/http.go setAvailabilityCORS + OPTIONS route; TestAPI_AvailableAnswersCORSForAnyOrigin_NoOtherRouteDoes asserts preflight+POST carry '*' and /claim carries none (green)", "DC6: name-freed shows the time of the page's own successful availability call; if that call fails, it says the name couldn't be confirmed from this page": "DestroyTerminal.vue nameFreedLine drives off the page's witnessName result; destroy.test.ts 'name-freed shows the time...' and 'name-freed admits it when the witness could not confirm...'", "errored/timed-out act with no reply -> DC6u (data-status=unconfirmed) with name-check one variant (free/still reserved/couldn't ask), server-check, app-finishes-note, open-operator-app, check-again": "navigator destroyUnconfirmed()/'unconfirmed' phase + DestroyTerminal DC6u section; HttpDestroySource maps no-reply to DestroyNoReplyError; destroy.test.ts 'a no-reply act selects DC6u', 'a relayed refusal still selects DC6x', 'name-check shows exactly one variant per witness result'", "check-again repeats only the name check and updates name-check in place": "DestroyTerminal runWitness() bound to data-action=check-again; destroy.test.ts 'check-again repeats ONLY the name check and updates name-check in place' (destroyCalls stays 1, witnessCalls goes 2)", "dashboard vitest covers reply->DC6, refusal->DC6x, timeout->DC6u selection, witness success and failure; broker go test green": "destroy.test.ts DC6/DC6x/DC6u selection + witness success/failure; broker go test green" }, "summary": "The panel witnesses the freed name itself via the broker's CORS-enabled availability check, showing the confirmation time on DC6 and a first-class DC6u unconfirmed state when the gateway goes quiet.", "reason": "", "blockers": [], "no_code_change": "" } ``` </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#1787
No description provided.