descriptor: the anysync block never appears — the install materialises client-anysync.json and NOTHING reads it; the writer looks for the block in an identity record nobody updates #1681

Closed
opened 2026-09-21 04:29:01 +00:00 by ben · 3 comments
Owner

What the live gateway does (rehearsal drive 20260921T034145Z, ce1a72a3 — the first CLEAN any-sync install on a real gateway)

A steward pressed Design your community app once, nothing repaired by hand: all seven any-sync units came up, the record went pending with one full submission at the (fake) Coa, the fake flipped and the record went ready, the descriptor gained its app block within one reconcile, and the sign-in page switched to its app-door QR face. All good.

But the descriptor served from outside still has no anysync block, and the writer says so every 30 s:

org-config written to the config server slug=e2e-drive admins=1 app=true anysync=false spaces=false

Why

anysync-descriptor.service does its job — it writes /var/lib/anysync/etc/client-anysync.json (clan.AnysyncDescriptorPath): the minted networkId and the three public nodes at <apex>:3001/3003/3005, the shape matou-app's loader reads. Nothing reads that file. grep -rn AnysyncDescriptorPath finds only the render. The descriptor writer takes the block from the community identity record instead (internal/orgconfig/writer.go: Anysync: id.Anysync), and nothing sets id.Anysync when any-sync installs — not the design act, not founding's tail.

