Skip to content

Implement MigrationState (hysteresis / cooldowns) #67

@rebelmachina

Description

@rebelmachina

Epic: #64 (AffinityEngine)
Depends on: #65 (crate scaffold)

What

Implement MigrationState in crates/arcane-affinity/src/hysteresis.rs:

  • Per-entity cooldown tracking via HashMap<Uuid, u32>
  • Methods: new(), record_migration(), is_on_cooldown(), tick(), remove_entity(), cooldown_count()
  • tick() decrements all cooldowns by 1, removes entries at 0

Acceptance criteria

  • All methods implemented
  • Unit tests for: new state empty, record sets cooldown, is_on_cooldown works, tick decrements, expiry at exactly cooldown_ticks, remove_entity clears

Spec

See arcane-engine repo: in_08_03_hysteresis.md

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions