Skip to content

feat: FQAN routing, entity_url exposure, and gossip signature fix#20

Open
AtmegaBuzz wants to merge 7 commits into
mainfrom
development
Open

feat: FQAN routing, entity_url exposure, and gossip signature fix#20
AtmegaBuzz wants to merge 7 commits into
mainfrom
development

Conversation

@AtmegaBuzz
Copy link
Copy Markdown
Member

Summary

  • FQAN DNS-style routing: POST /v1/search with fqan field now forwards to the authoritative registry if the FQAN host ≠ this registry — no gossip lookup, direct remote resolution
  • Clean public URL fields: service_endpoint removed from all API responses; url (public entity URL) added to search results; entity_url now always visible in entity list/get
  • FQAN + developer_handle in entity responses: GET /v1/entities, GET /v1/entities/{id}, and GET /v1/entities/{id}/card now include fqan and developer_handle when a ZNS name is bound
  • Gossip signature fix: Cross-version signature failures (invalid signature: <nil>) caused by old-code peers signing with deprecated agent_id/agent_url JSON field names. Fix: re-announce all local entities to every newly connected peer so the gossip index is immediately
    populated with correctly-signed announcements after a node upgrade
  • Search robustness: Filter-only queries accepted, total_found honest, exact-match bonus, score clamped to [0,1]

Breaking changes

Field Change
service_endpoint in search results Removed — use url
service_endpoint in entity responses Removed — use entity_url

Test plan

  • POST /v1/search with fqan: "dns01.zynd.ai/alice/url-to-text" from zns01 resolves via remote forward
  • GET /v1/entities/{id} returns entity_url, fqan, developer_handle when bound
  • GET /v1/entities/{id}/card includes fqan field
  • After deploying to zns01, federated text search on dns01 returns zns01 entities (gossip index populated on reconnect)
  • Search score stays in [0, 1]; exact-match queries return top result first

…n signature failures

Old-code registries sign gossip with deprecated JSON field names (agent_id,
agent_url). New-code peers can't reproduce the original signed bytes during
verification, so all cross-version announcements fail with 'invalid signature'.

Add Transport.SetPeerConnectCallback and Transport.BroadcastToPeer so each
registry re-broadcasts its full entity list to every newly connected peer.
After a node is updated and reconnects, its entities are immediately pushed
with correct signatures that the peer can verify.

Also log the first 120 bytes of the verification payload on signature failure
to make future cross-version mismatches diagnosable from logs.
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.

1 participant