So a wallet pairing with this community is told there is no any-sync network: it can never create or join the community's spaces, and the space-ID door's recorded IDs can never appear (withSpaces is a no-op without an anysync block). The third "later slice" in this lane with no owner (#1638 identity, #1653 trust list, this).

What to build

  • The descriptor writer sources the anysync block from the materialised file (the control plane runs on the same gateway; mind the file's 0750 root dir vs the control plane's user), OR the install path records it into the identity record once anysync-descriptor has run — one source, read at reconcile time so an install needs no restart. Absent → the block stays omitted, as today.
  • Fail loud: if any-sync is installed (the units exist) and the block cannot be read, the writer logs it at WARN by name, not anysync=false at INFO forever.
  • Recorded space IDs merge in as already built (withSpaces).

Acceptance

  • Seam: with a materialised client block and no identity Anysync, the rendered descriptor carries anysync{networkId, nodes[3]}; with recorded spaces, the three IDs beside them; without the file, no block.
  • Live (next IDIP drive with the fake Coa): after Design your community app, the descriptor read from OUTSIDE carries the block; after the headless wallet records spaces, the three IDs appear in it.
  • The golden descriptor documents (internal/orgconfig/testdata/golden-anysync*.json) match what the materialise step really writes — copy a real one from this drive's evidence rather than the hand-written shape.

Blocks #1522. Found by Ben's session on the fake-Coa prototype.

## What the live gateway does (rehearsal drive `20260921T034145Z`, `ce1a72a3` — the first CLEAN any-sync install on a real gateway) A steward pressed **Design your community app** once, nothing repaired by hand: all seven any-sync units came up, the record went `pending` with one full submission at the (fake) Coa, the fake flipped and the record went `ready`, the descriptor gained its `app` block within one reconcile, and the sign-in page switched to its app-door QR face. All good. But the descriptor served from outside still has **no `anysync` block**, and the writer says so every 30 s: ``` org-config written to the config server slug=e2e-drive admins=1 app=true anysync=false spaces=false ``` ## Why `anysync-descriptor.service` does its job — it writes `/var/lib/anysync/etc/client-anysync.json` (`clan.AnysyncDescriptorPath`): the minted `networkId` and the three public nodes at `<apex>:3001/3003/3005`, the shape matou-app's loader reads. **Nothing reads that file.** `grep -rn AnysyncDescriptorPath` finds only the render. The descriptor writer takes the block from the community identity record instead (`internal/orgconfig/writer.go`: `Anysync: id.Anysync`), and nothing sets `id.Anysync` when any-sync installs — not the design act, not founding's tail. So a wallet pairing with this community is told there is no any-sync network: it can never create or join the community's spaces, and the space-ID door's recorded IDs can never appear (`withSpaces` is a no-op without an `anysync` block). The third "later slice" in this lane with no owner (#1638 identity, #1653 trust list, this). ## What to build - The descriptor writer sources the `anysync` block from the materialised file (the control plane runs on the same gateway; mind the file's 0750 root dir vs the control plane's user), OR the install path records it into the identity record once `anysync-descriptor` has run — one source, read at reconcile time so an install needs no restart. Absent → the block stays omitted, as today. - Fail loud: if any-sync is installed (the units exist) and the block cannot be read, the writer logs it at WARN by name, not `anysync=false` at INFO forever. - Recorded space IDs merge in as already built (`withSpaces`). ## Acceptance - Seam: with a materialised client block and no identity `Anysync`, the rendered descriptor carries `anysync{networkId, nodes[3]}`; with recorded spaces, the three IDs beside them; without the file, no block. - Live (next IDIP drive with the fake Coa): after Design your community app, the descriptor read from OUTSIDE carries the block; after the headless wallet records spaces, the three IDs appear in it. - The golden descriptor documents (`internal/orgconfig/testdata/golden-anysync*.json`) match what the materialise step really writes — copy a real one from this drive's evidence rather than the hand-written shape. Blocks #1522. Found by Ben's session on the fake-Coa prototype.

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

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

close-report for #1681 — status success

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

  • commit 51e548bf 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/orgconfig/anysync.go' is not in the diff of the claimed commits
  • changed_files: 'internal/orgconfig/anysync_test.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/testdata/golden-anysync-spaces.json' is not in the diff of the claimed commits
  • changed_files: 'internal/orgconfig/testdata/golden-anysync.json' is not in the diff of the claimed commits
  • changed_files: 'internal/orgconfig/testdata/golden-app-ready.json' is not in the diff of the claimed commits
  • changed_files: 'internal/orgconfig/writer.go' is not in the diff of the claimed commits
envelope
{
  "issue": 1681,
  "status": "success",
  "commits": [
    "51e548bf"
  ],
  "changed_files": [
    "STATUS.md",
    "control-plane/cmd/control-plane/main.go",
    "internal/orgconfig/anysync.go",
    "internal/orgconfig/anysync_test.go",
    "internal/orgconfig/render_test.go",
    "internal/orgconfig/testdata/golden-anysync-spaces.json",
    "internal/orgconfig/testdata/golden-anysync.json",
    "internal/orgconfig/testdata/golden-app-ready.json",
    "internal/orgconfig/writer.go"
  ],
  "tests": [
    {
      "command": "go build ./...",
      "exit_code": 0
    },
    {
      "command": "go test ./internal/orgconfig/... ./internal/controlapi/...",
      "exit_code": 0
    },
    {
      "command": "go vet ./internal/orgconfig/... ./control-plane/cmd/control-plane/",
      "exit_code": 0
    },
    {
      "command": "gofmt -l internal/orgconfig/",
      "exit_code": 0
    }
  ],
  "criteria": {
    "Seam: with a materialised client block and no identity Anysync, the rendered descriptor carries anysync{networkId, nodes[3]}; with recorded spaces, the three IDs beside them; without the file, no block": "internal/orgconfig/anysync_test.go TestWriter_AnysyncFromMaterialisedFile (real FileAnysyncReader over a temp materialised file: block served with networkId+nodes[3]; spaces store complete -> three IDs merged; no file -> no block) + TestFileAnysyncReader_InstalledUnreadableNotInstalled",
    "Fail loud: if any-sync is installed (the units exist) and the block cannot be read, the writer logs it at WARN by name, not anysync=false at INFO forever": "internal/orgconfig/writer.go LiveProvider.anysyncBlock logs WARN naming the file (never fatal); FileAnysyncReader treats the runtime dir's existence as installed; TestWriter_AnysyncFailsLoudWhenInstalledButUnreadable captures the WARN + asserts the descriptor still writes without the block",
    "Recorded space IDs merge in as already built (withSpaces)": "internal/orgconfig/render.go withSpaces unchanged; TestWriter_AnysyncFromMaterialisedFile asserts communitySpaceId/readOnlySpaceId/adminSpaceId merge beside the nodes",
    "The golden descriptor documents match what the materialise step really writes": "internal/orgconfig/testdata/golden-anysync*.json regenerated to camelCase networkId/peerId and three nodes (<apex>:3001/3003/3005), byte-for-byte the shape internal/clan renderAnysyncDescriptor emits; render_test.go goldenAnysync fixture updated to match; TestGolden_Documents green"
  },
  "summary": "The descriptor writer sources the anysync block from the materialised client-anysync.json (via a new FileAnysyncReader) instead of an identity record nothing sets, failing loud when installed-but-unreadable and merging recorded spaces.",
  "reason": "",
  "blockers": [],
  "no_code_change": ""
}
**close-report** for #1681 — status `success` :no_entry: **close-report gates REFUSED this close** — the following claims did not verify: - commit 51e548bf 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/orgconfig/anysync.go' is not in the diff of the claimed commits - changed_files: 'internal/orgconfig/anysync_test.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/testdata/golden-anysync-spaces.json' is not in the diff of the claimed commits - changed_files: 'internal/orgconfig/testdata/golden-anysync.json' is not in the diff of the claimed commits - changed_files: 'internal/orgconfig/testdata/golden-app-ready.json' is not in the diff of the claimed commits - changed_files: 'internal/orgconfig/writer.go' is not in the diff of the claimed commits <details><summary>envelope</summary> ```json { "issue": 1681, "status": "success", "commits": [ "51e548bf" ], "changed_files": [ "STATUS.md", "control-plane/cmd/control-plane/main.go", "internal/orgconfig/anysync.go", "internal/orgconfig/anysync_test.go", "internal/orgconfig/render_test.go", "internal/orgconfig/testdata/golden-anysync-spaces.json", "internal/orgconfig/testdata/golden-anysync.json", "internal/orgconfig/testdata/golden-app-ready.json", "internal/orgconfig/writer.go" ], "tests": [ { "command": "go build ./...", "exit_code": 0 }, { "command": "go test ./internal/orgconfig/... ./internal/controlapi/...", "exit_code": 0 }, { "command": "go vet ./internal/orgconfig/... ./control-plane/cmd/control-plane/", "exit_code": 0 }, { "command": "gofmt -l internal/orgconfig/", "exit_code": 0 } ], "criteria": { "Seam: with a materialised client block and no identity Anysync, the rendered descriptor carries anysync{networkId, nodes[3]}; with recorded spaces, the three IDs beside them; without the file, no block": "internal/orgconfig/anysync_test.go TestWriter_AnysyncFromMaterialisedFile (real FileAnysyncReader over a temp materialised file: block served with networkId+nodes[3]; spaces store complete -> three IDs merged; no file -> no block) + TestFileAnysyncReader_InstalledUnreadableNotInstalled", "Fail loud: if any-sync is installed (the units exist) and the block cannot be read, the writer logs it at WARN by name, not anysync=false at INFO forever": "internal/orgconfig/writer.go LiveProvider.anysyncBlock logs WARN naming the file (never fatal); FileAnysyncReader treats the runtime dir's existence as installed; TestWriter_AnysyncFailsLoudWhenInstalledButUnreadable captures the WARN + asserts the descriptor still writes without the block", "Recorded space IDs merge in as already built (withSpaces)": "internal/orgconfig/render.go withSpaces unchanged; TestWriter_AnysyncFromMaterialisedFile asserts communitySpaceId/readOnlySpaceId/adminSpaceId merge beside the nodes", "The golden descriptor documents match what the materialise step really writes": "internal/orgconfig/testdata/golden-anysync*.json regenerated to camelCase networkId/peerId and three nodes (<apex>:3001/3003/3005), byte-for-byte the shape internal/clan renderAnysyncDescriptor emits; render_test.go goldenAnysync fixture updated to match; TestGolden_Documents green" }, "summary": "The descriptor writer sources the anysync block from the materialised client-anysync.json (via a new FileAnysyncReader) instead of an identity record nothing sets, failing loud when installed-but-unreadable and merging recorded spaces.", "reason": "", "blockers": [], "no_code_change": "" } ``` </details>

close-report for #1681 — status success

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

envelope
{
  "issue": 1681,
  "status": "success",
  "commits": [
    "51e548bf"
  ],
  "changed_files": [
    "STATUS.md",
    "control-plane/cmd/control-plane/main.go",
    "internal/orgconfig/anysync.go",
    "internal/orgconfig/anysync_test.go",
    "internal/orgconfig/render_test.go",
    "internal/orgconfig/testdata/golden-anysync-spaces.json",
    "internal/orgconfig/testdata/golden-anysync.json",
    "internal/orgconfig/testdata/golden-app-ready.json",
    "internal/orgconfig/writer.go"
  ],
  "tests": [
    {
      "command": "go build ./...",
      "exit_code": 0
    },
    {
      "command": "go test ./internal/orgconfig/... ./internal/controlapi/...",
      "exit_code": 0
    },
    {
      "command": "go vet ./internal/orgconfig/... ./control-plane/cmd/control-plane/",
      "exit_code": 0
    },
    {
      "command": "gofmt -l internal/orgconfig/",
      "exit_code": 0
    }
  ],
  "criteria": {
    "Seam: with a materialised client block and no identity Anysync, the rendered descriptor carries anysync{networkId, nodes[3]}; with recorded spaces, the three IDs beside them; without the file, no block": "internal/orgconfig/anysync_test.go TestWriter_AnysyncFromMaterialisedFile (real FileAnysyncReader over a temp materialised file: block served with networkId+nodes[3]; spaces store complete -> three IDs merged; no file -> no block) + TestFileAnysyncReader_InstalledUnreadableNotInstalled",
    "Fail loud: if any-sync is installed (the units exist) and the block cannot be read, the writer logs it at WARN by name, not anysync=false at INFO forever": "internal/orgconfig/writer.go LiveProvider.anysyncBlock logs WARN naming the file (never fatal); FileAnysyncReader treats the runtime dir's existence as installed; TestWriter_AnysyncFailsLoudWhenInstalledButUnreadable captures the WARN + asserts the descriptor still writes without the block",
    "Recorded space IDs merge in as already built (withSpaces)": "internal/orgconfig/render.go withSpaces unchanged; TestWriter_AnysyncFromMaterialisedFile asserts communitySpaceId/readOnlySpaceId/adminSpaceId merge beside the nodes",
    "The golden descriptor documents match what the materialise step really writes": "internal/orgconfig/testdata/golden-anysync*.json regenerated to camelCase networkId/peerId and three nodes (<apex>:3001/3003/3005), byte-for-byte the shape internal/clan renderAnysyncDescriptor emits; render_test.go goldenAnysync fixture updated to match; TestGolden_Documents green"
  },
  "summary": "The descriptor writer sources the anysync block from the materialised client-anysync.json (via a new FileAnysyncReader) instead of an identity record nothing sets, failing loud when installed-but-unreadable and merging recorded spaces.",
  "reason": "",
  "blockers": [],
  "no_code_change": ""
}
**close-report** for #1681 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 1681, "status": "success", "commits": [ "51e548bf" ], "changed_files": [ "STATUS.md", "control-plane/cmd/control-plane/main.go", "internal/orgconfig/anysync.go", "internal/orgconfig/anysync_test.go", "internal/orgconfig/render_test.go", "internal/orgconfig/testdata/golden-anysync-spaces.json", "internal/orgconfig/testdata/golden-anysync.json", "internal/orgconfig/testdata/golden-app-ready.json", "internal/orgconfig/writer.go" ], "tests": [ { "command": "go build ./...", "exit_code": 0 }, { "command": "go test ./internal/orgconfig/... ./internal/controlapi/...", "exit_code": 0 }, { "command": "go vet ./internal/orgconfig/... ./control-plane/cmd/control-plane/", "exit_code": 0 }, { "command": "gofmt -l internal/orgconfig/", "exit_code": 0 } ], "criteria": { "Seam: with a materialised client block and no identity Anysync, the rendered descriptor carries anysync{networkId, nodes[3]}; with recorded spaces, the three IDs beside them; without the file, no block": "internal/orgconfig/anysync_test.go TestWriter_AnysyncFromMaterialisedFile (real FileAnysyncReader over a temp materialised file: block served with networkId+nodes[3]; spaces store complete -> three IDs merged; no file -> no block) + TestFileAnysyncReader_InstalledUnreadableNotInstalled", "Fail loud: if any-sync is installed (the units exist) and the block cannot be read, the writer logs it at WARN by name, not anysync=false at INFO forever": "internal/orgconfig/writer.go LiveProvider.anysyncBlock logs WARN naming the file (never fatal); FileAnysyncReader treats the runtime dir's existence as installed; TestWriter_AnysyncFailsLoudWhenInstalledButUnreadable captures the WARN + asserts the descriptor still writes without the block", "Recorded space IDs merge in as already built (withSpaces)": "internal/orgconfig/render.go withSpaces unchanged; TestWriter_AnysyncFromMaterialisedFile asserts communitySpaceId/readOnlySpaceId/adminSpaceId merge beside the nodes", "The golden descriptor documents match what the materialise step really writes": "internal/orgconfig/testdata/golden-anysync*.json regenerated to camelCase networkId/peerId and three nodes (<apex>:3001/3003/3005), byte-for-byte the shape internal/clan renderAnysyncDescriptor emits; render_test.go goldenAnysync fixture updated to match; TestGolden_Documents green" }, "summary": "The descriptor writer sources the anysync block from the materialised client-anysync.json (via a new FileAnysyncReader) instead of an identity record nothing sets, failing loud when installed-but-unreadable and merging recorded spaces.", "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#1681
No description provided.