pairing T2: the control plane is the descriptor's only writer — org-config from the roster, rewritten on every change, with the golden documents #1511

Closed
opened 2026-09-16 03:13:26 +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 9 of the spec, plus the golden documents every other repo tests against.

What to build

The descriptor is a rendering of the roster, and the roster has exactly one writer (ADR 0198). The control
plane builds the community's block — identity, OOBI, name, slug, registry, the stewards and their OOBIs —
together with the gateway's own blocks (the steward API root, the credential schemas' SAIDs and public
OOBIs, the stack pins, the join address, the sign-in address, and the app block once an app exists) and
writes it to the config server over loopback with the admin token. It writes at founding's identity rows,
again whenever the roster settles a steward change, and again when the app record reaches ready.

Acceptance criteria

  • At founding's identity rows, once the community identity and registry exist, org-config is posted
    over loopback and the served document's community block reflects the roster
  • A steward promotion, removal or rotation rewrites org-config in place (an update, not
    delete-then-post) and the served document changes within one poll of the change settling
  • The gateway blocks are rendered from the roster, the schema set, the pins and the apex — not
    hand-written — and the app block is written only when the app record says ready
  • The admin token is read from the clan-vars secret by the control plane only; it never reaches the
    operator app, the dashboard, a wallet or a log
  • Three golden documents are checked into the repo — no any-sync, any-sync installed, app ready —
    and asserted against the writer's output; they are the fixtures matou-app's loader tests use
  • The writer is proven at the control-API integration seam against a fake config server

Blocked by

Tracker: #1510

  • T1 (the config server unit and its loopback port)

Task manifest

task: descriptor-writer
implements_flow: p1-founding
seam: internal/controlapi integration tests over a fake config server
depends_on: [pairing:config-server-unit-and-apex-routes]
out_of_scope: [config server 1.1 itself (matou-infrastructure), the outside probe, the app submission]
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 9 of the spec, plus the golden documents every other repo tests against. ## What to build The descriptor is a rendering of the roster, and the roster has exactly one writer (ADR 0198). The control plane builds the community's block — identity, OOBI, name, slug, registry, the stewards and their OOBIs — together with the gateway's own blocks (the steward API root, the credential schemas' SAIDs and public OOBIs, the stack pins, the join address, the sign-in address, and the app block once an app exists) and writes it to the config server over loopback with the admin token. It writes at founding's identity rows, again whenever the roster settles a steward change, and again when the app record reaches ready. ## Acceptance criteria - [ ] At founding's identity rows, once the community identity and registry exist, org-config is posted over loopback and the served document's `community` block reflects the roster - [ ] A steward promotion, removal or rotation rewrites org-config **in place** (an update, not delete-then-post) and the served document changes within one poll of the change settling - [ ] The gateway blocks are rendered from the roster, the schema set, the pins and the apex — not hand-written — and the app block is written only when the app record says ready - [ ] The admin token is read from the clan-vars secret by the control plane only; it never reaches the operator app, the dashboard, a wallet or a log - [ ] **Three golden documents** are checked into the repo — no any-sync, any-sync installed, app ready — and asserted against the writer's output; they are the fixtures matou-app's loader tests use - [ ] The writer is proven at the control-API integration seam against a fake config server ## Blocked by Tracker: #1510 - T1 (the config server unit and its loopback port) ## Task manifest ```yaml task: descriptor-writer implements_flow: p1-founding seam: internal/controlapi integration tests over a fake config server depends_on: [pairing:config-server-unit-and-apex-routes] out_of_scope: [config server 1.1 itself (matou-infrastructure), the outside probe, the app submission] needs_human_decision: [] ```

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

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

close-report for #1511 — status success

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

