pairing T8: the gateway follows Coa's public status document to downloads available — and try again when it failed #1517

Closed
opened 2026-09-16 03:14:08 +00:00 by ben · 2 comments
Owner

Parent

Spec #1495 (community app pairing — the descriptor and config server on the gateway, the S3a wallet choice and S3a-APP, the Coa submission at the pipeline tail, the app card). Program map #1293 (the community wallet). Design contract: ADR 0226 (amended by ADRs 0235, 0236, 0238 and the 2026-09-15 spaces amendment) and DDR 0228 (amended by DDR 0239).

Stories 16, 17 and 18 of the spec.

What to build

The gateway watches for the build to finish by reading Coa's public status document for the
community — never a Mātou credential pointing at a community. When it reads ready, the card offers the
downloads, the descriptor gains the app block, and the Members tab's invite copy learns to say get the
app
. When it reads failed, the operator gets the reason and one button that re-submits.

Acceptance criteria

  • While a record is pending, a control-plane ticker polls Coa's public status document
    unauthenticated (fixed interval, exponential backoff while unreachable, capped) and either surface
    opening triggers an on-demand refresh; the poll does not run in any other state
  • ready maps to ready with the downloads address and platforms; failed maps to failed with the
    recorded reason; anything else stays pending
  • An unreachable status document never produces a false failed — the record stays pending and the
    card shows last checked ‹time›
  • ready renders Your community app — downloads available, lists the platforms, opens the downloads
    page, and names the Members tab as where to share it
  • On ready the descriptor gains app{downloads_url, name}, written by the descriptor writer (T2) —
    not by a second writer
  • On ready the Members tab's invite copy gains get the app with the downloads address
  • failed offers try again, which re-submits the same submission from the record; a slug-taken
    answer reads Coa already holds a page for this name and points at Coa's page rather than looping

Blocked by

Tracker: #1516, #1511

  • T7 (the card), T2 (the writer that adds the app block)

Task manifest

task: app-status-poll-and-ready
implements_flow: community-app-journey
implements_edge: "pending → ready | failed"
wireframe: docs/ux/wireframes/p1-founding/p1-s3a-community-app.html
seam: internal/controlapi integration against a fake status document + component tests
depends_on: [pairing:app-card, pairing:descriptor-writer]
out_of_scope: [Coa writing back to the gateway, the invite opening app-first (DDR 0230)]
needs_human_decision: []
## Parent Spec **#1495** (community app pairing — the descriptor and config server on the gateway, the S3a wallet choice and S3a-APP, the Coa submission at the pipeline tail, the app card). Program map **#1293** (the community wallet). Design contract: **ADR 0226** (amended by ADRs 0235, 0236, 0238 and the 2026-09-15 spaces amendment) and **DDR 0228** (amended by DDR 0239). Stories 16, 17 and 18 of the spec. ## What to build The gateway watches for the build to finish by reading Coa's **public** status document for the community — never a Mātou credential pointing at a community. When it reads ready, the card offers the downloads, the descriptor gains the app block, and the Members tab's invite copy learns to say *get the app*. When it reads failed, the operator gets the reason and one button that re-submits. ## Acceptance criteria - [ ] While a record is `pending`, a control-plane ticker polls Coa's public status document unauthenticated (fixed interval, exponential backoff while unreachable, capped) and either surface opening triggers an on-demand refresh; the poll does not run in any other state - [ ] `ready` maps to ready with the downloads address and platforms; `failed` maps to failed with the recorded reason; anything else stays pending - [ ] An **unreachable** status document never produces a false `failed` — the record stays pending and the card shows *last checked ‹time›* - [ ] `ready` renders *Your community app — downloads available*, lists the platforms, opens the downloads page, and names the Members tab as where to share it - [ ] On `ready` the descriptor gains `app{downloads_url, name}`, written by the descriptor writer (T2) — not by a second writer - [ ] On `ready` the Members tab's invite copy gains *get the app* with the downloads address - [ ] `failed` offers *try again*, which re-submits the same submission from the record; a slug-taken answer reads *Coa already holds a page for this name* and points at Coa's page rather than looping ## Blocked by Tracker: #1516, #1511 - T7 (the card), T2 (the writer that adds the app block) ## Task manifest ```yaml task: app-status-poll-and-ready implements_flow: community-app-journey implements_edge: "pending → ready | failed" wireframe: docs/ux/wireframes/p1-founding/p1-s3a-community-app.html seam: internal/controlapi integration against a fake status document + component tests depends_on: [pairing:app-card, pairing:descriptor-writer] out_of_scope: [Coa writing back to the gateway, the invite opening app-first (DDR 0230)] needs_human_decision: [] ```

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

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

