any-sync node pins (v0.13) are protocol-incompatible with matou-app's any-sync v0.11.9 client — every IDSS-founded community's app dies at launch with 'coordinator unreachable' (whakatohea-demo) #1813

Closed
opened 2026-09-24 04:30:52 +00:00 by ben · 3 comments
Owner

Symptom

Every app built for an IDSS-founded community dies on first launch at the landing page:

MatouBackend: backend start failed: Cannot connect to any-sync network:
coordinator unreachable: unable to connect

Seen 2026-09-23 by Ben on the whakatohea-demo Android build (COA build 1, matou-app v0.6.8, backend https://whakatohea-demo.idss.nz). The TCP ports 3001/3003/3005 on the gateway are open from the public internet; Coa's backend probe passed (it only TCP-connects), so the build was released.

Root cause — any-sync protocol version skew between the gateway's node images and the app's client library

Reproduced from a laptop with the v0.6.8 backend in production mode (MATOU_ENV=production MATOU_CONFIG_SERVER_URL=https://whakatohea-demo.idss.nz), with any-sync debug logging:

net.peerservice  dial  {"peerId": "12D3KooWFZvFjWkSJiE9KCF9YQMVww1dP7GALdF96RLBCo7Xo8oh", "addrs": ["whakatohea-demo.idss.nz:3001"]}
net.peerservice  can't connect to host  {"addr": "whakatohea-demo.idss.nz:3001", "error": "IncompatibleVersion"}

Control: the same binary against coa-shared (https://coa-infra.matou.nz/ngati-example, coordinator coa-infra.matou.nz:3004) → Validating network connectivity... OK.

Side any-sync lib handshake ProtoVersion accepts
matou-app client (every release v0.6.8 … main, backend/go.mod) v0.11.9 8 {8, 9}
matou-infrastructure / coa-shared (any-sync/.env: coordinator v0.8.0, node v0.10.1, filenode v0.10.0, consensusnode v0.5.0) v0.11.4 (coordinator) 8 {8, 9} — works
IDSS gateway (internal/clan/anysync.go digests, resolved 2026-09-16) = coordinator v0.13.0, node v0.13.1, filenode v0.13.0, consensusnode v0.13.0 v0.13.1 13 {12, 13, 14}

any-sync v0.13's net/secureservice/secureservice.go: defaultCompatibleVersions = []uint32{12, 13, 14} — "Bridge v9 is dropped now that v0.12 has shipped". v0.12.0 accepted {9, 12, 13}; neither accepts the 8 the app sends. So the coordinator rejects the handshake (handshake.ErrIncompatibleVersion), the pool turns it into net.ErrUnableToConnect, and app.go's Ping() reports "coordinator unreachable". The tree and file nodes will refuse identically.

Digest → tag mapping verified against ghcr.io (/v2/anyproto/<image>/manifests/<tag> Docker-Content-Digest): 488c96b9… = any-sync-coordinator v0.13.0, 91ca6c19… = any-sync-node v0.13.1, 229f1fc3… = any-sync-filenode v0.13.0, 39e747c6… = any-sync-consensusnode v0.13.0.

Fix (ruled by agent under ADR 0174 — veto anytime)

Pin the four node images to the versions the fleet is proven against — the ones matou-infrastructure runs for coa-shared and Matou prod: coordinator v0.8.0, node v0.10.1, filenode v0.10.0, consensusnode v0.5.0 (resolve their digests from ghcr.io the way the current pins were, keep the @sha256 discipline). Re-render + re-deploy whakatohea-demo's gateway; a fresh network (the existing v0.13 stores are not worth migrating — nothing has been written to them, the app never connected). Then the released whakatohea-demo APK/AppImage connect as-is, no rebuild.

Why not the other direction: bumping matou-app's any-sync to v0.13 is a fleet-wide protocol break (proto 12/13 = files v2, space header changes, new ACL) — it would need matou-infrastructure, coa-shared, Matou prod and every shipped app to move together. That is a separate, planned upgrade, not a bug fix. Note the two pin sets disagree today for no reason other than resolving :latest on 2026-09-16; the fleet should pin one set in one place (matou-infrastructure's .env is the source of truth for what the app is tested against).

Acceptance

  • internal/clan/anysync.go digests = the four fleet versions above; TestRenderAnySync_* updated.
  • Proof on a gateway: the v0.6.8 backend (go run ./cmd/server from matou-app at v0.6.8, env as above) prints Validating network connectivity... OK against the community's config server. Or simply: the released whakatohea-demo app reaches its dashboard.
  • Coa side (filed separately on Matou/coa): the backend prober's anysync-coordinator probe is TCP-only and cannot catch this class of skew.

Why human: none — two-way door (a pin, revertible), provable by the drive above.

## Symptom Every app built for an IDSS-founded community dies on first launch at the landing page: ``` MatouBackend: backend start failed: Cannot connect to any-sync network: coordinator unreachable: unable to connect ``` Seen 2026-09-23 by Ben on the `whakatohea-demo` Android build (COA build 1, matou-app v0.6.8, backend `https://whakatohea-demo.idss.nz`). The TCP ports 3001/3003/3005 on the gateway are open from the public internet; Coa's backend probe passed (it only TCP-connects), so the build was released. ## Root cause — any-sync **protocol version** skew between the gateway's node images and the app's client library Reproduced from a laptop with the v0.6.8 backend in production mode (`MATOU_ENV=production MATOU_CONFIG_SERVER_URL=https://whakatohea-demo.idss.nz`), with any-sync debug logging: ``` net.peerservice dial {"peerId": "12D3KooWFZvFjWkSJiE9KCF9YQMVww1dP7GALdF96RLBCo7Xo8oh", "addrs": ["whakatohea-demo.idss.nz:3001"]} net.peerservice can't connect to host {"addr": "whakatohea-demo.idss.nz:3001", "error": "IncompatibleVersion"} ``` Control: the same binary against coa-shared (`https://coa-infra.matou.nz/ngati-example`, coordinator `coa-infra.matou.nz:3004`) → `Validating network connectivity... OK`. | Side | any-sync lib | handshake `ProtoVersion` | accepts | |---|---|---|---| | matou-app client (every release v0.6.8 … main, `backend/go.mod`) | **v0.11.9** | 8 | {8, 9} | | matou-infrastructure / coa-shared (`any-sync/.env`: coordinator v0.8.0, node v0.10.1, filenode v0.10.0, consensusnode v0.5.0) | v0.11.4 (coordinator) | 8 | {8, 9} — works | | IDSS gateway (`internal/clan/anysync.go` digests, resolved 2026-09-16) = coordinator **v0.13.0**, node **v0.13.1**, filenode **v0.13.0**, consensusnode **v0.13.0** | v0.13.1 | 13 | **{12, 13, 14}** | any-sync v0.13's `net/secureservice/secureservice.go`: `defaultCompatibleVersions = []uint32{12, 13, 14}` — "Bridge v9 is dropped now that v0.12 has shipped". v0.12.0 accepted `{9, 12, 13}`; neither accepts the 8 the app sends. So the coordinator rejects the handshake (`handshake.ErrIncompatibleVersion`), the pool turns it into `net.ErrUnableToConnect`, and `app.go`'s `Ping()` reports "coordinator unreachable". The tree and file nodes will refuse identically. Digest → tag mapping verified against ghcr.io (`/v2/anyproto/<image>/manifests/<tag>` `Docker-Content-Digest`): `488c96b9…` = any-sync-coordinator v0.13.0, `91ca6c19…` = any-sync-node v0.13.1, `229f1fc3…` = any-sync-filenode v0.13.0, `39e747c6…` = any-sync-consensusnode v0.13.0. ## Fix (ruled by agent under ADR 0174 — veto anytime) Pin the four node images to the versions the fleet is proven against — the ones matou-infrastructure runs for coa-shared and Matou prod: **coordinator v0.8.0, node v0.10.1, filenode v0.10.0, consensusnode v0.5.0** (resolve their digests from ghcr.io the way the current pins were, keep the `@sha256` discipline). Re-render + re-deploy whakatohea-demo's gateway; a fresh network (the existing v0.13 stores are not worth migrating — nothing has been written to them, the app never connected). Then the released `whakatohea-demo` APK/AppImage connect as-is, no rebuild. Why not the other direction: bumping matou-app's any-sync to v0.13 is a fleet-wide protocol break (proto 12/13 = files v2, space header changes, new ACL) — it would need matou-infrastructure, coa-shared, Matou prod and every shipped app to move together. That is a separate, planned upgrade, not a bug fix. Note the two pin sets disagree today for no reason other than resolving `:latest` on 2026-09-16; the fleet should pin one set in one place (matou-infrastructure's `.env` is the source of truth for what the app is tested against). ## Acceptance - `internal/clan/anysync.go` digests = the four fleet versions above; `TestRenderAnySync_*` updated. - Proof on a gateway: the v0.6.8 backend (`go run ./cmd/server` from matou-app at `v0.6.8`, env as above) prints `Validating network connectivity... OK` against the community's config server. Or simply: the released whakatohea-demo app reaches its dashboard. - Coa side (filed separately on Matou/coa): the backend prober's `anysync-coordinator` probe is TCP-only and cannot catch this class of skew. ## Why human: none — two-way door (a pin, revertible), provable by the drive above.

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

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

close-report for #1813 — status success

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

envelope
{
  "issue": 1813,
  "status": "success",
  "commits": [
    "20a67772404dfa858b994a8597ab427a3a1ca1de"
  ],
  "changed_files": [
    "STATUS.md",
    "internal/clan/anysync.go",
    "internal/clan/anysync_test.go",
    "internal/controlapi/brandfiles_test.go"
  ],
  "tests": [
    {
      "command": "nix develop .#go-ci --command go test ./internal/clan/",
      "exit_code": 0
    },
    {
      "command": "nix develop .#go-ci --command golangci-lint run ./internal/controlapi/ ./internal/clan/",
      "exit_code": 0
    },
    {
      "command": "pre-push gate: nix develop .#go-ci build/vet/test/golangci-lint run ./... (server-side, on push)",
      "exit_code": 0
    }
  ],
  "criteria": {
    "internal/clan/anysync.go digests = the four fleet versions (coordinator v0.8.0, node v0.10.1, filenode v0.10.0, consensus v0.5.0)": "internal/clan/anysync.go: version consts + digest consts re-pinned to the manifest-list digests of those tags, resolved from ghcr.io/anyproto/* (method re-verified by reproducing all four current v0.13 pins exactly)",
    "TestRenderAnySync_* updated": "internal/clan/anysync_test.go: TestRenderAnySync_DigestsPinnedInOnePlace re-pinned to node 0.10.1 / coordinator 0.8.0 + a new assertion for filenode 0.10.0 / consensus 0.5.0; the digest-driven TestRenderAnySync_TheNodeSetAsPinnedContainers reads the consts so it tracks automatically. Whole internal/clan suite green (exit 0).",
    "Proof: the v0.6.8 backend prints 'Validating network connectivity... OK' / the released whakatohea-demo app reaches its dashboard": "Not runnable in the sandbox (no gateway, no matou-app v0.6.8 checkout, no lab infra). The fix is the digest re-pin proven correct offline: the resolution method exactly reproduces the current v0.13 pins, and the fleet versions are the ones matou-infrastructure runs for coa-shared/Matou prod that the proto-8 client (v0.11.9) is proven against. Live re-render + re-deploy of whakatohea-demo's gateway is a fleet-ops step for a human/session, noted in the ticket."
  },
  "summary": "Re-pinned the four any-sync node images to the fleet-proven versions (coordinator v0.8.0, node v0.10.1, filenode v0.10.0, consensus v0.5.0) so a proto-8 matou-app wallet completes the coordinator handshake instead of dying at 'coordinator unreachable'.",
  "blockers": []
}
**close-report** for #1813 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 1813, "status": "success", "commits": [ "20a67772404dfa858b994a8597ab427a3a1ca1de" ], "changed_files": [ "STATUS.md", "internal/clan/anysync.go", "internal/clan/anysync_test.go", "internal/controlapi/brandfiles_test.go" ], "tests": [ { "command": "nix develop .#go-ci --command go test ./internal/clan/", "exit_code": 0 }, { "command": "nix develop .#go-ci --command golangci-lint run ./internal/controlapi/ ./internal/clan/", "exit_code": 0 }, { "command": "pre-push gate: nix develop .#go-ci build/vet/test/golangci-lint run ./... (server-side, on push)", "exit_code": 0 } ], "criteria": { "internal/clan/anysync.go digests = the four fleet versions (coordinator v0.8.0, node v0.10.1, filenode v0.10.0, consensus v0.5.0)": "internal/clan/anysync.go: version consts + digest consts re-pinned to the manifest-list digests of those tags, resolved from ghcr.io/anyproto/* (method re-verified by reproducing all four current v0.13 pins exactly)", "TestRenderAnySync_* updated": "internal/clan/anysync_test.go: TestRenderAnySync_DigestsPinnedInOnePlace re-pinned to node 0.10.1 / coordinator 0.8.0 + a new assertion for filenode 0.10.0 / consensus 0.5.0; the digest-driven TestRenderAnySync_TheNodeSetAsPinnedContainers reads the consts so it tracks automatically. Whole internal/clan suite green (exit 0).", "Proof: the v0.6.8 backend prints 'Validating network connectivity... OK' / the released whakatohea-demo app reaches its dashboard": "Not runnable in the sandbox (no gateway, no matou-app v0.6.8 checkout, no lab infra). The fix is the digest re-pin proven correct offline: the resolution method exactly reproduces the current v0.13 pins, and the fleet versions are the ones matou-infrastructure runs for coa-shared/Matou prod that the proto-8 client (v0.11.9) is proven against. Live re-render + re-deploy of whakatohea-demo's gateway is a fleet-ops step for a human/session, noted in the ticket." }, "summary": "Re-pinned the four any-sync node images to the fleet-proven versions (coordinator v0.8.0, node v0.10.1, filenode v0.10.0, consensus v0.5.0) so a proto-8 matou-app wallet completes the coordinator handshake instead of dying at 'coordinator unreachable'.", "blockers": [] } ``` </details>
Author
Owner

Live proof 2026-09-24 (hand re-supply of whakatohea-demo, 134.199.167.181): the v0.6.8 app backend (any-sync client v0.11.9, proto 8) now prints Validating network connectivity... OK against whakatohea-demo.idss.nz:3001 and proceeds to storage/KERI init; before the switch the same binary got IncompatibleVersion. Coordinator runs any-sync-coordinator@sha256:43aa39ec… (v0.8.0); networkId and the three peerIds are unchanged, so the v0.13-written store was read fine by the older nodes — no wipe needed.

What it took, because the standing re-supply as scripted did NOT land it (filed separately as a follow-up):

  1. control-plane at 20a6777 landed at /srv/idss/bin/control-plane (staging + mv, restart).
  2. control-plane rerender-gateway gateway committed (06917cb) but re-renders only the gateway's OWN surface (gateway-guest.nix) — machines/gateway/anysync-stack.nix kept all five v0.13 digests. The machine name on a founded community is gateway, not the slug (rerender-gateway whakatohea-demo fails on the missing sidecar).
  3. Re-rendered anysync-stack.nix byte-exact with this commit's RenderAnySync(AnySyncConfig{Apex}) (a one-shot cmd/render-anysync), diffed against the box's copy — the four pins plus the #1807 descriptor-id block — committed as control-plane@idss (fa3bfbe).
  4. clan machines update gateway --flake git+file:///srv/idss/config --host-key-check none --build-host localhost, run as nix run …clan-core/archive/d098fa2e….tar.gz#clan-cli -- (the box has no dev shell — nix develop --command clan from rehearsal-standing-lib.sh errors "flake does not provide devShells"), with HOME=/root SOPS_AGE_KEY_FILE=/var/lib/sops-nix/key.txt (without it sops cannot decrypt gateway-age.key). The switch stopped/started the four podman-anysync units + confapply + descriptor and did NOT restart idss-control-plane.

Coa side: build 2 of whakatohea-demo on matou-app v0.7.3 is ready; the released APK/AppImage connect as-is.

**Live proof 2026-09-24 (hand re-supply of whakatohea-demo, 134.199.167.181):** the v0.6.8 app backend (any-sync client v0.11.9, proto 8) now prints `Validating network connectivity... OK` against `whakatohea-demo.idss.nz:3001` and proceeds to storage/KERI init; before the switch the same binary got `IncompatibleVersion`. Coordinator runs `any-sync-coordinator@sha256:43aa39ec…` (v0.8.0); networkId and the three peerIds are unchanged, so the v0.13-written store was read fine by the older nodes — no wipe needed. What it took, because the standing re-supply as scripted did NOT land it (filed separately as a follow-up): 1. control-plane at `20a6777` landed at `/srv/idss/bin/control-plane` (staging + mv, restart). 2. `control-plane rerender-gateway gateway` committed (`06917cb`) but re-renders only the gateway's OWN surface (`gateway-guest.nix`) — `machines/gateway/anysync-stack.nix` kept all five v0.13 digests. The machine name on a founded community is `gateway`, not the slug (`rerender-gateway whakatohea-demo` fails on the missing sidecar). 3. Re-rendered `anysync-stack.nix` byte-exact with this commit's `RenderAnySync(AnySyncConfig{Apex})` (a one-shot `cmd/render-anysync`), diffed against the box's copy — the four pins plus the #1807 descriptor-id block — committed as `control-plane@idss` (`fa3bfbe`). 4. `clan machines update gateway --flake git+file:///srv/idss/config --host-key-check none --build-host localhost`, run as `nix run …clan-core/archive/d098fa2e….tar.gz#clan-cli --` (the box has no dev shell — `nix develop --command clan` from `rehearsal-standing-lib.sh` errors "flake does not provide devShells"), with `HOME=/root SOPS_AGE_KEY_FILE=/var/lib/sops-nix/key.txt` (without it sops cannot decrypt `gateway-age.key`). The switch stopped/started the four podman-anysync units + confapply + descriptor and did NOT restart idss-control-plane. Coa side: build 2 of whakatohea-demo on matou-app v0.7.3 is `ready`; the released APK/AppImage connect as-is.
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.

Dependencies

No dependencies set.

Reference
Matou/idss#1813
No description provided.