envelope
{
  "issue": 1511,
  "status": "success",
  "commits": [
    "cbda0c7f06bb4e8046d63da886abe46314d38228"
  ],
  "changed_files": [
    "STATUS.md",
    "control-plane/cmd/control-plane/main.go",
    "internal/clan/descriptor_writer_env_test.go",
    "internal/clan/keri.go",
    "internal/clan/vmguest.go",
    "internal/controlapi/descriptor_writer_integration_test.go",
    "internal/orgconfig/client.go",
    "internal/orgconfig/client_test.go",
    "internal/orgconfig/doc.go",
    "internal/orgconfig/identity.go",
    "internal/orgconfig/render.go",
    "internal/orgconfig/render_test.go",
    "internal/orgconfig/testdata/golden-anysync.json",
    "internal/orgconfig/testdata/golden-app-ready.json",
    "internal/orgconfig/testdata/golden-no-anysync.json",
    "internal/orgconfig/writer.go",
    "internal/orgconfig/writer_test.go"
  ],
  "tests": [
    {
      "command": "go test ./internal/orgconfig/",
      "exit_code": 0
    },
    {
      "command": "go test ./internal/controlapi/ (incl. TestDescriptorSeam_*)",
      "exit_code": 0
    },
    {
      "command": "go test ./internal/clan/ (incl. TestControlPlane_ConfigServerToken*)",
      "exit_code": 0
    },
    {
      "command": "go test ./control-plane/cmd/control-plane/",
      "exit_code": 0
    },
    {
      "command": "go vet ./internal/orgconfig/ ./internal/controlapi/ ./internal/clan/ ./control-plane/cmd/control-plane/",
      "exit_code": 0
    },
    {
      "command": "pre-push go-ci gate: go test ./... (full module)",
      "exit_code": 0
    }
  ],
  "criteria": {
    "At founding's identity rows, once the community identity and registry exist, org-config is posted over loopback and the served document's community block reflects the roster": "orgconfig.Writer.Sync rests until Identity.Ready (aid+registry), then Renders+PUTs; TestDescriptorSeam_FoundingWritesRosterReflectingDocument proves nothing served before founding (404) then community/admins reflect the roster via the fake config server; LiveProvider wired in productionIdip (main.go)",
    "A steward promotion, removal or rotation rewrites org-config in place (an update, not delete-then-post) and the served document changes within one poll of the change settling": "HTTPClient.Write PUTs /api/config (create-or-replace); TestDescriptorSeam_StewardChangeUpdatesInPlace mutates the roster (promote+demote), re-Syncs, asserts admins change, puts==2, deletes==0; Writer.Run reconciles every 30s (descriptorWriterInterval)",
    "The gateway blocks are rendered from the roster, the schema set, the pins and the apex — not hand-written — and the app block is written only when the app record says ready": "orgconfig.Derive builds api_url/schemas/boot/signin/stack from apex+SchemaSAIDs+pins; AppBlockFor gates the app block on communityapp.StateReady+downloads; TestAppBlockFor_OnlyWhenReady + TestDescriptorSeam_AppBlockOnlyWhenReady + golden-no-anysync vs golden-app-ready",
    "The admin token is read from the clan-vars secret by the control plane only; it never reaches the operator app, the dashboard, a wallet or a log": "control-plane unit reads CONFIG_ADMIN_TOKEN via EnvironmentFile off the config-server-admin-token generator on the IDIP path (vmguest.go controlPlaneConfigServerEnvFile); HTTPClient sends it only as a bearer and quotes only status on refusal; TestControlPlane_ConfigServerTokenRidesBothIDIPRenders / _KanidmPathCarriesNo... ; TestDescriptorSeam_TokenNeverLogged + TestHTTPClient_NonTwoXXIsErrorWithoutToken",
    "Three golden documents are checked into the repo — no any-sync, any-sync installed, app ready — and asserted against the writer's output; they are the fixtures matou-app's loader tests use": "internal/orgconfig/testdata/golden-{no-anysync,anysync,app-ready}.json asserted by TestGolden_Documents against Render(Derive(...)) output",
    "The writer is proven at the control-API integration seam against a fake config server": "internal/controlapi/descriptor_writer_integration_test.go drives the real orgconfig.Writer + HTTPClient against a fakeConfigServer (PUT/GET /api/config + /api/client-config, bearer-gated) across all clauses"
  },
  "summary": "The control plane now renders the community backend descriptor from the roster and writes it in place to the config server over loopback with the admin token, proven at the control-API seam against a fake config server with three checked-in golden documents.",
  "blockers": []
}
**close-report** for #1511 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 1511, "status": "success", "commits": [ "cbda0c7f06bb4e8046d63da886abe46314d38228" ], "changed_files": [ "STATUS.md", "control-plane/cmd/control-plane/main.go", "internal/clan/descriptor_writer_env_test.go", "internal/clan/keri.go", "internal/clan/vmguest.go", "internal/controlapi/descriptor_writer_integration_test.go", "internal/orgconfig/client.go", "internal/orgconfig/client_test.go", "internal/orgconfig/doc.go", "internal/orgconfig/identity.go", "internal/orgconfig/render.go", "internal/orgconfig/render_test.go", "internal/orgconfig/testdata/golden-anysync.json", "internal/orgconfig/testdata/golden-app-ready.json", "internal/orgconfig/testdata/golden-no-anysync.json", "internal/orgconfig/writer.go", "internal/orgconfig/writer_test.go" ], "tests": [ { "command": "go test ./internal/orgconfig/", "exit_code": 0 }, { "command": "go test ./internal/controlapi/ (incl. TestDescriptorSeam_*)", "exit_code": 0 }, { "command": "go test ./internal/clan/ (incl. TestControlPlane_ConfigServerToken*)", "exit_code": 0 }, { "command": "go test ./control-plane/cmd/control-plane/", "exit_code": 0 }, { "command": "go vet ./internal/orgconfig/ ./internal/controlapi/ ./internal/clan/ ./control-plane/cmd/control-plane/", "exit_code": 0 }, { "command": "pre-push go-ci gate: go test ./... (full module)", "exit_code": 0 } ], "criteria": { "At founding's identity rows, once the community identity and registry exist, org-config is posted over loopback and the served document's community block reflects the roster": "orgconfig.Writer.Sync rests until Identity.Ready (aid+registry), then Renders+PUTs; TestDescriptorSeam_FoundingWritesRosterReflectingDocument proves nothing served before founding (404) then community/admins reflect the roster via the fake config server; LiveProvider wired in productionIdip (main.go)", "A steward promotion, removal or rotation rewrites org-config in place (an update, not delete-then-post) and the served document changes within one poll of the change settling": "HTTPClient.Write PUTs /api/config (create-or-replace); TestDescriptorSeam_StewardChangeUpdatesInPlace mutates the roster (promote+demote), re-Syncs, asserts admins change, puts==2, deletes==0; Writer.Run reconciles every 30s (descriptorWriterInterval)", "The gateway blocks are rendered from the roster, the schema set, the pins and the apex — not hand-written — and the app block is written only when the app record says ready": "orgconfig.Derive builds api_url/schemas/boot/signin/stack from apex+SchemaSAIDs+pins; AppBlockFor gates the app block on communityapp.StateReady+downloads; TestAppBlockFor_OnlyWhenReady + TestDescriptorSeam_AppBlockOnlyWhenReady + golden-no-anysync vs golden-app-ready", "The admin token is read from the clan-vars secret by the control plane only; it never reaches the operator app, the dashboard, a wallet or a log": "control-plane unit reads CONFIG_ADMIN_TOKEN via EnvironmentFile off the config-server-admin-token generator on the IDIP path (vmguest.go controlPlaneConfigServerEnvFile); HTTPClient sends it only as a bearer and quotes only status on refusal; TestControlPlane_ConfigServerTokenRidesBothIDIPRenders / _KanidmPathCarriesNo... ; TestDescriptorSeam_TokenNeverLogged + TestHTTPClient_NonTwoXXIsErrorWithoutToken", "Three golden documents are checked into the repo — no any-sync, any-sync installed, app ready — and asserted against the writer's output; they are the fixtures matou-app's loader tests use": "internal/orgconfig/testdata/golden-{no-anysync,anysync,app-ready}.json asserted by TestGolden_Documents against Render(Derive(...)) output", "The writer is proven at the control-API integration seam against a fake config server": "internal/controlapi/descriptor_writer_integration_test.go drives the real orgconfig.Writer + HTTPClient against a fakeConfigServer (PUT/GET /api/config + /api/client-config, bearer-gated) across all clauses" }, "summary": "The control plane now renders the community backend descriptor from the roster and writes it in place to the config server over loopback with the admin token, proven at the control-API seam against a fake config server with three checked-in golden documents.", "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#1511
No description provided.