close-report for #1517 — status success

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

envelope
{
  "issue": 1517,
  "status": "success",
  "commits": [
    "029594df"
  ],
  "changed_files": [
    "STATUS.md",
    "app/src/components/shell/OperatorHomeScreen.vue",
    "app/src/lib/communityApp.ts",
    "app/tests/unit/operatorHomeCommunityApp.test.ts",
    "control-plane/cmd/control-plane/communityapp_poll.go",
    "control-plane/cmd/control-plane/main.go",
    "dashboard/src/components/members/InviteDialog.vue",
    "dashboard/src/components/members/InviteScreen.vue",
    "dashboard/src/components/members/MembersSurface.vue",
    "dashboard/src/components/shell/OverviewScreen.vue",
    "dashboard/src/components/shell/OverviewSurface.vue",
    "dashboard/src/lib/api/communityAppClient.ts",
    "dashboard/src/lib/api/generated.ts",
    "dashboard/src/lib/communityAppCard.ts",
    "dashboard/src/lib/mountRegistry.ts",
    "dashboard/tests/fakes/communityApp.ts",
    "dashboard/tests/unit/inviteScreen.test.ts",
    "dashboard/tests/unit/overviewCommunityApp.test.ts",
    "internal/communityapp/poll.go",
    "internal/communityapp/poll_test.go",
    "internal/controlapi/communityapp.go",
    "internal/controlapi/communityapp_poll_integration_test.go",
    "packages/openapi-spec/openapi.yaml",
    "packages/ui-kit/src/communityAppCard.ts",
    "packages/ui-kit/src/components/OcCommunityAppCard.vue",
    "packages/ui-kit/src/index.ts",
    "packages/ui-kit/tests/unit/communityAppCard.test.ts",
    "packages/ui-kit/tests/unit/ocCommunityAppCard.test.ts"
  ],
  "tests": [
    {
      "command": "go test ./internal/communityapp/ ./internal/controlapi/ ./control-plane/cmd/control-plane/",
      "exit_code": 0
    },
    {
      "command": "go vet ./internal/communityapp/ ./internal/controlapi/ ./control-plane/cmd/control-plane/",
      "exit_code": 0
    },
    {
      "command": "CI=true pnpm --filter @idss/ui-kit test",
      "exit_code": 0
    },
    {
      "command": "CI=true pnpm --filter dashboard test",
      "exit_code": 0
    },
    {
      "command": "CI=true npx vitest run tests/unit/operatorHomeCommunityApp.test.ts tests/unit/foundingCommunityApp.test.ts tests/unit/boot.test.ts (app)",
      "exit_code": 0
    },
    {
      "command": "vue-tsc -p tsconfig.json (ui-kit, dashboard, app)",
      "exit_code": 0
    },
    {
      "command": "CI=true pnpm --filter @idss/openapi-spec check:client",
      "exit_code": 0
    }
  ],
  "criteria": {
    "While pending a control-plane ticker polls Coa's public status document unauthenticated (fixed interval, exponential backoff while unreachable, capped) and either surface opening triggers an on-demand refresh; the poll does not run in any other state": "internal/communityapp/poll.go (Poller.Run base+backoff cap, pollOnce reaches only while ResolvedState==pending; Refresh on-demand); coaStatusReader in communityapp_poll.go fetches unauthenticated via coaclient; controlapi/communityapp.go GET calls Refresh when pending (WithCommunityAppRefresh); tests TestPoller_RefreshReachesOnlyWhilePending, TestCommunityApp_OnOpenRefreshWhilePending, TestCommunityApp_OnOpenNoRefreshWhenSettled",
    "ready maps to ready with the downloads address and platforms; failed maps to failed with the recorded reason; anything else stays pending": "communityapp.Reconcile; tests TestReconcile_ReadyCarriesDownloadsAndPlatforms/FailedCarriesReason/UnknownStateStaysPending",
    "An unreachable status document never produces a false failed — the record stays pending and the card shows last checked": "Reconcile returns (rec,false) on readErr, last_checked unchanged (TestReconcile_UnreachableNeverFalseFailed, TestPoller_RefreshUnreachableRestsAtPending); pending card detail appends '· last checked ‹time›' from lastCheckedAt (ui-kit resolver + communityAppCard.test 'pending carries last checked')",
    "ready renders Your community app — downloads available, lists the platforms, opens the downloads page, and names the Members tab": "packages/ui-kit/src/communityAppCard.ts ready state (title, platforms detail, open-downloads action, note='Members tab'); tests communityAppCard.test 'ready lists platforms...' + ocCommunityAppCard.test 'ready opens the downloads page' + overviewCommunityApp 'ready opens the downloads page and names the Members tab'",
    "On ready the descriptor gains app{downloads_url, name}, written by the descriptor writer (T2) — not by a second writer": "the poll writes ready to the SAME communityapp store the orgconfig.LiveProvider reads; orgconfig.AppBlockFor renders app{name,downloads_url} on the writer's next reconcile (existing descriptor_writer_integration_test proves 'app block written only once ready'); main.go wires appStore shared by WithCommunityApp, the poller and the descriptor provider",
    "On ready the Members tab's invite copy gains get the app with the downloads address": "dashboard InviteScreen.vue data-field=get-the-app + data-action=get-the-app href=downloadsUrl, threaded MembersSurface->InviteDialog->InviteScreen from the ready record; test inviteScreen.test 'once the community app is ready, the minted invite copy gains get the app'",
    "failed offers try again, which re-submits the same submission from the record; a slug-taken answer reads Coa already holds a page for this name and points at Coa's page rather than looping": "resolver failed state rebuild action + SLUG_TAKEN_MESSAGE branch (no rebuild, points at pageUrl); controlapi WithCommunityAppResubmit + communityapp.ApplyResubmit; production descriptorResubmitter; tests TestResubmit_AcceptedMovesToPending/SlugTakenNamesItAndPointsAtCoa/RefusesNonStewardAndNoAuth/NotFailedIsAConflict, ApplyResubmit unit tests, overviewCommunityApp 'try again re-submits...repaints', ui-kit 'a slug-taken failure...offers NO try again'"
  },
  "summary": "The control plane polls Coa's public status document while pending (ready/failed/last-checked, no false-fail), the card gains its ready and failed states with try-again and the slug-taken message, and the invite copy gains get-the-app on ready.",
  "blockers": []
}
**close-report** for #1517 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 1517, "status": "success", "commits": [ "029594df" ], "changed_files": [ "STATUS.md", "app/src/components/shell/OperatorHomeScreen.vue", "app/src/lib/communityApp.ts", "app/tests/unit/operatorHomeCommunityApp.test.ts", "control-plane/cmd/control-plane/communityapp_poll.go", "control-plane/cmd/control-plane/main.go", "dashboard/src/components/members/InviteDialog.vue", "dashboard/src/components/members/InviteScreen.vue", "dashboard/src/components/members/MembersSurface.vue", "dashboard/src/components/shell/OverviewScreen.vue", "dashboard/src/components/shell/OverviewSurface.vue", "dashboard/src/lib/api/communityAppClient.ts", "dashboard/src/lib/api/generated.ts", "dashboard/src/lib/communityAppCard.ts", "dashboard/src/lib/mountRegistry.ts", "dashboard/tests/fakes/communityApp.ts", "dashboard/tests/unit/inviteScreen.test.ts", "dashboard/tests/unit/overviewCommunityApp.test.ts", "internal/communityapp/poll.go", "internal/communityapp/poll_test.go", "internal/controlapi/communityapp.go", "internal/controlapi/communityapp_poll_integration_test.go", "packages/openapi-spec/openapi.yaml", "packages/ui-kit/src/communityAppCard.ts", "packages/ui-kit/src/components/OcCommunityAppCard.vue", "packages/ui-kit/src/index.ts", "packages/ui-kit/tests/unit/communityAppCard.test.ts", "packages/ui-kit/tests/unit/ocCommunityAppCard.test.ts" ], "tests": [ { "command": "go test ./internal/communityapp/ ./internal/controlapi/ ./control-plane/cmd/control-plane/", "exit_code": 0 }, { "command": "go vet ./internal/communityapp/ ./internal/controlapi/ ./control-plane/cmd/control-plane/", "exit_code": 0 }, { "command": "CI=true pnpm --filter @idss/ui-kit test", "exit_code": 0 }, { "command": "CI=true pnpm --filter dashboard test", "exit_code": 0 }, { "command": "CI=true npx vitest run tests/unit/operatorHomeCommunityApp.test.ts tests/unit/foundingCommunityApp.test.ts tests/unit/boot.test.ts (app)", "exit_code": 0 }, { "command": "vue-tsc -p tsconfig.json (ui-kit, dashboard, app)", "exit_code": 0 }, { "command": "CI=true pnpm --filter @idss/openapi-spec check:client", "exit_code": 0 } ], "criteria": { "While pending a control-plane ticker polls Coa's public status document unauthenticated (fixed interval, exponential backoff while unreachable, capped) and either surface opening triggers an on-demand refresh; the poll does not run in any other state": "internal/communityapp/poll.go (Poller.Run base+backoff cap, pollOnce reaches only while ResolvedState==pending; Refresh on-demand); coaStatusReader in communityapp_poll.go fetches unauthenticated via coaclient; controlapi/communityapp.go GET calls Refresh when pending (WithCommunityAppRefresh); tests TestPoller_RefreshReachesOnlyWhilePending, TestCommunityApp_OnOpenRefreshWhilePending, TestCommunityApp_OnOpenNoRefreshWhenSettled", "ready maps to ready with the downloads address and platforms; failed maps to failed with the recorded reason; anything else stays pending": "communityapp.Reconcile; tests TestReconcile_ReadyCarriesDownloadsAndPlatforms/FailedCarriesReason/UnknownStateStaysPending", "An unreachable status document never produces a false failed — the record stays pending and the card shows last checked": "Reconcile returns (rec,false) on readErr, last_checked unchanged (TestReconcile_UnreachableNeverFalseFailed, TestPoller_RefreshUnreachableRestsAtPending); pending card detail appends '· last checked ‹time›' from lastCheckedAt (ui-kit resolver + communityAppCard.test 'pending carries last checked')", "ready renders Your community app — downloads available, lists the platforms, opens the downloads page, and names the Members tab": "packages/ui-kit/src/communityAppCard.ts ready state (title, platforms detail, open-downloads action, note='Members tab'); tests communityAppCard.test 'ready lists platforms...' + ocCommunityAppCard.test 'ready opens the downloads page' + overviewCommunityApp 'ready opens the downloads page and names the Members tab'", "On ready the descriptor gains app{downloads_url, name}, written by the descriptor writer (T2) — not by a second writer": "the poll writes ready to the SAME communityapp store the orgconfig.LiveProvider reads; orgconfig.AppBlockFor renders app{name,downloads_url} on the writer's next reconcile (existing descriptor_writer_integration_test proves 'app block written only once ready'); main.go wires appStore shared by WithCommunityApp, the poller and the descriptor provider", "On ready the Members tab's invite copy gains get the app with the downloads address": "dashboard InviteScreen.vue data-field=get-the-app + data-action=get-the-app href=downloadsUrl, threaded MembersSurface->InviteDialog->InviteScreen from the ready record; test inviteScreen.test 'once the community app is ready, the minted invite copy gains get the app'", "failed offers try again, which re-submits the same submission from the record; a slug-taken answer reads Coa already holds a page for this name and points at Coa's page rather than looping": "resolver failed state rebuild action + SLUG_TAKEN_MESSAGE branch (no rebuild, points at pageUrl); controlapi WithCommunityAppResubmit + communityapp.ApplyResubmit; production descriptorResubmitter; tests TestResubmit_AcceptedMovesToPending/SlugTakenNamesItAndPointsAtCoa/RefusesNonStewardAndNoAuth/NotFailedIsAConflict, ApplyResubmit unit tests, overviewCommunityApp 'try again re-submits...repaints', ui-kit 'a slug-taken failure...offers NO try again'" }, "summary": "The control plane polls Coa's public status document while pending (ready/failed/last-checked, no false-fail), the card gains its ready and failed states with try-again and the slug-taken message, and the invite copy gains get-the-app on ready.", "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#1517
No description provided.