pairing T5: the app record — one config-repo document both surfaces read through the control API #1514

Closed
opened 2026-09-16 03:13:48 +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).

Story 20 of the spec, split out of the tail so the record exists before anything writes to it.

What to build

One durable record of where the community's app is, written by the control plane and read by both the
operator app's home and the dashboard's overview, so an operator never sees two truths. It survives a
restart, a dashboard reload and a gateway redeploy.

Acceptance criteria

  • The record lives in the config repo under the control plane's single-writer rule (the
    service-access matrix precedent) and holds: state, slug, the Coa page address, submitted-at,
    last-checked-at, the reason, the downloads address and the platforms
  • It is read and written through the control API, with the OpenAPI spec and the generated client
    regenerated in the same commit (the drift check stays green)
  • The absence of a record, and a record whose choice was later, both read as none
  • Writes are refused for unauthenticated and wrong-token callers (contract tests)
  • The record survives an operator-app restart, a dashboard reload and a gateway redeploy
  • Proven at the control-API integration seam

Blocked by

None — can start immediately.

Task manifest

task: app-record
seam: internal/controlapi integration tests (the matrix-store precedent)
depends_on: []
out_of_scope: [the submission, the poll, the card's UI]
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). Story 20 of the spec, split out of the tail so the record exists before anything writes to it. ## What to build One durable record of where the community's app is, written by the control plane and read by both the operator app's home and the dashboard's overview, so an operator never sees two truths. It survives a restart, a dashboard reload and a gateway redeploy. ## Acceptance criteria - [ ] The record lives in the config repo under the control plane's single-writer rule (the service-access matrix precedent) and holds: state, slug, the Coa page address, submitted-at, last-checked-at, the reason, the downloads address and the platforms - [ ] It is read and written through the control API, with the OpenAPI spec and the generated client regenerated in the same commit (the drift check stays green) - [ ] The absence of a record, and a record whose choice was *later*, both read as `none` - [ ] Writes are refused for unauthenticated and wrong-token callers (contract tests) - [ ] The record survives an operator-app restart, a dashboard reload and a gateway redeploy - [ ] Proven at the control-API integration seam ## Blocked by None — can start immediately. ## Task manifest ```yaml task: app-record seam: internal/controlapi integration tests (the matrix-store precedent) depends_on: [] out_of_scope: [the submission, the poll, the card's UI] needs_human_decision: [] ```

