pairing T9: any-sync on the gateway — the content layer the community's app needs, installed when the operator chooses the app #1518

Closed
opened 2026-09-16 03:14:15 +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 13 of the spec. Research: #1314 §2.3 (why containers, not a source build).

What to build

The community's app keeps its shared content — notices, events, chat, projects — in any-sync spaces the
community hosts itself. Choosing the app at founding installs that layer on the gateway; choosing later
installs nothing, and the Coa-first branch never installs it at all (those communities keep Mātou's).

Acceptance criteria

  • Choosing Option 1 renders the any-sync set on the gateway: coordinator, tree node, consensus node and
    file node with their stores, as OCI containers under podman with pinned digests (the archive-port
    precedent), a single-member Mongo replica set, and object storage for file bytes
  • The network and node keys are minted by a clan-vars generator; regenerating re-mints the network
    (the witness-salt precedent), and the keys appear in no rendered config or log
  • Its three public TCP ports are declared with the mail-port precedent, on the gateway only
  • The stores are their own declared dataset (ADR 0080) with a dump-and-copy backup step; the
    identity dataset's window is unchanged
  • Once the coordinator answers, the descriptor's anysync block names the gateway's nodes (through
    the writer, T2)
  • Choosing later renders no any-sync unit and the descriptor carries no anysync key
  • The Coa-first branch never renders it (ADR 0238)
  • Renders are deterministic; the container digests are pinned in one place and can be replaced by
    source-built units behind the same unit names

Blocked by

Tracker: #1511, #1513

  • T2 (the writer serves the block), T4 (the draft records the choice)

Task manifest

task: anysync-on-the-gateway
seam: internal/clan render tests + the deploy's own probe
depends_on: [pairing:descriptor-writer, pairing:s3a-wallet-choice-and-s3a-app]
out_of_scope: [the spaces themselves, the app's content behaviour, install-later from the dashboard]
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 13 of the spec. Research: **#1314** §2.3 (why containers, not a source build). ## What to build The community's app keeps its shared content — notices, events, chat, projects — in any-sync spaces the community hosts itself. Choosing the app at founding installs that layer on the gateway; choosing later installs nothing, and the Coa-first branch never installs it at all (those communities keep Mātou's). ## Acceptance criteria - [ ] Choosing Option 1 renders the any-sync set on the gateway: coordinator, tree node, consensus node and file node with their stores, as **OCI containers under podman with pinned digests** (the archive-port precedent), a single-member Mongo replica set, and object storage for file bytes - [ ] The network and node keys are minted by a clan-vars generator; regenerating re-mints the network (the witness-salt precedent), and the keys appear in no rendered config or log - [ ] Its three public TCP ports are declared with the mail-port precedent, on the gateway only - [ ] The stores are their **own declared dataset** (ADR 0080) with a dump-and-copy backup step; the identity dataset's window is unchanged - [ ] Once the coordinator answers, the descriptor's `anysync` block names the gateway's nodes (through the writer, T2) - [ ] Choosing later renders no any-sync unit and the descriptor carries no `anysync` key - [ ] The Coa-first branch never renders it (ADR 0238) - [ ] Renders are deterministic; the container digests are pinned in one place and can be replaced by source-built units behind the same unit names ## Blocked by Tracker: #1511, #1513 - T2 (the writer serves the block), T4 (the draft records the choice) ## Task manifest ```yaml task: anysync-on-the-gateway seam: internal/clan render tests + the deploy's own probe depends_on: [pairing:descriptor-writer, pairing:s3a-wallet-choice-and-s3a-app] out_of_scope: [the spaces themselves, the app's content behaviour, install-later from the dashboard] needs_human_decision: [] ```

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

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

close-report for #1518 — status success

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

envelope
{
  "issue": 1518,
  "status": "success",
  "commits": [
    "21b60e2a210de3dd0f949e99669ea185af717baa"
  ],
  "changed_files": [
    "STATUS.md",
    "internal/anysync/backup.go",
    "internal/anysync/backup_test.go",
    "internal/clan/anysync.go",
    "internal/clan/anysync_test.go",
    "internal/clan/clan.go",
    "internal/clan/enrollment.go",
    "internal/clan/gateway_attach.go",
    "internal/clan/seedleg_idip_test.go",
    "internal/founding/ownvpspath.go",
    "internal/founding/privatepath.go",
    "internal/founding/selfhostedpath.go"
  ],
  "tests": [
    {
      "command": "go test ./internal/anysync/ ./internal/clan/ ./internal/founding/ ./internal/keria/",
      "exit_code": 0
    },
    {
      "command": "go vet ./internal/anysync/ ./internal/clan/ ./internal/founding/",
      "exit_code": 0
    },
    {
      "command": "go build ./control-plane/...",
      "exit_code": 0
    },
    {
      "command": "gofmt -l (touched files)",
      "exit_code": 0
    }
  ],
  "criteria": {
    "Choosing Option 1 renders the any-sync set (coordinator, tree, consensus, file + stores) as OCI containers under podman with pinned digests, a single-member Mongo replica set, and object storage for file bytes": "internal/clan/anysync.go renderAnysyncNodes/renderAnysyncStores — four distinct podman node containers + mongo(--replSet rs0)+rs.initiate reconciler + minio bucket; all images pinned by @sha256 digest (the digest consts). TestRenderAnySync_TheNodeSetAsPinnedContainers asserts the containers, the digests, no :latest, the replica set and the object store.",
    "The network and node keys are minted by a clan-vars generator; regenerating re-mints the network (witness-salt precedent); keys appear in no rendered config or log": "renderAnysyncNetworkKeys — clan.core.vars.generators.anysync-network runs source-built anyconf create-network + generate-nodes, one fixed sealed file {bundle}. TestRenderAnySync_NetworkKeysAreAClanVarGeneratorNeverInTheRender asserts the generator, anyconf, the fixed file-set pin (regenerate = new network) and that no signingKey/networkSigningKey/password is a rendered attr.",
    "Its three public TCP ports are declared with the mail-port precedent, on the gateway only": "renderAnysyncFirewall — networking.firewall.allowedTCPPorts = [ 3001 3003 3005 ] on the public interface; consensus (3006) opens none. TestRenderAnySync_ThreePublicTCPPortsOnTheGateway.",
    "The stores are their own declared dataset (ADR 0080) with a dump-and-copy backup step; the identity dataset's window is unchanged": "renderAnysyncDataset tmpfiles all stores under /var/lib/anysync; internal/anysync/backup.go declares Dataset() 'content' + BackupContract dump-and-copy (mongodump + cp -a) quiescing ONLY the four any-sync node units. TestRenderAnySync_StoresAreTheirOwnDeclaredDataset + internal/anysync TestSnapshot_QuiesceWindowStopsOnlyTheAnysyncNodes (never touches keria units) + internal/keria tests still green (identity window untouched).",
    "Once the coordinator answers, the descriptor's anysync block names the gateway's nodes (through the writer, T2)": "renderAnysyncDescriptor — anysync-descriptor reconciler, after podman-anysync-coordinator, materialises the client block (networkId + the three public nodes at <apex>:<port>) to AnysyncDescriptorPath; the descriptor writer (#1511, dep) serves Identity.Anysync. TestRenderAnySync_DescriptorMaterialiserNamesTheNodes.",
    "Choosing later renders no any-sync unit and the descriptor carries no anysync key": "GatewayFacts.AnySync=false (choseAppNow false for AppLater) => writeGatewayIdentityModules writes no module => baseMachineModules imports none. TestSeedLeg_ConfigurationImportsIdentityModulesOnlyWhenPresent asserts the IDIP-without-app path writes/imports no anysync-stack.nix.",
    "The Coa-first branch never renders it (ADR 0238)": "The Coa-first branch never walks S3a-APP, so d.App carries no AppNow choice => choseAppNow false => AnySync false. choseAppNow doc + the 'later' seam test cover the same exclusion path.",
    "Renders are deterministic; the container digests are pinned in one place and can be replaced by source-built units behind the same unit names": "RenderAnySync is pure string building (TestRenderAnySync_Deterministic double-renders and byte-compares). Digests pinned in one const block; TestRenderAnySync_DigestsPinnedInOnePlace + TestRenderAnySync_SourceBuiltToolsForTheKeys (anyconf built from source, no placeholder hash) — the source-built binaries sit behind the same unit names."
  },
  "summary": "Rendered the any-sync content layer on the gateway (four nodes + stores as pinned-digest podman containers, clan-vars-minted network keys, three public TCP ports, its own dump-and-copy dataset, a descriptor materialiser), gated on the founder choosing the community app at founding.",
  "reason": "",
  "blockers": [],
  "no_code_change": ""
}
**close-report** for #1518 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 1518, "status": "success", "commits": [ "21b60e2a210de3dd0f949e99669ea185af717baa" ], "changed_files": [ "STATUS.md", "internal/anysync/backup.go", "internal/anysync/backup_test.go", "internal/clan/anysync.go", "internal/clan/anysync_test.go", "internal/clan/clan.go", "internal/clan/enrollment.go", "internal/clan/gateway_attach.go", "internal/clan/seedleg_idip_test.go", "internal/founding/ownvpspath.go", "internal/founding/privatepath.go", "internal/founding/selfhostedpath.go" ], "tests": [ { "command": "go test ./internal/anysync/ ./internal/clan/ ./internal/founding/ ./internal/keria/", "exit_code": 0 }, { "command": "go vet ./internal/anysync/ ./internal/clan/ ./internal/founding/", "exit_code": 0 }, { "command": "go build ./control-plane/...", "exit_code": 0 }, { "command": "gofmt -l (touched files)", "exit_code": 0 } ], "criteria": { "Choosing Option 1 renders the any-sync set (coordinator, tree, consensus, file + stores) as OCI containers under podman with pinned digests, a single-member Mongo replica set, and object storage for file bytes": "internal/clan/anysync.go renderAnysyncNodes/renderAnysyncStores — four distinct podman node containers + mongo(--replSet rs0)+rs.initiate reconciler + minio bucket; all images pinned by @sha256 digest (the digest consts). TestRenderAnySync_TheNodeSetAsPinnedContainers asserts the containers, the digests, no :latest, the replica set and the object store.", "The network and node keys are minted by a clan-vars generator; regenerating re-mints the network (witness-salt precedent); keys appear in no rendered config or log": "renderAnysyncNetworkKeys — clan.core.vars.generators.anysync-network runs source-built anyconf create-network + generate-nodes, one fixed sealed file {bundle}. TestRenderAnySync_NetworkKeysAreAClanVarGeneratorNeverInTheRender asserts the generator, anyconf, the fixed file-set pin (regenerate = new network) and that no signingKey/networkSigningKey/password is a rendered attr.", "Its three public TCP ports are declared with the mail-port precedent, on the gateway only": "renderAnysyncFirewall — networking.firewall.allowedTCPPorts = [ 3001 3003 3005 ] on the public interface; consensus (3006) opens none. TestRenderAnySync_ThreePublicTCPPortsOnTheGateway.", "The stores are their own declared dataset (ADR 0080) with a dump-and-copy backup step; the identity dataset's window is unchanged": "renderAnysyncDataset tmpfiles all stores under /var/lib/anysync; internal/anysync/backup.go declares Dataset() 'content' + BackupContract dump-and-copy (mongodump + cp -a) quiescing ONLY the four any-sync node units. TestRenderAnySync_StoresAreTheirOwnDeclaredDataset + internal/anysync TestSnapshot_QuiesceWindowStopsOnlyTheAnysyncNodes (never touches keria units) + internal/keria tests still green (identity window untouched).", "Once the coordinator answers, the descriptor's anysync block names the gateway's nodes (through the writer, T2)": "renderAnysyncDescriptor — anysync-descriptor reconciler, after podman-anysync-coordinator, materialises the client block (networkId + the three public nodes at <apex>:<port>) to AnysyncDescriptorPath; the descriptor writer (#1511, dep) serves Identity.Anysync. TestRenderAnySync_DescriptorMaterialiserNamesTheNodes.", "Choosing later renders no any-sync unit and the descriptor carries no anysync key": "GatewayFacts.AnySync=false (choseAppNow false for AppLater) => writeGatewayIdentityModules writes no module => baseMachineModules imports none. TestSeedLeg_ConfigurationImportsIdentityModulesOnlyWhenPresent asserts the IDIP-without-app path writes/imports no anysync-stack.nix.", "The Coa-first branch never renders it (ADR 0238)": "The Coa-first branch never walks S3a-APP, so d.App carries no AppNow choice => choseAppNow false => AnySync false. choseAppNow doc + the 'later' seam test cover the same exclusion path.", "Renders are deterministic; the container digests are pinned in one place and can be replaced by source-built units behind the same unit names": "RenderAnySync is pure string building (TestRenderAnySync_Deterministic double-renders and byte-compares). Digests pinned in one const block; TestRenderAnySync_DigestsPinnedInOnePlace + TestRenderAnySync_SourceBuiltToolsForTheKeys (anyconf built from source, no placeholder hash) — the source-built binaries sit behind the same unit names." }, "summary": "Rendered the any-sync content layer on the gateway (four nodes + stores as pinned-digest podman containers, clan-vars-minted network keys, three public TCP ports, its own dump-and-copy dataset, a descriptor materialiser), gated on the founder choosing the community app at founding.", "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#1518
No description provided.