pairing T11: the space-ID door — a steward's wallet records the three IDs once, and the control plane stays the only writer #1520

Closed
opened 2026-09-16 03:14:28 +00:00 by ben · 3 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 27 (the steward half) of the spec — the door matou-app's fallback posts to.

What to build

For the communities founding did not create spaces for — chose later, founded earlier, or the tail could
not reach any-sync — the first steward's wallet creates them and tells the gateway. The gateway records
them once, and every wallet after that joins the same three spaces.

Acceptance criteria

  • One steward-API route accepts the three space IDs under the existing steward authentication
    (ADR 0199's key challenge)
  • With no IDs recorded, the control plane records them in the config repo beside the app record and the
    descriptor writer rewrites org-config
  • With IDs already recorded, the route answers a conflict naming the recorded set and writes
    nothing — first write wins
  • A non-steward caller, or any other authentication, is refused
  • No config-server admin token is ever exposed to a wallet by this route
  • Founding's own creation (T10) does not go through this route — it writes directly

Blocked by

Tracker: #1511

  • T2 (the writer)

Task manifest

task: space-id-door
seam: internal/controlapi integration tests (the steward-route precedent)
depends_on: [pairing:descriptor-writer]
out_of_scope: [the wallet side of the fallback, founding's own creation]
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 27 (the steward half) of the spec — the door matou-app's fallback posts to. ## What to build For the communities founding did not create spaces for — chose later, founded earlier, or the tail could not reach any-sync — the first steward's wallet creates them and tells the gateway. The gateway records them once, and every wallet after that joins the same three spaces. ## Acceptance criteria - [ ] One steward-API route accepts the three space IDs under the existing steward authentication (ADR 0199's key challenge) - [ ] With no IDs recorded, the control plane records them in the config repo beside the app record and the descriptor writer rewrites org-config - [ ] With IDs already recorded, the route answers a **conflict naming the recorded set** and writes nothing — first write wins - [ ] A non-steward caller, or any other authentication, is refused - [ ] No config-server admin token is ever exposed to a wallet by this route - [ ] Founding's own creation (T10) does not go through this route — it writes directly ## Blocked by Tracker: #1511 - T2 (the writer) ## Task manifest ```yaml task: space-id-door seam: internal/controlapi integration tests (the steward-route precedent) depends_on: [pairing:descriptor-writer] out_of_scope: [the wallet side of the fallback, founding's own creation] 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 #1520 — status success

⛔ close-report gates REFUSED this close — the following claims did not verify:

  • commit 9bb44800a9 is not reachable from origin/main (not landed)
  • changed_files: 'STATUS.md' is not in the diff of the claimed commits
  • changed_files: 'control-plane/cmd/control-plane/main.go' is not in the diff of the claimed commits
  • changed_files: 'internal/controlapi/descriptor_writer_integration_test.go' is not in the diff of the claimed commits
  • changed_files: 'internal/controlapi/spaces.go' is not in the diff of the claimed commits
  • changed_files: 'internal/controlapi/spaces_integration_test.go' is not in the diff of the claimed commits
  • changed_files: 'internal/orgconfig/render.go' is not in the diff of the claimed commits
  • changed_files: 'internal/orgconfig/render_test.go' is not in the diff of the claimed commits
  • changed_files: 'internal/orgconfig/writer.go' is not in the diff of the claimed commits
  • changed_files: 'internal/orgconfig/writer_test.go' is not in the diff of the claimed commits
  • changed_files: 'internal/orgconfig/testdata/golden-anysync-spaces.json' is not in the diff of the claimed commits
  • changed_files: 'internal/spaces/spaces.go' is not in the diff of the claimed commits
  • changed_files: 'internal/spaces/spaces_test.go' is not in the diff of the claimed commits
  • changed_files: 'internal/spaces/store.go' is not in the diff of the claimed commits
envelope
{
  "issue": 1520,
  "status": "success",
  "commits": [
    "9bb44800a9fa0363cd3eaaa39ebf911013a0e2a4"
  ],
  "changed_files": [
    "STATUS.md",
    "control-plane/cmd/control-plane/main.go",
    "internal/controlapi/descriptor_writer_integration_test.go",
    "internal/controlapi/spaces.go",
    "internal/controlapi/spaces_integration_test.go",
    "internal/orgconfig/render.go",
    "internal/orgconfig/render_test.go",
    "internal/orgconfig/writer.go",
    "internal/orgconfig/writer_test.go",
    "internal/orgconfig/testdata/golden-anysync-spaces.json",
    "internal/spaces/spaces.go",
    "internal/spaces/spaces_test.go",
    "internal/spaces/store.go"
  ],
  "tests": [
    {
      "command": "nix develop .#go-ci --command go test ./internal/spaces/... ./internal/orgconfig/... ./internal/controlapi/...",
      "exit_code": 0
    },
    {
      "command": "nix develop .#go-ci --command go test ./control-plane/... ./internal/clan/...",
      "exit_code": 0
    },
    {
      "command": "nix develop .#go-ci --command bash -c 'gofmt -l ...; go vet ./...; go build ./...'",
      "exit_code": 0
    }
  ],
  "criteria": {
    "One steward-API route accepts the three space IDs under the existing steward authentication (ADR 0199's key challenge)": "internal/controlapi/spaces.go POST /api/v1/idip/spaces gated on operatorAuthed/StewardResolver; TestSpacesDoor_RecordsThenWriterNamesThem",
    "With no IDs recorded, the control plane records them in the config repo beside the app record and the descriptor writer rewrites org-config": "internal/spaces store at idss/community-spaces.json (beside idss/community-app.json); orgconfig withSpaces + LiveProvider; TestSpacesDoor_RecordsThenWriterNamesThem asserts the served anysync names all three",
    "With IDs already recorded, the route answers a conflict naming the recorded set and writes nothing — first write wins": "internal/controlapi/spaces.go 409 SpacesConflict on existing.Complete(); TestSpacesDoor_FirstWriteWins",
    "A non-steward caller, or any other authentication, is refused": "operatorAuthed → 403 non-steward, 401 forged-header/no-session; TestSpacesDoor_RefusesNonStewardAndNoAuth",
    "No config-server admin token is ever exposed to a wallet by this route": "the door writes only the config-repo record; TestSpacesDoor_NoAdminTokenReachesTheWallet asserts no token in responses or logs",
    "Founding's own creation (T10) does not go through this route — it writes directly": "the store is the shared recording seam; TestSpacesDoor_TenDirectWriteBypassesTheRoute pins a direct Save reaching org-config through the writer"
  },
  "summary": "Added the steward-API space-ID door (POST /api/v1/idip/spaces) that records the three any-sync space IDs once (first write wins) via a new internal/spaces store, with the descriptor writer naming them in org-config's anysync block.",
  "blockers": []
}
**close-report** for #1520 — status `success` :no_entry: **close-report gates REFUSED this close** — the following claims did not verify: - commit 9bb44800a9fa0363cd3eaaa39ebf911013a0e2a4 is not reachable from origin/main (not landed) - changed_files: 'STATUS.md' is not in the diff of the claimed commits - changed_files: 'control-plane/cmd/control-plane/main.go' is not in the diff of the claimed commits - changed_files: 'internal/controlapi/descriptor_writer_integration_test.go' is not in the diff of the claimed commits - changed_files: 'internal/controlapi/spaces.go' is not in the diff of the claimed commits - changed_files: 'internal/controlapi/spaces_integration_test.go' is not in the diff of the claimed commits - changed_files: 'internal/orgconfig/render.go' is not in the diff of the claimed commits - changed_files: 'internal/orgconfig/render_test.go' is not in the diff of the claimed commits - changed_files: 'internal/orgconfig/writer.go' is not in the diff of the claimed commits - changed_files: 'internal/orgconfig/writer_test.go' is not in the diff of the claimed commits - changed_files: 'internal/orgconfig/testdata/golden-anysync-spaces.json' is not in the diff of the claimed commits - changed_files: 'internal/spaces/spaces.go' is not in the diff of the claimed commits - changed_files: 'internal/spaces/spaces_test.go' is not in the diff of the claimed commits - changed_files: 'internal/spaces/store.go' is not in the diff of the claimed commits <details><summary>envelope</summary> ```json { "issue": 1520, "status": "success", "commits": [ "9bb44800a9fa0363cd3eaaa39ebf911013a0e2a4" ], "changed_files": [ "STATUS.md", "control-plane/cmd/control-plane/main.go", "internal/controlapi/descriptor_writer_integration_test.go", "internal/controlapi/spaces.go", "internal/controlapi/spaces_integration_test.go", "internal/orgconfig/render.go", "internal/orgconfig/render_test.go", "internal/orgconfig/writer.go", "internal/orgconfig/writer_test.go", "internal/orgconfig/testdata/golden-anysync-spaces.json", "internal/spaces/spaces.go", "internal/spaces/spaces_test.go", "internal/spaces/store.go" ], "tests": [ { "command": "nix develop .#go-ci --command go test ./internal/spaces/... ./internal/orgconfig/... ./internal/controlapi/...", "exit_code": 0 }, { "command": "nix develop .#go-ci --command go test ./control-plane/... ./internal/clan/...", "exit_code": 0 }, { "command": "nix develop .#go-ci --command bash -c 'gofmt -l ...; go vet ./...; go build ./...'", "exit_code": 0 } ], "criteria": { "One steward-API route accepts the three space IDs under the existing steward authentication (ADR 0199's key challenge)": "internal/controlapi/spaces.go POST /api/v1/idip/spaces gated on operatorAuthed/StewardResolver; TestSpacesDoor_RecordsThenWriterNamesThem", "With no IDs recorded, the control plane records them in the config repo beside the app record and the descriptor writer rewrites org-config": "internal/spaces store at idss/community-spaces.json (beside idss/community-app.json); orgconfig withSpaces + LiveProvider; TestSpacesDoor_RecordsThenWriterNamesThem asserts the served anysync names all three", "With IDs already recorded, the route answers a conflict naming the recorded set and writes nothing — first write wins": "internal/controlapi/spaces.go 409 SpacesConflict on existing.Complete(); TestSpacesDoor_FirstWriteWins", "A non-steward caller, or any other authentication, is refused": "operatorAuthed → 403 non-steward, 401 forged-header/no-session; TestSpacesDoor_RefusesNonStewardAndNoAuth", "No config-server admin token is ever exposed to a wallet by this route": "the door writes only the config-repo record; TestSpacesDoor_NoAdminTokenReachesTheWallet asserts no token in responses or logs", "Founding's own creation (T10) does not go through this route — it writes directly": "the store is the shared recording seam; TestSpacesDoor_TenDirectWriteBypassesTheRoute pins a direct Save reaching org-config through the writer" }, "summary": "Added the steward-API space-ID door (POST /api/v1/idip/spaces) that records the three any-sync space IDs once (first write wins) via a new internal/spaces store, with the descriptor writer naming them in org-config's anysync block.", "blockers": [] } ``` </details>

close-report for #1520 — status success

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

envelope
{
  "issue": 1520,
  "status": "success",
  "commits": [
    "9bb44800a9fa0363cd3eaaa39ebf911013a0e2a4"
  ],
  "changed_files": [
    "STATUS.md",
    "control-plane/cmd/control-plane/main.go",
    "internal/controlapi/descriptor_writer_integration_test.go",
    "internal/controlapi/spaces.go",
    "internal/controlapi/spaces_integration_test.go",
    "internal/orgconfig/render.go",
    "internal/orgconfig/render_test.go",
    "internal/orgconfig/writer.go",
    "internal/orgconfig/writer_test.go",
    "internal/orgconfig/testdata/golden-anysync-spaces.json",
    "internal/spaces/spaces.go",
    "internal/spaces/spaces_test.go",
    "internal/spaces/store.go"
  ],
  "tests": [
    {
      "command": "nix develop .#go-ci --command go test ./internal/spaces/... ./internal/orgconfig/... ./internal/controlapi/...",
      "exit_code": 0
    },
    {
      "command": "nix develop .#go-ci --command go test ./control-plane/... ./internal/clan/...",
      "exit_code": 0
    },
    {
      "command": "nix develop .#go-ci --command bash -c 'gofmt -l ...; go vet ./...; go build ./...'",
      "exit_code": 0
    }
  ],
  "criteria": {
    "One steward-API route accepts the three space IDs under the existing steward authentication (ADR 0199's key challenge)": "internal/controlapi/spaces.go POST /api/v1/idip/spaces gated on operatorAuthed/StewardResolver; TestSpacesDoor_RecordsThenWriterNamesThem",
    "With no IDs recorded, the control plane records them in the config repo beside the app record and the descriptor writer rewrites org-config": "internal/spaces store at idss/community-spaces.json (beside idss/community-app.json); orgconfig withSpaces + LiveProvider; TestSpacesDoor_RecordsThenWriterNamesThem asserts the served anysync names all three",
    "With IDs already recorded, the route answers a conflict naming the recorded set and writes nothing — first write wins": "internal/controlapi/spaces.go 409 SpacesConflict on existing.Complete(); TestSpacesDoor_FirstWriteWins",
    "A non-steward caller, or any other authentication, is refused": "operatorAuthed → 403 non-steward, 401 forged-header/no-session; TestSpacesDoor_RefusesNonStewardAndNoAuth",
    "No config-server admin token is ever exposed to a wallet by this route": "the door writes only the config-repo record; TestSpacesDoor_NoAdminTokenReachesTheWallet asserts no token in responses or logs",
    "Founding's own creation (T10) does not go through this route — it writes directly": "the store is the shared recording seam; TestSpacesDoor_TenDirectWriteBypassesTheRoute pins a direct Save reaching org-config through the writer"
  },
  "summary": "Added the steward-API space-ID door (POST /api/v1/idip/spaces) that records the three any-sync space IDs once (first write wins) via a new internal/spaces store, with the descriptor writer naming them in org-config's anysync block.",
  "blockers": []
}
**close-report** for #1520 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 1520, "status": "success", "commits": [ "9bb44800a9fa0363cd3eaaa39ebf911013a0e2a4" ], "changed_files": [ "STATUS.md", "control-plane/cmd/control-plane/main.go", "internal/controlapi/descriptor_writer_integration_test.go", "internal/controlapi/spaces.go", "internal/controlapi/spaces_integration_test.go", "internal/orgconfig/render.go", "internal/orgconfig/render_test.go", "internal/orgconfig/writer.go", "internal/orgconfig/writer_test.go", "internal/orgconfig/testdata/golden-anysync-spaces.json", "internal/spaces/spaces.go", "internal/spaces/spaces_test.go", "internal/spaces/store.go" ], "tests": [ { "command": "nix develop .#go-ci --command go test ./internal/spaces/... ./internal/orgconfig/... ./internal/controlapi/...", "exit_code": 0 }, { "command": "nix develop .#go-ci --command go test ./control-plane/... ./internal/clan/...", "exit_code": 0 }, { "command": "nix develop .#go-ci --command bash -c 'gofmt -l ...; go vet ./...; go build ./...'", "exit_code": 0 } ], "criteria": { "One steward-API route accepts the three space IDs under the existing steward authentication (ADR 0199's key challenge)": "internal/controlapi/spaces.go POST /api/v1/idip/spaces gated on operatorAuthed/StewardResolver; TestSpacesDoor_RecordsThenWriterNamesThem", "With no IDs recorded, the control plane records them in the config repo beside the app record and the descriptor writer rewrites org-config": "internal/spaces store at idss/community-spaces.json (beside idss/community-app.json); orgconfig withSpaces + LiveProvider; TestSpacesDoor_RecordsThenWriterNamesThem asserts the served anysync names all three", "With IDs already recorded, the route answers a conflict naming the recorded set and writes nothing — first write wins": "internal/controlapi/spaces.go 409 SpacesConflict on existing.Complete(); TestSpacesDoor_FirstWriteWins", "A non-steward caller, or any other authentication, is refused": "operatorAuthed → 403 non-steward, 401 forged-header/no-session; TestSpacesDoor_RefusesNonStewardAndNoAuth", "No config-server admin token is ever exposed to a wallet by this route": "the door writes only the config-repo record; TestSpacesDoor_NoAdminTokenReachesTheWallet asserts no token in responses or logs", "Founding's own creation (T10) does not go through this route — it writes directly": "the store is the shared recording seam; TestSpacesDoor_TenDirectWriteBypassesTheRoute pins a direct Save reaching org-config through the writer" }, "summary": "Added the steward-API space-ID door (POST /api/v1/idip/spaces) that records the three any-sync space IDs once (first write wins) via a new internal/spaces store, with the descriptor writer naming them in org-config's anysync block.", "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#1520
No description provided.