swarm-claim host=elitebook-distributed-server-03 run=24975
(automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=elitebook-distributed-server-03 run=24975 (automated multi-host claim — lowest live claim id works this ticket)

close-report for #1514 — status success

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

envelope
{
  "issue": 1514,
  "status": "success",
  "commits": [
    "e532a97aa77a8af26085c262a5a9a7eedecb7052"
  ],
  "changed_files": [
    "STATUS.md",
    "control-plane/cmd/control-plane/main.go",
    "dashboard/src/lib/api/generated.ts",
    "internal/communityapp/record.go",
    "internal/communityapp/store.go",
    "internal/communityapp/store_test.go",
    "internal/controlapi/communityapp.go",
    "internal/controlapi/communityapp_integration_test.go",
    "packages/openapi-spec/openapi.yaml"
  ],
  "tests": [
    {
      "command": "go test ./internal/communityapp/... ./internal/controlapi/...",
      "exit_code": 0
    },
    {
      "command": "go vet ./internal/communityapp/... ./internal/controlapi/...",
      "exit_code": 0
    },
    {
      "command": "go test ./control-plane/cmd/control-plane/",
      "exit_code": 0
    },
    {
      "command": "node packages/openapi-spec/scripts/generate-client.mjs --check",
      "exit_code": 0
    },
    {
      "command": "nix develop .#go-ci (pre-push Go seam) — full ./... green",
      "exit_code": 0
    },
    {
      "command": "eslint . (pre-push TS gate)",
      "exit_code": 0
    }
  ],
  "criteria": {
    "The record lives in the config repo under the control plane's single-writer rule (matrix precedent) and holds state, slug, Coa page address, submitted-at, last-checked-at, reason, downloads address and platforms": "internal/communityapp/record.go (Record struct with all fields) + store.go (ConfigRepoStore over clan.RepoDoc at idss/community-app.json, Save commits through the single writer — the access-matrix precedent)",
    "It is read and written through the control API, with the OpenAPI spec and the generated client regenerated in the same commit (drift check stays green)": "internal/controlapi/communityapp.go (GET+PUT /api/v1/community-app); packages/openapi-spec/openapi.yaml (paths + CommunityAppView/CommunityAppRecord/CommunityAppState); dashboard/src/lib/api/generated.ts regenerated; generate-client.mjs --check exit 0",
    "The absence of a record, and a record whose choice was later, both read as none": "communityapp.ResolvedState (record.go) — !present || chosen==later || state==\"\" => none; proven by TestCommunityApp_AbsentReadsNone, TestCommunityApp_LaterReadsNone, TestConfigRepoStore_AbsentReadsNone, TestConfigRepoStore_LaterReadsNone",
    "Writes are refused for unauthenticated and wrong-token callers (contract tests)": "writeAuthed (communityapp.go) bearer gate; TestCommunityApp_WriteRefusedUnauthenticated (401), TestCommunityApp_WriteRefusedWrongToken (401), TestCommunityApp_WriteSealedWhenNoToken (503) — the record never moves on a refusal",
    "The record survives an operator-app restart, a dashboard reload and a gateway redeploy": "ConfigRepoStore reads off the working tree so a rebuild-from-checkout reads it back — TestConfigRepoStore_SurvivesRedeploy (fresh store over same tree); TestCommunityApp_WriteThenReadBack reads back through a fresh handler over the same store (restart/reload)",
    "Proven at the control-API integration seam": "internal/controlapi/communityapp_integration_test.go drives GET/PUT end to end over httptest against the real WithCommunityApp handler"
  },
  "summary": "The community-app pairing record — one config-repo document, read via GET and written via a bearer-gated PUT on the control API, resolving absent/later to none — proven at the controlapi seam and durable across restart/reload/redeploy.",
  "blockers": []
}
**close-report** for #1514 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 1514, "status": "success", "commits": [ "e532a97aa77a8af26085c262a5a9a7eedecb7052" ], "changed_files": [ "STATUS.md", "control-plane/cmd/control-plane/main.go", "dashboard/src/lib/api/generated.ts", "internal/communityapp/record.go", "internal/communityapp/store.go", "internal/communityapp/store_test.go", "internal/controlapi/communityapp.go", "internal/controlapi/communityapp_integration_test.go", "packages/openapi-spec/openapi.yaml" ], "tests": [ { "command": "go test ./internal/communityapp/... ./internal/controlapi/...", "exit_code": 0 }, { "command": "go vet ./internal/communityapp/... ./internal/controlapi/...", "exit_code": 0 }, { "command": "go test ./control-plane/cmd/control-plane/", "exit_code": 0 }, { "command": "node packages/openapi-spec/scripts/generate-client.mjs --check", "exit_code": 0 }, { "command": "nix develop .#go-ci (pre-push Go seam) — full ./... green", "exit_code": 0 }, { "command": "eslint . (pre-push TS gate)", "exit_code": 0 } ], "criteria": { "The record lives in the config repo under the control plane's single-writer rule (matrix precedent) and holds state, slug, Coa page address, submitted-at, last-checked-at, reason, downloads address and platforms": "internal/communityapp/record.go (Record struct with all fields) + store.go (ConfigRepoStore over clan.RepoDoc at idss/community-app.json, Save commits through the single writer — the access-matrix precedent)", "It is read and written through the control API, with the OpenAPI spec and the generated client regenerated in the same commit (drift check stays green)": "internal/controlapi/communityapp.go (GET+PUT /api/v1/community-app); packages/openapi-spec/openapi.yaml (paths + CommunityAppView/CommunityAppRecord/CommunityAppState); dashboard/src/lib/api/generated.ts regenerated; generate-client.mjs --check exit 0", "The absence of a record, and a record whose choice was later, both read as none": "communityapp.ResolvedState (record.go) — !present || chosen==later || state==\"\" => none; proven by TestCommunityApp_AbsentReadsNone, TestCommunityApp_LaterReadsNone, TestConfigRepoStore_AbsentReadsNone, TestConfigRepoStore_LaterReadsNone", "Writes are refused for unauthenticated and wrong-token callers (contract tests)": "writeAuthed (communityapp.go) bearer gate; TestCommunityApp_WriteRefusedUnauthenticated (401), TestCommunityApp_WriteRefusedWrongToken (401), TestCommunityApp_WriteSealedWhenNoToken (503) — the record never moves on a refusal", "The record survives an operator-app restart, a dashboard reload and a gateway redeploy": "ConfigRepoStore reads off the working tree so a rebuild-from-checkout reads it back — TestConfigRepoStore_SurvivesRedeploy (fresh store over same tree); TestCommunityApp_WriteThenReadBack reads back through a fresh handler over the same store (restart/reload)", "Proven at the control-API integration seam": "internal/controlapi/communityapp_integration_test.go drives GET/PUT end to end over httptest against the real WithCommunityApp handler" }, "summary": "The community-app pairing record — one config-repo document, read via GET and written via a bearer-gated PUT on the control API, resolving absent/later to none — proven at the controlapi seam and durable across restart/reload/redeploy.", "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#1514
No description provided.