feat(federation): add latent Mixture of Roles composition contract - #3126
Draft
ruvnet wants to merge 5 commits into
Draft
feat(federation): add latent Mixture of Roles composition contract#3126ruvnet wants to merge 5 commits into
ruvnet wants to merge 5 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements the reusable latent role composition contract tracked in #3125.
The federation plugin now supports deterministic top K role selection from caller supplied logits, numerically stable normalized weights, explicit steering vector references, strict malformed input rejection, and an explicit fallback when hidden state access is unavailable. The result carries no execution authority.
Unit tests cover fallback behavior, normalization, additive logit shift invariance, deterministic ties, very large finite logits, duplicate identities, invalid top K, and non finite scores. An ADR and reproduction protocol compare this path against single agent and the existing textual mixture of agents.
This PR is draft. It does not train role vectors or integrate a model backend. Do not merge until the published result is independently reproduced and steering artifacts are provenance and digest bound.