Skip to content

P6: federation retirement, discovery retarget, token-minting UX #51

Description

@Mearman

Parent: #45
Blocked by: P5 above

Retire federation.ts (638 lines) in favour of wire-mesh's own relay hub + capability tokens; what's genuinely lost and needs deliberate replacement: the pre-declared trust allowlist, Room.federated as a glanceable control, and the mesh_fed_trust out-of-band pinning UX. Retarget discovery (keep all three files — discovery.cddl, mDNS, Tailscale — they're complementary, not redundant). Implement RevocationCheck, which ships nowhere in wire-mesh today.


Done (2026-09-16, PR #143): the pauseAllAdvertisements/resumeAllAdvertisements bug is fixed. DiscoveryManager used to discard the real AdvertiseOptions a caller passed to advertise() when pausing (replacing them with an inert placeholder), and resuming only cleared the paused-bookkeeping entry without ever calling backend.startAdvertising again — so toggling mesh visibility from quiet/dark back to discoverable silently left the mesh unadvertised on every backend, with getVisibility() reporting "discoverable" the whole time. DiscoveryManager now keeps the real opts and genuinely re-advertises on resume; the caller-visible advertisement id is minted by DiscoveryManager itself and stays stable across a pause/resume cycle regardless of whether a backend's own internal id changes. New regression tests cover pause/resume for both the global and per-adapter cases.

Still open in #51: retiring federation.ts itself (the trust allowlist / Room.federated / mesh_fed_trust replacement work) and implementing RevocationCheck in wire-mesh, both genuinely multi-day design-and-implementation efforts, not yet started.


Correction (2026-09-16): the "Implement RevocationCheck" item is already done, on both sides. Checked directly against origin/main in both repos (not assumed from memory): wire-mesh's RevocationCheck interface and RevocationView/createRevocationView implementation (ts/packages/core/src/domain/tokens.ts, revocation-view.ts) have shipped for some time -- extensively exercised by this session's own earlier work (agent-comms#48's kick/leave/decline revocation, wire-mesh's own #84 delegable-revoke-authority). agent-comms already consumes it end-to-end: bridge-mesh.ts constructs a real RevocationView via createRevocationView(), mesh-store-shared.ts types it as a required identity field, delivery-engine.ts handles and records incoming gossiped revocation-announce entries, and room-lifecycle.ts mints and records real revocation entries on kick/leave/decline. Nothing left to build here.

Still genuinely open: retiring federation.ts itself (the trust allowlist / Room.federated / mesh_fed_trust replacement UX in favour of wire-mesh's own relay hub + capability tokens) -- a real, substantial migration, not yet started.


Done (2026-09-16, PR #144): federation.ts fully retired. Investigated whether the cross-machine connectivity problem it solved for itself was already solved generically by the wire-mesh substrate migration, and it was: connectToRemote/acceptConnection/rejectConnection (already wired through WireMeshTransport, already human-approval-gated) connect to a peer on any host, matching everything federation.ts's own TLS link layer existed to provide. Room.federated, the trust allowlist, and the mesh_fed_trust pinning UX have no replacement -- this was a full retirement, not a swap. Any two meshes that connect via connectToRemote now become one shared mesh, consistent with agent_upsert/room_upsert already being confirmed genuinely mesh-wide by design (see #48's closing correction), not events needing a federation-scoped audience. Removed: FederationManager, FederationBridge, Room.federated, the nine mesh_fed_* tool actions, and the fed_* MeshMessage wire-protocol variants (674 lines of dead parallel transport plus its own integration points, net -2173 lines across 25 files). Marked as a breaking change (public FederationManager/FedLink/FedCallbacks exports and nine tool actions removed).

#51 is closed. Every item this issue tracked -- the pauseAllAdvertisements/resumeAllAdvertisements bug (#143), the stale "Implement RevocationCheck" claim (already shipped and consumed, corrected above), and federation.ts's own retirement (#144) -- is done.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions