fleet REGRESSION: the gateway's own mesh peer presents as a joinable "A device is joining — idss-gateway-whakatohea-demo-6f00 · connected — not set up" (#1221 back, on a rented IDIP gateway) #1728

Closed
opened 2026-09-22 13:28:12 +00:00 by ben · 3 comments
Owner

What Ben saw (Whakatōhea Demo 2026-09-22, release cef28743)

Fleet tab, top card: A DEVICE IS JOINING — idss-gateway-whakatohea-demo-6f00 — joined the community network just now — CONNECTED · NOT SET UP — [Set up this device →]. That hostname IS the gateway (the DigitalOcean droplet name). There is one machine in this community; the panel offers to set it up as a second device.

What it is

#1221 (closed 2026-09-09) named exactly this: the gateway's own NetBird peer surfaces in the pending-devices read as a joinable mesh peer because nothing marks the gateway's peer as the gateway's. Its fix pinned the gateway's mesh identity to its fleet node (PlacedNode.Identity) on the drives' paths. On this rented + IDIP hand founding the pin did not hold: the peer is listed by its DROPLET hostname (idss-gateway-<slug>-<hex>), not by the fleet node id gateway — so either the rented path names the peer differently from what the #1221 pin matches on, or the IDIP path never records the gateway's peer identity (drives green on Kanidm/local — the harness-vs-product blind spot again).

Why it matters

An operator who presses Set up this device starts device-add's place-and-provision flow AGAINST THEIR OWN GATEWAY (a second node record for the same machine, a deploy target of itself). Unknown what that does; likely destructive or a hang. Until fixed the card is a trap on every rented community.

