Skip to content

fix(data): remove duplicate node_id 243113 — one bad row disables the whole trusted-agents feed#32

Closed
pstayets wants to merge 1 commit into
pilot-protocol:mainfrom
pstayets:fix/dedupe-pilot-director-nodeid
Closed

fix(data): remove duplicate node_id 243113 — one bad row disables the whole trusted-agents feed#32
pstayets wants to merge 1 commit into
pilot-protocol:mainfrom
pstayets:fix/dedupe-pilot-director-nodeid

Conversation

@pstayets

@pstayets pstayets commented Jul 23, 2026

Copy link
Copy Markdown

What

pilot-mom and pilot-director are two entries in trusted-agents.json for the same node — identical address (0:0000.0003.B5A9) and identical node_id (243113). This removes the redundant pilot-director entry (7-line deletion, nothing else). Node 243113 stays trusted through the pilot-mom entry; no node_id is invented.

How the collision got here

pilot-director was already in the list. Commit #31 ("Add pilot-mom, node 243113") added pilot-mom reusing that same node_id — introducing the duplicate. Since both entries point to the same node, #31 was effectively renaming the planner to pilot-mom (the name the docs, the app roster, the MCP package, and the homepage demo all use) but left the old pilot-director alias behind. This PR completes #31 by removing that stale alias.

Why it matters (not cosmetic)

Load() treats a duplicate node_id as fatal for the entire list — it returns before committing the parsed roster (data.go):

if other, exists := idx[a.NodeID]; exists {
    return fmt.Errorf("duplicate node_id %d ... %q and %q", ...)  // aborts the whole load
}
...
byNode = idx ; all = doc.Agents   // never reached

So this single collision makes all 438 entries fail to load on every daemon, on every hourly refresh:

WARN trustedagents fetch failed err="load: duplicate node_id 243113 in
     trusted-agents list: \"pilot-mom\" and \"pilot-director\""

(observed live on a fresh v1.13.2 daemon joining the backbone)

Consequences today:

  • Field daemons (shipped v1.13.2, embedding the pre-Add pilot-mom (MOM) to the trusted-agents allowlist #31 snapshot that lacks pilot-mom) reject every refresh and stay frozen on that older embedded list — so pilot-mom / pilot-director are never trusted, and nothing added to the feed since is picked up.
  • A binary built from current main embeds this colliding list, so init() hits the same error and sets byNode to an empty map — booting with zero trusted agents. TestEmbeddedListLoads doesn't catch this: it only asserts byNode != nil, and the empty map is non-nil.

Verification

  • git diff = 7 deleted lines, only the pilot-director object + the preceding comma. No reformatting; trailing-newline state preserved.
  • JSON valid; 437 agents; zero duplicate node_ids; pilot-mom present with node_id 243113; node 243113 still in the list.
  • go test ./...ok (full suite).

Scope

Minimal data change only. The two entries are byte-identical on address and node_id, so they are provably the same node and removing the alias is the correct fix (there is no distinct second node to assign a new id to). A companion PR (loader hardening) makes Load() degrade gracefully so a future duplicate can't drop the whole feed again.

🤖 Generated with Claude Code

https://claude.ai/code/session_0142ryqVGEmJN66VZtCC7wFD

…lot-mom)

pilot-mom and pilot-director are published as two entries for ONE node:
identical address 0:0000.0003.B5A9, identical node_id 243113, and the same
"network planner" role. trustedagents.Load() rejects any list containing a
duplicate node_id, so this single collision makes the ENTIRE 438-entry feed
fail to load on every daemon.

pilot-director is the redundant alias (the canonical name pilot-mom is what
the docs, the app roster, the MCP package, and the homepage demo all use), so
this removes the pilot-director entry. Node 243113 stays trusted via the
pilot-mom entry; no node_id is invented.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0142ryqVGEmJN66VZtCC7wFD
@TeoSlayer

Copy link
Copy Markdown
Contributor

Superseded — the duplicate pilot-director row was already removed on main via #34. Closing.

@TeoSlayer TeoSlayer closed this Jul 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants