mirror of
https://github.com/ruvnet/ruflo.git
synced 2026-09-14 14:01:28 +08:00
3cec3bf94a
Phase 8 (BEYOND-SOTA MOAT):
domain/federation-protocol.ts — 4 wire message types over ADR-104:
pr_artifact_request — peer asks for a PR over (graphId, queryNode)
with lastKnownGraphHash + lastKnownResultHash
for stale-detection
pr_artifact_response — peer ships a Phase 7 signed envelope back
pr_artifact_delta — sparse delta over a known base resultHash
pr_artifact_stale — graph changed; consumer must recompute
All Zod-validated, discriminated-union routable.
application/federation-server.ts — receives requests, rate-limits per
peer (default 60/min), computes via Phase 2-6 adapters + runPageRank,
seals via Phase 7 sealArtifact. Returns stale rejects when graphHash
mismatches or graphId unknown.
application/federation-client.ts — sends requests via FederationTransport;
verifies inbound envelopes against trusted-public-keys list; falls back
to local compute (origin: 'peer' / 'stale-fallback' /
'untrusted-fallback' / 'local-fallback') with reason.
inProcessTransport() helper stitches a client to a server for in-process
testing without spinning up real ADR-104 wiring.
104/104 tests passing (+6 for Phase 8):
- phase8-federation.test.ts: 6 (verifiable peer artifact, untrusted-key
fallback, stale graphHash, unknown graphId, rate limit per peer,
unreachable-peer local fallback)
All 8 phases of ADR-123 are now feature-complete. Plugin builds clean,
ships at 0.1.0-alpha.1 with 104 passing tests across the eleven wedges
(W1-W11) + Wedge 12 streaming + the beyond-SOTA Phase 7+8 federation
artifact pipeline.
Next: publish ruflo-graph-intelligence to npm, open + merge PR, create
announcement gist with intro/features/usages (practical to exotic).
Co-Authored-By: RuFlo <ruv@ruv.net>