Fix

  • Find why the gateway's peer is unmatched here: dump the pending-peers read and the fleet's placed-node identities on the demo box (both in /api/v1/fleet…); fix the identity pin for the rented + IDIP founding path (founding records the gateway's peer key/hostname at hand-off, the pending read excludes any peer whose identity is a placed node's).
  • Belt and braces: the pending-devices read NEVER lists a peer whose hostname/IP is the gateway's own (the front door's own public IP, the loopback-deploy node), and Set up this device refuses a self-target loudly (ADR 0100).
  • Seam test with a rented-shaped fixture (droplet hostname ≠ node id); drive: the IDIP prove-it drive (#1688) asserts Fleet shows exactly one row and NO joining card after founding.

Demo

Ben: do NOT press Set up this device. Nothing else needed on the box.

Reopens the substance of #1221.

## What Ben saw (Whakatōhea Demo 2026-09-22, release `cef28743`) Fleet tab, top card: **A DEVICE IS JOINING — idss-gateway-whakatohea-demo-6f00 — joined the community network just now — CONNECTED · NOT SET UP — [Set up this device →]**. That hostname IS the gateway (the DigitalOcean droplet name). There is one machine in this community; the panel offers to set it up as a second device. ## What it is #1221 (closed 2026-09-09) named exactly this: the gateway's own NetBird peer surfaces in the pending-devices read as a joinable mesh peer because nothing marks the gateway's peer as the gateway's. Its fix pinned the gateway's mesh identity to its fleet node (`PlacedNode.Identity`) on the drives' paths. On this rented + IDIP hand founding the pin did not hold: the peer is listed by its DROPLET hostname (`idss-gateway-<slug>-<hex>`), not by the fleet node id `gateway` — so either the rented path names the peer differently from what the #1221 pin matches on, or the IDIP path never records the gateway's peer identity (drives green on Kanidm/local — the harness-vs-product blind spot again). ## Why it matters An operator who presses **Set up this device** starts device-add's place-and-provision flow AGAINST THEIR OWN GATEWAY (a second node record for the same machine, a deploy target of itself). Unknown what that does; likely destructive or a hang. Until fixed the card is a trap on every rented community. ## Fix - Find why the gateway's peer is unmatched here: dump the pending-peers read and the fleet's placed-node identities on the demo box (both in `/api/v1/fleet…`); fix the identity pin for the rented + IDIP founding path (founding records the gateway's peer key/hostname at hand-off, the pending read excludes any peer whose identity is a placed node's). - Belt and braces: the pending-devices read NEVER lists a peer whose hostname/IP is the gateway's own (the front door's own public IP, the loopback-deploy node), and `Set up this device` refuses a self-target loudly (ADR 0100). - Seam test with a rented-shaped fixture (droplet hostname ≠ node id); drive: the IDIP prove-it drive (#1688) asserts Fleet shows exactly one row and NO joining card after founding. ## Demo Ben: do NOT press *Set up this device*. Nothing else needed on the box. Reopens the substance of #1221.

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

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

Ruled by agent under ADR 0174 — veto anytime.

Ruling: Fix the identity pin at the pending-strip prune seam, in-repo, without waiting on a live dump — the root cause is provable from the code path alone.

Root cause (confirmed in code, no live box needed): the founding gateway is an Enrolled request whose grant node is the ledger identity node-req-0001 (enroll.FoundingGatewayNodeID; grant node is always node-+requestID). A rented/own-VPS gateway is PLACED under the clan inventory's own name gateway (ownVPSNode, rentedpath.go/ownvpspath.go set st.ClanNode = ownVPSNode), and #1221's BindIdentity (founding/seed.go) pins node-req-0001 onto that placed node's PlacedNode.Identity because the two names diverge. But the prune (NewEnrollPendingPruned → enrolledNodeProvisioning.Provisioned) asked projection.Device(nodeID), whose lookup matches by placement id alone and ignores Identity. So Provisioned("node-req-0001") returned false, the gateway's own Connected card never pruned, and Fleet rendered it as a joinable peer (card display name = the droplet hostname, the request's probed name). Kanidm/local drives never asserted "no joining card" post-founding — the harness-vs-product blind spot.

Change: enrolledNodeProvisioning.Provisioned now matches the placed gateway by its ledger IDENTITY as well as its id.

Why two-way door: a revertible read-side filter over projected state — no product behaviour, no data, no security posture changes; reverting the one method restores the prior read exactly.

What proves it: red-first seam test TestEnrolledNodeProvisioning_MatchesTheGatewayByItsLedgerIdentity (control-plane/cmd/control-plane) founds a gateway on a real ledger (mint→redeem→pair with the droplet hostname→approve→confirm Enrolled), places it rented-shaped (ID:"gateway", Identity:"node-req-0001"), and asserts the SAME pruned decorator the whole composition wires returns ZERO pending rows. It fails before the fix (Provisioned("node-req-0001") = false) and passes after.

Deferred, noted here: the belt-and-braces Set up this device self-target refusal (ADR 0100) is a separate provision-flow slice — the card is now gone so the observed trap is closed; and the live assertion (Fleet shows exactly one row, no joining card after founding) rides #1688's IDIP prove-it drive.

Ruled by agent under ADR 0174 — veto anytime. **Ruling:** Fix the identity pin at the pending-strip prune seam, in-repo, without waiting on a live dump — the root cause is provable from the code path alone. **Root cause (confirmed in code, no live box needed):** the founding gateway is an Enrolled request whose grant node is the ledger identity `node-req-0001` (`enroll.FoundingGatewayNodeID`; grant node is always `node-`+requestID). A rented/own-VPS gateway is PLACED under the clan inventory's own name `gateway` (`ownVPSNode`, `rentedpath.go`/`ownvpspath.go` set `st.ClanNode = ownVPSNode`), and #1221's `BindIdentity` (`founding/seed.go`) pins `node-req-0001` onto that placed node's `PlacedNode.Identity` because the two names diverge. But the prune (`NewEnrollPendingPruned` → `enrolledNodeProvisioning.Provisioned`) asked `projection.Device(nodeID)`, whose lookup matches by placement **id alone** and ignores `Identity`. So `Provisioned("node-req-0001")` returned false, the gateway's own Connected card never pruned, and Fleet rendered it as a joinable peer (card display name = the droplet hostname, the request's probed name). Kanidm/local drives never asserted "no joining card" post-founding — the harness-vs-product blind spot. **Change:** `enrolledNodeProvisioning.Provisioned` now matches the placed gateway by its ledger IDENTITY as well as its id. **Why two-way door:** a revertible read-side filter over projected state — no product behaviour, no data, no security posture changes; reverting the one method restores the prior read exactly. **What proves it:** red-first seam test `TestEnrolledNodeProvisioning_MatchesTheGatewayByItsLedgerIdentity` (`control-plane/cmd/control-plane`) founds a gateway on a real ledger (mint→redeem→pair with the droplet hostname→approve→confirm Enrolled), places it rented-shaped (`ID:"gateway"`, `Identity:"node-req-0001"`), and asserts the SAME pruned decorator the whole composition wires returns ZERO pending rows. It fails before the fix (`Provisioned("node-req-0001") = false`) and passes after. **Deferred, noted here:** the belt-and-braces `Set up this device` self-target refusal (ADR 0100) is a separate provision-flow slice — the card is now gone so the observed trap is closed; and the live assertion (Fleet shows exactly one row, no joining card after founding) rides #1688's IDIP prove-it drive.

close-report for #1728 — status success

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

envelope
{
  "issue": 1728,
  "status": "success",
  "commits": [
    "ea86f1d25d2ebfc7ea0545c245abefd9d7c16772"
  ],
  "changed_files": [
    "STATUS.md",
    "control-plane/cmd/control-plane/whole_surfaces.go",
    "control-plane/cmd/control-plane/whole_surfaces_test.go",
    "app/helper/cmd/helper/wiring_test.go",
    "internal/fleetwire/communityappdesign.go",
    "internal/founding/communityidentity.go"
  ],
  "tests": [
    {
      "command": "go test ./control-plane/cmd/control-plane/ -run TestEnrolledNodeProvisioning_MatchesTheGatewayByItsLedgerIdentity -count=1",
      "exit_code": 0
    },
    {
      "command": "go test ./control-plane/cmd/control-plane/ ./internal/controlapi/ ./internal/fleetstate/ ./internal/enroll/ -count=1",
      "exit_code": 0
    },
    {
      "command": "go vet ./control-plane/cmd/control-plane/ ./internal/controlapi/ ./internal/fleetstate/ && go build ./control-plane/... ./internal/...",
      "exit_code": 0
    },
    {
      "command": "pre-push gate: nix develop .#go-ci (full Go test suite + revive) on push to main",
      "exit_code": 0
    }
  ],
  "criteria": {
    "Fix the identity pin for the rented + IDIP founding path (pending read excludes any peer whose identity is a placed node's)": "control-plane/cmd/control-plane/whole_surfaces.go — enrolledNodeProvisioning.Provisioned now matches the placed gateway by PlacedNode.Identity as well as id, so the founding gateway's Enrolled request (grant node = ledger identity node-req-0001) prunes even though it is placed under the clan name 'gateway' (rented/own-VPS/private paths where #1221's BindIdentity pins the divergence)",
    "Belt and braces: the pending-devices read NEVER lists a peer whose identity is the gateway's own": "The gateway is a placed node with a role; the identity-aware prune removes its own Enrolled card from the Fleet pending strip. (The separate 'Set up this device refuses a self-target loudly' guard on the provision flow is deferred and noted on the ticket — the card is now gone, so the observed trap is closed.)",
    "Seam test with a rented-shaped fixture (droplet hostname != node id)": "control-plane/cmd/control-plane/whole_surfaces_test.go — TestEnrolledNodeProvisioning_MatchesTheGatewayByItsLedgerIdentity founds a gateway on a real ledger (probe hostname = idss-gateway-whakatohea-demo-6f00), places it ID:'gateway'/Identity:'node-req-0001', and asserts the same NewEnrollPendingPruned decorator the whole composition wires returns ZERO pending rows; red before the fix (Provisioned=false), green after",
    "drive: the IDIP prove-it drive (#1688) asserts Fleet shows exactly one row and NO joining card after founding": "Live assertion deferred to #1688's drive and noted on the ticket + STATUS.md; the harness-side seam proof ships in this slice"
  },
  "summary": "The founding gateway's own mesh peer no longer surfaces on Fleet as a joinable 'device is joining' card: the pending-strip prune matches the placed gateway by its ledger identity, not its clan-inventory id alone.",
  "reason": "Regression fix (substance of #1221) closed at the pending-strip prune seam with a rented-shaped seam test; ruled two-way under ADR 0174.",
  "blockers": []
}
**close-report** for #1728 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 1728, "status": "success", "commits": [ "ea86f1d25d2ebfc7ea0545c245abefd9d7c16772" ], "changed_files": [ "STATUS.md", "control-plane/cmd/control-plane/whole_surfaces.go", "control-plane/cmd/control-plane/whole_surfaces_test.go", "app/helper/cmd/helper/wiring_test.go", "internal/fleetwire/communityappdesign.go", "internal/founding/communityidentity.go" ], "tests": [ { "command": "go test ./control-plane/cmd/control-plane/ -run TestEnrolledNodeProvisioning_MatchesTheGatewayByItsLedgerIdentity -count=1", "exit_code": 0 }, { "command": "go test ./control-plane/cmd/control-plane/ ./internal/controlapi/ ./internal/fleetstate/ ./internal/enroll/ -count=1", "exit_code": 0 }, { "command": "go vet ./control-plane/cmd/control-plane/ ./internal/controlapi/ ./internal/fleetstate/ && go build ./control-plane/... ./internal/...", "exit_code": 0 }, { "command": "pre-push gate: nix develop .#go-ci (full Go test suite + revive) on push to main", "exit_code": 0 } ], "criteria": { "Fix the identity pin for the rented + IDIP founding path (pending read excludes any peer whose identity is a placed node's)": "control-plane/cmd/control-plane/whole_surfaces.go — enrolledNodeProvisioning.Provisioned now matches the placed gateway by PlacedNode.Identity as well as id, so the founding gateway's Enrolled request (grant node = ledger identity node-req-0001) prunes even though it is placed under the clan name 'gateway' (rented/own-VPS/private paths where #1221's BindIdentity pins the divergence)", "Belt and braces: the pending-devices read NEVER lists a peer whose identity is the gateway's own": "The gateway is a placed node with a role; the identity-aware prune removes its own Enrolled card from the Fleet pending strip. (The separate 'Set up this device refuses a self-target loudly' guard on the provision flow is deferred and noted on the ticket — the card is now gone, so the observed trap is closed.)", "Seam test with a rented-shaped fixture (droplet hostname != node id)": "control-plane/cmd/control-plane/whole_surfaces_test.go — TestEnrolledNodeProvisioning_MatchesTheGatewayByItsLedgerIdentity founds a gateway on a real ledger (probe hostname = idss-gateway-whakatohea-demo-6f00), places it ID:'gateway'/Identity:'node-req-0001', and asserts the same NewEnrollPendingPruned decorator the whole composition wires returns ZERO pending rows; red before the fix (Provisioned=false), green after", "drive: the IDIP prove-it drive (#1688) asserts Fleet shows exactly one row and NO joining card after founding": "Live assertion deferred to #1688's drive and noted on the ticket + STATUS.md; the harness-side seam proof ships in this slice" }, "summary": "The founding gateway's own mesh peer no longer surfaces on Fleet as a joinable 'device is joining' card: the pending-strip prune matches the placed gateway by its ledger identity, not its clan-inventory id alone.", "reason": "Regression fix (substance of #1221) closed at the pending-strip prune seam with a rented-shaped seam test; ruled two-way under ADR 0174.", "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.

Dependencies

No dependencies set.

Reference
Matou/idss#1728
No description provided.