mirror of
https://github.com/ruvnet/ruflo.git
synced 2026-11-25 14:43:05 +09:00
Implements Component C of ADR-101: extends FederationMessageType with
two new members for cross-node claims operations.
- 'claim-event': gossip a ClaimDomainEvent across the federation.
Steady-state propagation; NOT in CONSENSUS_REQUIRED_TYPES because
requiring quorum on every claim mutation would deadlock.
- 'agent-handoff': cross-trust-boundary transfer of claim ownership.
Added to CONSENSUS_REQUIRED_TYPES so high-trust deployments can
optionally require validator quorum on every handoff. The new ADR-101
receiver-side handler in routing-service is the consumer.
Files touched:
- src/domain/entities/federation-envelope.ts: enum + consensus set
- __tests__/unit/federation-envelope.test.ts: bumped expected counts
(15→17 message types, 3→4 consensus-required)
- __tests__/unit/federation-envelope-claims.test.ts (new, 7 tests):
accepts both new types, claim-event NOT consensus-required,
agent-handoff IS consensus-required, signable payload includes
new types, no accidental removal of pre-ADR-101 entries.
Validation across both packages:
- federation: 373/373 tests pass (+7 new this phase)
- claims: 203/203 tests pass (Phase 1 + Phase 2 still green)
- tsc --noEmit clean in both
- tsup build clean in both
Closes Phase 3 of #1775. The receiver-side handler in routing-service
and the send-side hook in ClaimService.requestHandoff are intentionally
deferred to a follow-up commit alongside the e2e attestation test —
keeping this commit focused on the envelope-type contract that everything
else builds on.
Co-Authored-By: RuFlo <ruv@ruv.net>