Skip to content

feat(#114): ClusterManager party_assignments + set_party_assignments()#116

Open
rebelmachina wants to merge 1 commit intomainfrom
feat/demo-group-behaviour
Open

feat(#114): ClusterManager party_assignments + set_party_assignments()#116
rebelmachina wants to merge 1 commit intomainfrom
feat/demo-group-behaviour

Conversation

@rebelmachina
Copy link
Copy Markdown
Contributor

Part of epic #112. Closes #114.

Summary

  • Add party_assignments: HashMap<Uuid, Uuid> to ClusterManager (empty by default — zero behaviour change for existing code)
  • Add set_party_assignments() method
  • Populate party_id from the map when building PlayerInfo in run_evaluation_cycle()
  • Test D: two entities sharing a party UUID have matching party_id in WorldStateView; unregistered entity has None

Backwards compatibility

All existing tests pass unchanged. party_assignments defaults to empty so all existing run_evaluation_cycle behaviour is identical.

Test plan

cargo test -p arcane-infra --test cluster_manager_tests

4 tests pass (3 existing + Test D).

Add party_assignments: HashMap<Uuid, Uuid> field (entity_id → party_id)
defaulting to empty — no behaviour change for existing callers.

Add set_party_assignments() to register group memberships from outside
(e.g. arcane-clustering-sim at startup).

Populate party_id from party_assignments when building PlayerInfo in
run_evaluation_cycle(), wiring group signals into AffinityEngine Phase 1b.

Test D: verify two entities sharing a party UUID appear with matching
party_id in WorldStateView.players; unregistered entity has party_id = None.

Closes #114. Part of epic #112.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.

ClusterManager: party_assignments field + set_party_assignments()

1 participant