Skip to content

Conversation

@daveey
Copy link
Contributor

@daveey daveey commented Jan 3, 2026

Refactor Activation Handlers and AOE Filters

This PR refactors the activation handler system and AOE effect filtering to use enums instead of string comparisons for better type safety and performance. Key changes include:

  1. Replace string-based target types with TargetType enum (Actor, Target, ActorCommons, TargetCommons)
  2. Replace string-based filter and mutation types with proper enums
  3. Replace members_only and ignore_members AOE flags with proper filter configurations
  4. Add helper functions for common filter and mutation patterns
  5. Fix activation handler to return true when filters pass with no mutations
  6. Add commons inventory tracking to replay logs
  7. Update gear station to use the new handler system

These changes improve code maintainability and make it easier to create complex filter conditions for both AOE effects and activation handlers.

Copy link
Contributor Author

daveey commented Jan 3, 2026

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@daveey daveey changed the title cp refactor: replace string-based activation filters with enum-based system Jan 3, 2026
@datadog-official

This comment has been minimized.

@openhands-ai
Copy link

openhands-ai bot commented Jan 3, 2026

Looks like there are a few issues preventing this PR from being merged!

  • GitHub Actions are failing:
    • Test and Benchmark

If you'd like me to help, just leave a comment, like

@OpenHands please fix the failing actions on PR #4592 at branch `daveey-activation-cleanup`

Feel free to include any additional details that might help me get this PR into a better state.

You can manage your notification settings

daveey added 2 commits January 4, 2026 15:05
This ensures no-op handlers (like keep_gear) block subsequent handlers.
Previously, handlers with empty mutations would return false even when
all filters passed, allowing subsequent handlers to execute.
@daveey daveey force-pushed the daveey-activation-cleanup branch from 4f8ee02 to c7fc591 Compare January 4, 2026 23:05
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.

2 participants