Skip to content

#6501 Prune connections map on game teardown - #6548

Merged
matthewevans merged 1 commit into
phase-rs:mainfrom
boskodev790:fix/prune-connections-map-740b
Aug 1, 2026
Merged

#6501 Prune connections map on game teardown#6548
matthewevans merged 1 commit into
phase-rs:mainfrom
boskodev790:fix/prune-connections-map-740b

Conversation

@boskodev790

@boskodev790 boskodev790 commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes #6501: the in-memory connections map (crates/phase-server/src/main.rs) was inserted into on every host / join / reconnect but a game_code entry was never removed, unlike the parallel game_spectators map which is pruned at the same teardown points. This leaks one connections entry per finished game.

Root cause

connections: HashMap<String /*game_code*/, HashMap<PlayerId, Sender>> grows without bound: every completed or expired game leaves a permanent game_code -> {seat -> dead Sender} entry. MAX_GAMES bounds only concurrent live sessions, not this map, so a long-running server accumulates one dead entry per game played.

Fix

Mirror the existing game_spectators cleanup — connections.remove(game_code) in both background-reaper teardown loops:

  • disconnect grace-expiry loop (already holds the connections lock; changed let connslet mut conns and remove after the GameOver fan-out),
  • lobby-expiry loop (added a connections prune block).

Lock order is preserved throughout (state -> connections -> spectators). No behavior change beyond releasing the dead entry.

Files changed

  • crates/phase-server/src/main.rs+14 / -1.

Verification

  • cargo fmt --all — clean.
  • cargo check -p phase-server — clean (compiles, borrow-checks). The change sits inside async websocket teardown paths that are not unit-testable in isolation; correctness follows from mirroring the adjacent, already-established game_spectators cleanup and preserving lock order.

Summary by CodeRabbit

  • Bug Fixes
    • Improved background cleanup for completed and expired games.
    • Prevented stale connection data from accumulating after games are removed.
    • Enhanced resource management for both full-mode and lobby games.

@superagent-security superagent-security Bot added the contributor:flagged Contributor flagged for review by trust analysis. label Jul 23, 2026
@superagent-security

Copy link
Copy Markdown

🚨 Contributor flagged. Click here for more info: Superagent Dashboard

@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Important

Review skipped

Too many files!

This PR contains 860 files, which is 560 over the limit of 300.

To get a review, narrow the scope:
• coderabbit review --committed # exclude uncommitted changes
• coderabbit review --dir # limit to a subdirectory
• coderabbit review --base # compare against a closer base

Usage-priced reviews support at most 300 files.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 23f2098f-3a72-4be5-801b-02e54ec1b226

📥 Commits

Reviewing files that changed from the base of the PR and between fc68538 and 7e6226a.

⛔ Files ignored due to path filters (155)
  • Cargo.lock is excluded by !**/*.lock
  • client/pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
  • client/public/changelog-meta.json is excluded by !client/public/changelog*.json
  • client/public/changelog.json is excluded by !client/public/changelog*.json
  • client/src-tauri/Cargo.lock is excluded by !**/*.lock
  • client/src-tauri/gen/schemas/acl-manifests.json is excluded by !**/gen/**
  • client/src-tauri/gen/schemas/capabilities.json is excluded by !**/gen/**
  • client/src-tauri/gen/schemas/desktop-schema.json is excluded by !**/gen/**
  • client/src-tauri/gen/schemas/macOS-schema.json is excluded by !**/gen/**
  • client/src/adapter/generated/interaction/index.ts is excluded by !**/generated/**
  • client/src/wasm/engine_wasm.d.ts is excluded by !client/src/wasm/**, !**/*.d.ts
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__aangs_journey_ir.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__abraxas_named_equip_ir.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__abraxas_named_equip_lowered.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__aerial_formation_ir.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__aetherling_ir.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__ahn_crop_champion_ir.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__ahn_crop_champion_lowered.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__analyze_the_pollen_ir.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__armor_of_thorns_ir.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__armor_of_thorns_lowered.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__arni_brokenbrow_ir.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__arni_brokenbrow_lowered.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__baneslayer_angel_ir.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__barbarian_class_ir.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__barbarian_class_lowered.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__barbarian_ring_activated_ir.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__barbarian_ring_activated_lowered.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__bard_class_ir.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__bard_class_lowered.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__batterskull_ir.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__birds_of_paradise_ir.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__blunt_the_assault_ir.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__blunt_the_assault_lowered.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__bomat_courier_ir.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__bomat_courier_lowered.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__bone_splinters_ir.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__bonecrusher_giant_ir.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__boseiju_who_endures_ir.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__brazen_borrower_ir.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__browbeat_ir.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__bumper_cars_ir.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__bumper_cars_lowered.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__carbonize_ir.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__case_of_the_crimson_pulse_ir.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__case_of_the_stashed_skeleton_ir.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__case_of_the_stashed_skeleton_lowered.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__caustic_bronco_ir.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__chalice_of_the_void_ir.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__champions_victory_ir.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__chandra_nalaar_minus_x_loyalty_ir.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__chandra_nalaar_minus_x_loyalty_lowered.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__changeling_outcast_ir.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__combat_celebrant_ir.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__combat_celebrant_lowered.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__component_pouch_activated_ir.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__component_pouch_activated_lowered.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__conclave_mentor_ir.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__conformer_shuriken_ir.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__dark_confidant_ir.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__deadly_rollick_ir.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__diagnostic_snapshots__diagnostic_ignored_remainder.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__dismember_ir.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__edgewall_innkeeper_ir.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__eidolon_of_the_great_revel_ir.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__entropic_battlecruiser_ir.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__entropic_battlecruiser_lowered.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__evils_thrall_ir.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__experiment_one_ir.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__fevered_visions_ir.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__fevered_visions_lowered.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__figure_of_destiny_ir.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__fog_ir.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__fog_lowered.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__follow_the_lumarets_ir.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__ghost_lit_stalker_ir.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__ghost_lit_stalker_lowered.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__goblin_guide_ir.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__govern_the_guildless_ir.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__govern_the_guildless_lowered.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__guul_draz_assassin_ir.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__guul_draz_assassin_lowered.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__history_of_benalia_ir.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__history_of_benalia_lowered.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__incinerate_ir.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__innkeepers_talent_ir.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__innkeepers_talent_lowered.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__jace_the_mind_sculptor_ir.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__jade_mage_ir.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__jaws_of_defeat_ir.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__joraga_treespeaker_ir.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__joraga_treespeaker_lowered.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__kabira_vindicator_ir.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__kabira_vindicator_lowered.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__karn_legacy_reforged_ir.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__kathril_aspect_warper_ir.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__kathril_aspect_warper_lowered.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__kroxa_titan_ir.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__leonin_arbiter_ir.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__lighthouse_chronologist_ir.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__lighthouse_chronologist_lowered.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__liliana_of_the_veil_ir.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__liliana_the_repentant_ir.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__liliana_the_repentant_lowered.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__llanowar_elves_ir.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__lumen_class_frigate_ir.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__lumen_class_frigate_lowered.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__luminarch_aspirant_ir.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__manamorphose_ir.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__mishra_eminent_one_ir.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__monastery_swiftspear_ir.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__mother_of_runes_ir.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__murderous_rider_ir.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__nashi_moon_sages_scion_ir.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__nashi_moon_sages_scion_lowered.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__odric_lunarch_marshal_ir.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__questing_beast_ir.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__reckless_bushwhacker_ir.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__repeat_offender_ir.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__serra_angel_ir.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__short_sword_ir.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__slippery_bogle_ir.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__smugglers_copter_ir.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__snapcaster_mage_ir.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__sorcerer_class_ir.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__sorcerer_class_lowered.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__stoneforge_mystic_ir.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__student_of_warfare_ir.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__swords_to_plowshares_ir.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__sylvan_library_ir.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__sylvan_safekeeper_ir.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__temporal_delayed_trigger@full_throttle_temporal_ir.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__temporal_delayed_trigger@full_throttle_temporal_lowered.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__temporal_delayed_trigger@galvanic_iteration_temporal_ir.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__temporal_delayed_trigger@galvanic_iteration_temporal_lowered.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__temporal_delayed_trigger@pact_of_negation_temporal_ir.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__temporal_delayed_trigger@pact_of_negation_temporal_lowered.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__thalia_guardian_of_thraben_ir.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__the_fourth_doctor_ir.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__the_fourth_doctor_lowered.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__themberchaud_ir.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__themberchaud_lowered.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__thespians_stage_generic_activated_ir.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__thespians_stage_generic_activated_lowered.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__tireless_tracker_ir.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__touch_of_the_void_ir.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__village_rites_ir.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__vines_of_vastwood_ir.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__walking_ballista_ir.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__wizard_class_two_layer_ir.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__wizard_class_two_layer_lowered.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__wolfir_silverheart_ir.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/src/parser/oracle_ir/snapshots/engine__parser__oracle_ir__snapshot_tests__young_pyromancer_ir.snap is excluded by !**/*.snap, !**/snapshots/**
  • crates/engine/tests/fixtures/cr733/authority_matrix.json.gz is excluded by !**/*.gz
  • lobby-worker/broker-wasm/Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (860)
  • .claude/agents/engine-implementation-executor.md
  • .claude/agents/pr-review-comment-resolver.md
  • .claude/skills/add-engine-effect/SKILL.md
  • .claude/skills/add-engine-variant/SKILL.md
  • .claude/skills/add-frontend-component/SKILL.md
  • .claude/skills/add-interactive-effect/SKILL.md
  • .claude/skills/add-keyword/SKILL.md
  • .claude/skills/add-replacement-effect/SKILL.md
  • .claude/skills/add-static-ability/SKILL.md
  • .claude/skills/add-trigger/SKILL.md
  • .claude/skills/batch-mechanics/SKILL.md
  • .claude/skills/oracle-parser/SKILL.md
  • .claude/skills/parser-velocity/SKILL.md
  • .claude/skills/pr-contribution-handler/SKILL.md
  • .claude/skills/pr-review-loop/SKILL.md
  • .claude/skills/project-reference/SKILL.md
  • .claude/skills/unlock-set/SKILL.md
  • .claude/workflows/contribute-card.js
  • .claude/workflows/deck-contribute.js
  • .githooks/pre-commit
  • .githooks/pre-push
  • .github/PULL_REQUEST_TEMPLATE.md
  • .github/actions/mtgjson-cache-key/action.yml
  • .github/workflows/ai-gate.yml
  • .github/workflows/cache-janitor.yml
  • .github/workflows/ci.yml
  • .github/workflows/deploy.yml
  • .github/workflows/merge-queue-janitor.yml
  • .github/workflows/nightly-release.yml
  • .github/workflows/preview-server.yml
  • .github/workflows/refresh-card-data.yml
  • .github/workflows/release.yml
  • .github/workflows/shell-release.yml
  • CLAUDE.md
  • CONTRIBUTING.md
  • Cargo.toml
  • README.md
  • Tiltfile
  • client/package.json
  • client/public/feeds/mtggoldfish-commander.json
  • client/public/feeds/mtggoldfish-modern.json
  • client/public/feeds/mtggoldfish-pioneer.json
  • client/public/feeds/mtggoldfish-standard.json
  • client/src-tauri/Cargo.toml
  • client/src-tauri/capabilities/default.json
  • client/src-tauri/permissions/legacy-storage.toml
  • client/src-tauri/src/lib.rs
  • client/src-tauri/src/native_bridge.rs
  • client/src-tauri/src/native_engine.rs
  • client/src-tauri/tauri.conf.json
  • client/src/App.tsx
  • client/src/adapter/__tests__/ai-card-subset.test.ts
  • client/src/adapter/__tests__/ai-worker-pool.test.ts
  • client/src/adapter/__tests__/manaSourceSelectionWireTypes.test.ts
  • client/src/adapter/__tests__/p2p-adapter-multiplayer.test.ts
  • client/src/adapter/__tests__/p2pDraftHostBo3.test.ts
  • client/src/adapter/__tests__/server-draft-adapter.test.ts
  • client/src/adapter/__tests__/wasm-adapter.test.ts
  • client/src/adapter/__tests__/ws-adapter.test.ts
  • client/src/adapter/ai-worker-pool.ts
  • client/src/adapter/card-db-subset.ts
  • client/src/adapter/draftPodGuestAdapter.ts
  • client/src/adapter/draftPodHostAdapter.ts
  • client/src/adapter/engine-worker-client.ts
  • client/src/adapter/engine-worker.ts
  • client/src/adapter/p2p-adapter.ts
  • client/src/adapter/p2p-draft-guest.ts
  • client/src/adapter/p2p-draft-host.ts
  • client/src/adapter/replay-adapter.ts
  • client/src/adapter/server-draft-adapter.ts
  • client/src/adapter/types.ts
  • client/src/adapter/wasm-adapter.ts
  • client/src/adapter/ws-adapter.ts
  • client/src/components/animation/CastArcAnimation.tsx
  • client/src/components/animation/DiceRollOverlay.tsx
  • client/src/components/animation/MillRevealAnimation.tsx
  • client/src/components/board/ActionButton.tsx
  • client/src/components/board/AttachmentFan.tsx
  • client/src/components/board/BlockAssignmentLines.tsx
  • client/src/components/board/GroupedPermanent.tsx
  • client/src/components/board/OpponentSeatPane.tsx
  • client/src/components/board/PermanentCard.tsx
  • client/src/components/board/UndoButton.tsx
  • client/src/components/board/__tests__/ActionButton.test.tsx
  • client/src/components/board/__tests__/BattlefieldZoneOverflow.test.tsx
  • client/src/components/board/__tests__/BlockAssignmentLines.test.ts
  • client/src/components/board/__tests__/BlockAssignmentLines.test.tsx
  • client/src/components/board/__tests__/OpponentSeatHeader.test.tsx
  • client/src/components/board/__tests__/PermanentCard.test.tsx
  • client/src/components/board/blockAssignmentVisibility.ts
  • client/src/components/card/ArtCropCard.tsx
  • client/src/components/card/CardImage.tsx
  • client/src/components/card/CardPreview.tsx
  • client/src/components/card/__tests__/CardImage.test.tsx
  • client/src/components/card/__tests__/CardPreview.test.tsx
  • client/src/components/card/__tests__/cardImageSrcSet.test.ts
  • client/src/components/card/cardImageSrcSet.ts
  • client/src/components/chrome/DebugCreateActions.tsx
  • client/src/components/chrome/DebugPanel.tsx
  • client/src/components/chrome/EngineModeBadge.tsx
  • client/src/components/chrome/GameMenu.tsx
  • client/src/components/chrome/NativeEngineProgressOverlay.tsx
  • client/src/components/chrome/__tests__/DebugPanel.sandboxCapability.test.tsx
  • client/src/components/chrome/__tests__/EngineModeBadge.test.tsx
  • client/src/components/chrome/__tests__/GameMenu.test.tsx
  • client/src/components/chrome/__tests__/NativeEngineProgressOverlay.test.tsx
  • client/src/components/combat/BlockRequirementBadges.tsx
  • client/src/components/combat/BlockerConstraintBadges.tsx
  • client/src/components/combat/__tests__/combatRequirements.test.tsx
  • client/src/components/combat/useBlockRequirements.ts
  • client/src/components/combat/useBlockerConstraints.ts
  • client/src/components/deck-builder/CardEntryRow.tsx
  • client/src/components/deck-builder/DeckBuilder.tsx
  • client/src/components/deck-builder/DeckList.tsx
  • client/src/components/deck-builder/DeckStack.tsx
  • client/src/components/deck-builder/MoveList.tsx
  • client/src/components/deck-builder/__tests__/CardEntryRow.test.tsx
  • client/src/components/deck-builder/__tests__/DeckList.test.tsx
  • client/src/components/deck-builder/__tests__/DeckStack.test.tsx
  • client/src/components/deck-builder/useDeckBuilder.ts
  • client/src/components/hand/CompanionFanCard.tsx
  • client/src/components/hand/MobileHandDrawer.tsx
  • client/src/components/hand/MobileHeldHandCard.tsx
  • client/src/components/hand/OpponentHand.tsx
  • client/src/components/hand/PlayerHand.tsx
  • client/src/components/hud/__tests__/NextUpBadge.test.tsx
  • client/src/components/hud/__tests__/OpponentHud.test.tsx
  • client/src/components/hud/__tests__/PlayerHud.test.tsx
  • client/src/components/mana/ManaCostPips.tsx
  • client/src/components/mana/ManaPaymentUI.tsx
  • client/src/components/mana/ManaSymbol.tsx
  • client/src/components/mana/RichLabel.tsx
  • client/src/components/mana/__tests__/ManaPaymentUI.test.tsx
  • client/src/components/mana/__tests__/ManaSymbol.test.tsx
  • client/src/components/menu/home/HomeDashboard.tsx
  • client/src/components/modal/AdventureCastModal.tsx
  • client/src/components/modal/GiftRecipientModal.tsx
  • client/src/components/modal/OptionalCostModal.tsx
  • client/src/components/modal/__tests__/AdventureCastModal.test.tsx
  • client/src/components/modal/__tests__/ModeChoiceModal.test.tsx
  • client/src/components/modal/__tests__/OptionalCostModal.test.tsx
  • client/src/components/modal/__tests__/TriggerOrderModal.test.tsx
  • client/src/components/multiplayer/BetweenGamesSideboardModal.tsx
  • client/src/components/multiplayer/ConcedeDialog.tsx
  • client/src/components/multiplayer/__tests__/BetweenGamesSideboardModal.test.tsx
  • client/src/components/multiplayer/__tests__/ConcedeDialog.test.tsx
  • client/src/components/settings/PreferencesModal.tsx
  • client/src/components/stack/StackEntry.tsx
  • client/src/components/zone/LibraryPile.tsx
  • client/src/components/zone/ZoneViewer.tsx
  • client/src/components/zone/__tests__/issue_2889_hideaway_exile_visibility.test.tsx
  • client/src/game/__tests__/castPaymentMode.test.ts
  • client/src/game/__tests__/diceContest.test.ts
  • client/src/game/__tests__/dispatchSplitEpochSoftlock.test.ts
  • client/src/game/__tests__/dispatchTurnControlPayCostQueue.test.ts
  • client/src/game/__tests__/sessionCleanup.test.ts
  • client/src/game/castPaymentMode.ts
  • client/src/game/controllers/__tests__/aiController.test.ts
  • client/src/game/controllers/aiController.ts
  • client/src/game/diceContest.ts
  • client/src/game/dispatch.ts
  • client/src/game/sessionCleanup.ts
  • client/src/game/waitingForRegistry.ts
  • client/src/hooks/__tests__/useCardHover.test.tsx
  • client/src/hooks/__tests__/useConcedeHandler.test.tsx
  • client/src/hooks/__tests__/useInspectHoverProps.test.tsx
  • client/src/hooks/__tests__/useKeyboardShortcuts.test.tsx
  • client/src/hooks/useCanHover.ts
  • client/src/hooks/useCardHover.ts
  • client/src/hooks/useConcedeHandler.ts
  • client/src/hooks/useInspectHoverProps.ts
  • client/src/hooks/useKeyboardShortcuts.ts
  • client/src/hooks/usePreviewDismiss.ts
  • client/src/hooks/useRafPositions.ts
  • client/src/hooks/useResumables.ts
  • client/src/hooks/useUnboundedCounterTypes.ts
  • client/src/i18n/locales/de/common.json
  • client/src/i18n/locales/de/deck-builder.json
  • client/src/i18n/locales/de/game.json
  • client/src/i18n/locales/de/multiplayer.json
  • client/src/i18n/locales/de/settings.json
  • client/src/i18n/locales/en/common.json
  • client/src/i18n/locales/en/deck-builder.json
  • client/src/i18n/locales/en/game.json
  • client/src/i18n/locales/en/multiplayer.json
  • client/src/i18n/locales/en/settings.json
  • client/src/i18n/locales/es/common.json
  • client/src/i18n/locales/es/deck-builder.json
  • client/src/i18n/locales/es/game.json
  • client/src/i18n/locales/es/multiplayer.json
  • client/src/i18n/locales/es/settings.json
  • client/src/i18n/locales/fr/common.json
  • client/src/i18n/locales/fr/deck-builder.json
  • client/src/i18n/locales/fr/game.json
  • client/src/i18n/locales/fr/multiplayer.json
  • client/src/i18n/locales/fr/settings.json
  • client/src/i18n/locales/it/common.json
  • client/src/i18n/locales/it/deck-builder.json
  • client/src/i18n/locales/it/game.json
  • client/src/i18n/locales/it/multiplayer.json
  • client/src/i18n/locales/it/settings.json
  • client/src/i18n/locales/pl/common.json
  • client/src/i18n/locales/pl/deck-builder.json
  • client/src/i18n/locales/pl/game.json
  • client/src/i18n/locales/pl/multiplayer.json
  • client/src/i18n/locales/pl/settings.json
  • client/src/i18n/locales/pt/common.json
  • client/src/i18n/locales/pt/deck-builder.json
  • client/src/i18n/locales/pt/game.json
  • client/src/i18n/locales/pt/multiplayer.json
  • client/src/i18n/locales/pt/settings.json
  • client/src/network/__tests__/draftProtocol.test.ts
  • client/src/network/__tests__/protocol.test.ts
  • client/src/network/draftProtocol.ts
  • client/src/network/protocol.ts
  • client/src/pages/DraftPodPage.tsx
  • client/src/pages/GamePage.tsx
  • client/src/pages/__tests__/DraftPodPage.betweenGames.test.tsx
  • client/src/pages/__tests__/GamePage.bracketViolation.test.tsx
  • client/src/pages/__tests__/GamePage.projectedManaChoices.test.ts
  • client/src/pages/__tests__/greenwardenDoubledTrigger.test.ts
  • client/src/pages/__tests__/optionalEffectChoiceTransition.test.tsx
  • client/src/providers/GameProvider.tsx
  • client/src/providers/__tests__/GameProvider.nativeEngine.test.tsx
  • client/src/pwa/multiplayerGuard.ts
  • client/src/services/__tests__/draftPersistence.test.ts
  • client/src/services/__tests__/fullTerminalResult.test.ts
  • client/src/services/__tests__/gamePersistence.test.ts
  • client/src/services/__tests__/intergameCommandLedger.test.ts
  • client/src/services/__tests__/multiplayerSession.test.ts
  • client/src/services/__tests__/p2pSession.test.ts
  • client/src/services/__tests__/p2pTerminalResult.test.ts
  • client/src/services/__tests__/scryfall.test.ts
  • client/src/services/draftPersistence.ts
  • client/src/services/engineRuntime.ts
  • client/src/services/fullTerminalResult.ts
  • client/src/services/gamePersistence.ts
  • client/src/services/intergameCommandLedger.ts
  • client/src/services/multiplayerSession.ts
  • client/src/services/nativeEngine.ts
  • client/src/services/p2pSession.ts
  • client/src/services/p2pTerminalResult.ts
  • client/src/services/scryfall.ts
  • client/src/stores/__tests__/gameStore.test.ts
  • client/src/stores/__tests__/gameStoreCommitGate.test.ts
  • client/src/stores/__tests__/multiplayerDraftStore.test.ts
  • client/src/stores/__tests__/multiplayerStore.test.ts
  • client/src/stores/__tests__/uiStore.test.ts
  • client/src/stores/__tests__/uiStoreHoverLatency.test.ts
  • client/src/stores/gameStore.ts
  • client/src/stores/multiplayerDraftStore.ts
  • client/src/stores/multiplayerStore.ts
  • client/src/stores/preferencesStore.ts
  • client/src/stores/replayStore.ts
  • client/src/stores/uiStore.ts
  • client/src/test/factories/__tests__/factories.test.ts
  • client/src/test/factories/engineAdapterFactory.ts
  • client/src/test/factories/gameStateFactory.ts
  • client/src/utils/description.ts
  • client/src/viewmodel/__tests__/blockerSorting.test.ts
  • client/src/viewmodel/__tests__/cardActionChoice.test.ts
  • client/src/viewmodel/__tests__/costLabel.test.ts
  • client/src/viewmodel/__tests__/manaAbilityOptionDiscrimination.test.ts
  • client/src/viewmodel/blockerSorting.ts
  • client/src/viewmodel/cardProps.ts
  • client/src/viewmodel/costLabel.ts
  • client/src/viewmodel/manaPoolGroups.ts
  • crates/draft-core/Cargo.toml
  • crates/draft-wasm/Cargo.toml
  • crates/engine-wasm/Cargo.toml
  • crates/engine-wasm/src/lib.rs
  • crates/engine/Cargo.toml
  • crates/engine/data/known-tokens.toml
  • crates/engine/data/mtgjson-vintage
  • crates/engine/src/ai_support/candidates.rs
  • crates/engine/src/ai_support/combat_withdrawal.rs
  • crates/engine/src/ai_support/context.rs
  • crates/engine/src/ai_support/copy.rs
  • crates/engine/src/ai_support/filter.rs
  • crates/engine/src/ai_support/mod.rs
  • crates/engine/src/ai_support/payment_continuation.rs
  • crates/engine/src/ai_support/targeted_exchange.rs
  • crates/engine/src/analysis/ability_graph.rs
  • crates/engine/src/analysis/resource.rs
  • crates/engine/src/analysis/sim.rs
  • crates/engine/src/bin/interaction_bindings.rs
  • crates/engine/src/database/synthesis.rs
  • crates/engine/src/database/unearth.rs
  • crates/engine/src/database/unearth_tests.rs
  • crates/engine/src/game/ability_rw.rs
  • crates/engine/src/game/ability_scan.rs
  • crates/engine/src/game/ability_utils.rs
  • crates/engine/src/game/archenemy_tests.rs
  • crates/engine/src/game/augment.rs
  • crates/engine/src/game/blitz.rs
  • crates/engine/src/game/casting.rs
  • crates/engine/src/game/casting_costs.rs
  • crates/engine/src/game/casting_targets.rs
  • crates/engine/src/game/casting_tests.rs
  • crates/engine/src/game/cipher.rs
  • crates/engine/src/game/combat.rs
  • crates/engine/src/game/combat_damage.rs
  • crates/engine/src/game/companion.rs
  • crates/engine/src/game/cost_payability.rs
  • crates/engine/src/game/costs.rs
  • crates/engine/src/game/coverage.rs
  • crates/engine/src/game/dash.rs
  • crates/engine/src/game/day_night.rs
  • crates/engine/src/game/deck_validation.rs
  • crates/engine/src/game/derived.rs
  • crates/engine/src/game/derived_views.rs
  • crates/engine/src/game/dungeon.rs
  • crates/engine/src/game/effects/add_restriction.rs
  • crates/engine/src/game/effects/add_target_replacement.rs
  • crates/engine/src/game/effects/additional_phase.rs
  • crates/engine/src/game/effects/attach.rs
  • crates/engine/src/game/effects/become_copy.rs
  • crates/engine/src/game/effects/cast_copy_of_card.rs
  • crates/engine/src/game/effects/cast_from_zone.rs
  • crates/engine/src/game/effects/change_targets.rs
  • crates/engine/src/game/effects/change_zone.rs
  • crates/engine/src/game/effects/choose.rs
  • crates/engine/src/game/effects/choose_counter_kind.rs
  • crates/engine/src/game/effects/choose_from_zone.rs
  • crates/engine/src/game/effects/collect_evidence.rs
  • crates/engine/src/game/effects/copy_spell.rs
  • crates/engine/src/game/effects/counter.rs
  • crates/engine/src/game/effects/counters.rs
  • crates/engine/src/game/effects/create_emblem.rs
  • crates/engine/src/game/effects/deal_damage.rs
  • crates/engine/src/game/effects/delayed_trigger.rs
  • crates/engine/src/game/effects/dig.rs
  • crates/engine/src/game/effects/discard.rs
  • crates/engine/src/game/effects/double.rs
  • crates/engine/src/game/effects/draw.rs
  • crates/engine/src/game/effects/effect.rs
  • crates/engine/src/game/effects/encore.rs
  • crates/engine/src/game/effects/end_phase.rs
  • crates/engine/src/game/effects/epic.rs
  • crates/engine/src/game/effects/epic_tests.rs
  • crates/engine/src/game/effects/exchange_life.rs
  • crates/engine/src/game/effects/exile_face_down_pile.rs
  • crates/engine/src/game/effects/exile_from_top_until.rs
  • crates/engine/src/game/effects/exile_resolving_spell.rs
  • crates/engine/src/game/effects/exile_top.rs
  • crates/engine/src/game/effects/extra_turn.rs
  • crates/engine/src/game/effects/flip_coin.rs
  • crates/engine/src/game/effects/flip_permanent.rs
  • crates/engine/src/game/effects/force_block.rs
  • crates/engine/src/game/effects/free_cast_from_zones.rs
  • crates/engine/src/game/effects/gift_delivery.rs
  • crates/engine/src/game/effects/grant_extra_loyalty_activations.rs
  • crates/engine/src/game/effects/investigate.rs
  • crates/engine/src/game/effects/life.rs
  • crates/engine/src/game/effects/mana.rs
  • crates/engine/src/game/effects/mod.rs
  • crates/engine/src/game/effects/myriad.rs
  • crates/engine/src/game/effects/paradigm.rs
  • crates/engine/src/game/effects/pay.rs
  • crates/engine/src/game/effects/phase_out.rs
  • crates/engine/src/game/effects/player_counter.rs
  • crates/engine/src/game/effects/prepare.rs
  • crates/engine/src/game/effects/prevent_damage.rs
  • crates/engine/src/game/effects/proliferate.rs
  • crates/engine/src/game/effects/put_chosen_counter.rs
  • crates/engine/src/game/effects/put_on_top.rs
  • crates/engine/src/game/effects/rebound.rs
  • crates/engine/src/game/effects/remove_from_combat.rs
  • crates/engine/src/game/effects/reverse_turn_order.rs
  • crates/engine/src/game/effects/scoped_library_search.rs
  • crates/engine/src/game/effects/scry.rs
  • crates/engine/src/game/effects/search_library.rs
  • crates/engine/src/game/effects/set_room_door_lock.rs
  • crates/engine/src/game/effects/skip_next_step.rs
  • crates/engine/src/game/effects/skip_next_turn.rs
  • crates/engine/src/game/effects/surveil.rs
  • crates/engine/src/game/effects/token.rs
  • crates/engine/src/game/effects/token_copy.rs
  • crates/engine/src/game/effects/transform_effect.rs
  • crates/engine/src/game/effects/turn_face_down.rs
  • crates/engine/src/game/effects/venture.rs
  • crates/engine/src/game/effects/vote.rs
  • crates/engine/src/game/elimination.rs
  • crates/engine/src/game/end_continuous_effect.rs
  • crates/engine/src/game/engine.rs
  • crates/engine/src/game/engine_auto_pass_decision_tests.rs
  • crates/engine/src/game/engine_casting.rs
  • crates/engine/src/game/engine_combat.rs
  • crates/engine/src/game/engine_debug.rs
  • crates/engine/src/game/engine_exile_return_tests.rs
  • crates/engine/src/game/engine_keyword_action_stack_tests.rs
  • crates/engine/src/game/engine_mdfc_land_tests.rs
  • crates/engine/src/game/engine_modes.rs
  • crates/engine/src/game/engine_payment_choices.rs
  • crates/engine/src/game/engine_phase_trigger_regression_tests.rs
  • crates/engine/src/game/engine_priority.rs
  • crates/engine/src/game/engine_replacement.rs
  • crates/engine/src/game/engine_resolution_choices.rs
  • crates/engine/src/game/engine_resolve_batch.rs
  • crates/engine/src/game/engine_stack.rs
  • crates/engine/src/game/engine_tests.rs
  • crates/engine/src/game/engine_trigger_target_tests.rs
  • crates/engine/src/game/filter.rs
  • crates/engine/src/game/flip.rs
  • crates/engine/src/game/game_object.rs
  • crates/engine/src/game/interaction.rs
  • crates/engine/src/game/keywords.rs
  • crates/engine/src/game/layers.rs
  • crates/engine/src/game/ledger.rs
  • crates/engine/src/game/library.rs
  • crates/engine/src/game/life_costs.rs
  • crates/engine/src/game/log.rs
  • crates/engine/src/game/mana_abilities.rs
  • crates/engine/src/game/mana_payment.rs
  • crates/engine/src/game/mana_sources.rs
  • crates/engine/src/game/marksman_tests.rs
  • crates/engine/src/game/match_flow.rs
  • crates/engine/src/game/meld_tests.rs
  • crates/engine/src/game/merge_tests.rs
  • crates/engine/src/game/mod.rs
  • crates/engine/src/game/mulligan.rs
  • crates/engine/src/game/off_zone_characteristics.rs
  • crates/engine/src/game/planechase.rs
  • crates/engine/src/game/planeswalker.rs
  • crates/engine/src/game/printed_cards.rs
  • crates/engine/src/game/public_state.rs
  • crates/engine/src/game/quantity.rs
  • crates/engine/src/game/replacement.rs
  • crates/engine/src/game/replay.rs
  • crates/engine/src/game/sba.rs
  • crates/engine/src/game/scenario.rs
  • crates/engine/src/game/specialize.rs
  • crates/engine/src/game/stack.rs
  • crates/engine/src/game/static_abilities.rs
  • crates/engine/src/game/targeting.rs
  • crates/engine/src/game/transform.rs
  • crates/engine/src/game/trigger_index.rs
  • crates/engine/src/game/trigger_matchers.rs
  • crates/engine/src/game/triggers.rs
  • crates/engine/src/game/triggers_dedup_regression_tests.rs
  • crates/engine/src/game/triggers_devour_runtime_tests.rs
  • crates/engine/src/game/triggers_ordering_parity_tests.rs
  • crates/engine/src/game/triggers_pr7_order_template_tests.rs
  • crates/engine/src/game/triggers_push_first_contract_tests.rs
  • crates/engine/src/game/turns.rs
  • crates/engine/src/game/visibility.rs
  • crates/engine/src/game/zone_pipeline.rs
  • crates/engine/src/game/zones.rs
  • crates/engine/src/parser/clause_shell.rs
  • crates/engine/src/parser/oracle.rs
  • crates/engine/src/parser/oracle_class.rs
  • crates/engine/src/parser/oracle_classifier.rs
  • crates/engine/src/parser/oracle_dispatch.rs
  • crates/engine/src/parser/oracle_effect/assembly.rs
  • crates/engine/src/parser/oracle_effect/conditions.rs
  • crates/engine/src/parser/oracle_effect/counter.rs
  • crates/engine/src/parser/oracle_effect/imperative.rs
  • crates/engine/src/parser/oracle_effect/lower.rs
  • crates/engine/src/parser/oracle_effect/mana.rs
  • crates/engine/src/parser/oracle_effect/mod.rs
  • crates/engine/src/parser/oracle_effect/sequence.rs
  • crates/engine/src/parser/oracle_effect/snapshot_tests.rs
  • crates/engine/src/parser/oracle_effect/subject.rs
  • crates/engine/src/parser/oracle_effect/tests.rs
  • crates/engine/src/parser/oracle_effect/token.rs
  • crates/engine/src/parser/oracle_ir/ast.rs
  • crates/engine/src/parser/oracle_ir/context.rs
  • crates/engine/src/parser/oracle_ir/doc.rs
  • crates/engine/src/parser/oracle_ir/effect_chain.rs
  • crates/engine/src/parser/oracle_ir/feature.rs
  • crates/engine/src/parser/oracle_ir/relation.rs
  • crates/engine/src/parser/oracle_ir/snapshot_tests.rs
  • crates/engine/src/parser/oracle_ir/trigger.rs
  • crates/engine/src/parser/oracle_keyword.rs
  • crates/engine/src/parser/oracle_level.rs
  • crates/engine/src/parser/oracle_modal.rs
  • crates/engine/src/parser/oracle_nom/condition.rs
  • crates/engine/src/parser/oracle_nom/duration.rs
  • crates/engine/src/parser/oracle_nom/filter.rs
  • crates/engine/src/parser/oracle_nom/primitives.rs
  • crates/engine/src/parser/oracle_nom/quantity.rs
  • crates/engine/src/parser/oracle_nom/target.rs
  • crates/engine/src/parser/oracle_pipeline_snapshot_tests.rs
  • crates/engine/src/parser/oracle_replacement.rs
  • crates/engine/src/parser/oracle_saga.rs
  • crates/engine/src/parser/oracle_separate_piles.rs
  • crates/engine/src/parser/oracle_spacecraft.rs
  • crates/engine/src/parser/oracle_special.rs
  • crates/engine/src/parser/oracle_static/anthem.rs
  • crates/engine/src/parser/oracle_static/dispatch.rs
  • crates/engine/src/parser/oracle_static/keyword_grant.rs
  • crates/engine/src/parser/oracle_static/mana_transform.rs
  • crates/engine/src/parser/oracle_static/mod.rs
  • crates/engine/src/parser/oracle_static/restriction.rs
  • crates/engine/src/parser/oracle_static/shared.rs
  • crates/engine/src/parser/oracle_static/tests.rs
  • crates/engine/src/parser/oracle_target.rs
  • crates/engine/src/parser/oracle_tests.rs
  • crates/engine/src/parser/oracle_trigger.rs
  • crates/engine/src/parser/oracle_trigger_snapshot_tests.rs
  • crates/engine/src/parser/oracle_trigger_tests.rs
  • crates/engine/src/parser/oracle_util.rs
  • crates/engine/src/parser/oracle_vote.rs
  • crates/engine/src/parser/swallow_check.rs
  • crates/engine/src/types/ability.rs
  • crates/engine/src/types/action_stable_order.rs
  • crates/engine/src/types/actions.rs
  • crates/engine/src/types/card.rs
  • crates/engine/src/types/events.rs
  • crates/engine/src/types/format.rs
  • crates/engine/src/types/game_state.rs
  • crates/engine/src/types/game_state_size.rs
  • crates/engine/src/types/identifiers.rs
  • crates/engine/src/types/interaction.rs
  • crates/engine/src/types/keywords.rs
  • crates/engine/src/types/layers.rs
  • crates/engine/src/types/mana.rs
  • crates/engine/src/types/match_config.rs
  • crates/engine/src/types/mod.rs
  • crates/engine/src/types/proposed_event.rs
  • crates/engine/src/types/resolution.rs
  • crates/engine/src/types/resolved_commands.rs
  • crates/engine/src/types/statics.rs
  • crates/engine/tests/fixtures/integration_cards.json
  • crates/engine/tests/integration/ajani_nacatl_pariah_co_departure_6427.rs
  • crates/engine/tests/integration/azors_gateway_transform_condition.rs
  • crates/engine/tests/integration/baleful_mastery_regression.rs
  • crates/engine/tests/integration/bound_by_moonsilver_sacrifice_source_relative_6017.rs
  • crates/engine/tests/integration/breeches_blastmaker_coin_flip_copy.rs
  • crates/engine/tests/integration/combo_infinite_pile.rs
  • crates/engine/tests/integration/companion_special_action.rs
  • crates/engine/tests/integration/consuming_vapors_rebound.rs
  • crates/engine/tests/integration/copied_ability_transform_generation.rs
  • crates/engine/tests/integration/cost_x_carrier_runtime.rs
  • crates/engine/tests/integration/cost_zone_pipeline.rs
  • crates/engine/tests/integration/cr733_resolved_attachment.rs
  • crates/engine/tests/integration/cr733_resolved_combat_membership.rs
  • crates/engine/tests/integration/cr733_resolved_commands_p2.rs
  • crates/engine/tests/integration/cr733_resolved_copy_token_creation.rs
  • crates/engine/tests/integration/cr733_resolved_draw.rs
  • crates/engine/tests/integration/cr733_resolved_enter_tapped.rs
  • crates/engine/tests/integration/cr733_resolved_entry_retags.rs
  • crates/engine/tests/integration/cr733_resolved_frame_transition.rs
  • crates/engine/tests/integration/cr733_resolved_modifier_install.rs
  • crates/engine/tests/integration/cr733_resolved_object_cease.rs
  • crates/engine/tests/integration/cr733_resolved_player_leave.rs
  • crates/engine/tests/integration/cr733_resolved_stack_entry_finalize.rs
  • crates/engine/tests/integration/cr733_resolved_stack_push.rs
  • crates/engine/tests/integration/cr733_resolved_stack_removal.rs
  • crates/engine/tests/integration/cr733_resolved_token_creation.rs
  • crates/engine/tests/integration/cr733_resolved_transform.rs
  • crates/engine/tests/integration/cr733_resolved_trigger_collection.rs
  • crates/engine/tests/integration/cr733_resolved_trigger_removal.rs
  • crates/engine/tests/integration/cr733_resolved_zone_change.rs
  • crates/engine/tests/integration/craft_tithing_blade_transform.rs
  • crates/engine/tests/integration/cross_line_instead_override_branch.rs
  • crates/engine/tests/integration/culling_scales_lowest_mana_value_target.rs
  • crates/engine/tests/integration/diluvian_primordial_6754.rs
  • crates/engine/tests/integration/draw_preflight_matches_live_pipeline.rs
  • crates/engine/tests/integration/end_combat_phase.rs
  • crates/engine/tests/integration/favor_of_the_mighty_greatest_mana_value_protection.rs
  • crates/engine/tests/integration/felisa_fang_of_silverquill.rs
  • crates/engine/tests/integration/fevered_visions.rs
  • crates/engine/tests/integration/fireball_x_cost_surcharge_timing.rs
  • crates/engine/tests/integration/game_state_boxed_ability_serde.rs
  • crates/engine/tests/integration/game_state_stack_budget.rs
  • crates/engine/tests/integration/gift_delivery_draw_sequence_migration.rs
  • crates/engine/tests/integration/glen_elendras_answer_counter_all_conjunction.rs
  • crates/engine/tests/integration/gollum_scheming_guide_card_predicate_guess.rs
  • crates/engine/tests/integration/granted_bloodthirst_5802.rs
  • crates/engine/tests/integration/granted_sunburst_5337.rs
  • crates/engine/tests/integration/greater_good_activation.rs
  • crates/engine/tests/integration/integration_adventure.rs
  • crates/engine/tests/integration/interaction_contract.rs
  • crates/engine/tests/integration/invoke_calamity_free_cast.rs
  • crates/engine/tests/integration/ir_spell_node_readers.rs
  • crates/engine/tests/integration/issue_1128_elrond_scry_counter.rs
  • crates/engine/tests/integration/issue_1301_cauldron_of_essence_sacrifice_target.rs
  • crates/engine/tests/integration/issue_2376_pyromancers_ascension.rs
  • crates/engine/tests/integration/issue_2425_fable_chapter_iii_transform.rs
  • crates/engine/tests/integration/issue_2862_teferi_loyalty.rs
  • crates/engine/tests/integration/issue_2904_life_of_the_party.rs
  • crates/engine/tests/integration/issue_2938_deflecting_swat.rs
  • crates/engine/tests/integration/issue_3246_windbrisk_heights_hideaway_exiled_by_source.rs
  • crates/engine/tests/integration/issue_3282_consign_to_memory_counter.rs
  • crates/engine/tests/integration/issue_3323_nexus_of_fate_extra_turn.rs
  • crates/engine/tests/integration/issue_4001_frolicking_familiar_adventure_instant.rs
  • crates/engine/tests/integration/issue_4220_agatha_soul_cauldron.rs
  • crates/engine/tests/integration/issue_4239_nissa_steward_x_loyalty.rs
  • crates/engine/tests/integration/issue_4240_damaged_player_anaphor_runtime.rs
  • crates/engine/tests/integration/issue_4240_sigil_of_sleep_target_scope.rs
  • crates/engine/tests/integration/issue_4956_gift_of_immortality_reattach.rs
  • crates/engine/tests/integration/issue_4966_waterbenders_ascension.rs
  • crates/engine/tests/integration/issue_5252_additional_sacrifice_after_mana_abilities.rs
  • crates/engine/tests/integration/issue_5326_avatar_aang_transform.rs
  • crates/engine/tests/integration/issue_5334_furious_rise_may_play.rs
  • crates/engine/tests/integration/issue_564_wishclaw_talisman_control.rs
  • crates/engine/tests/integration/issue_5902_heart_shaped_herb.rs
  • crates/engine/tests/integration/issue_5976_unearth_leave_redirect.rs
  • crates/engine/tests/integration/issue_5991_malfegor_discard_sacrifice.rs
  • crates/engine/tests/integration/issue_605_calming_licid.rs
  • crates/engine/tests/integration/issue_6091_grindstone.rs
  • crates/engine/tests/integration/issue_6381_benevolent_offering_repeat_opponent.rs
  • crates/engine/tests/integration/issue_6403_moonmist_mass_transform.rs
  • crates/engine/tests/integration/issue_6405_aang_multicolor_cost_reduction.rs
  • crates/engine/tests/integration/issue_6416_extra_turn_resume_order.rs
  • crates/engine/tests/integration/issue_6431_lava_dart_flashback_control_turn.rs
  • crates/engine/tests/integration/issue_6435_mosswort_bridge_hideaway_play.rs
  • crates/engine/tests/integration/issue_6437_fight_rigging_exiled_card_target.rs
  • crates/engine/tests/integration/issue_6440_mockingbird_uncast_copy_ceiling.rs
  • crates/engine/tests/integration/issue_6459_scheming_symmetry.rs
  • crates/engine/tests/integration/issue_6477_wandering_archaic_optional_payment.rs
  • crates/engine/tests/integration/issue_6498_portent_of_calamity.rs
  • crates/engine/tests/integration/issue_6499_flickering_ward_protection_exemption.rs
  • crates/engine/tests/integration/issue_6566_granted_leave_exile.rs
  • crates/engine/tests/integration/issue_6634_aven_courier.rs
  • crates/engine/tests/integration/issue_6643_party_dude_opponents_attacked.rs
  • crates/engine/tests/integration/issue_6677_wakandan_royal_guard.rs
  • crates/engine/tests/integration/issue_6678_captain_america_shield_tap_defender.rs
  • crates/engine/tests/integration/issue_691_sheoldred_saga_lore.rs
  • crates/engine/tests/integration/jagged_lightning_each_of_two_targets.rs
  • crates/engine/tests/integration/kaito_integration.rs
  • crates/engine/tests/integration/kamigawa_flip_cards.rs
  • crates/engine/tests/integration/l02_bb2_cast_origin.rs
  • crates/engine/tests/integration/lictor_opponent_entered_this_turn.rs
  • crates/engine/tests/integration/loop_shortcut.rs
  • crates/engine/tests/integration/lose_control_this_turn_delayed_trigger.rs
  • crates/engine/tests/integration/louisoix_sacrifice_counter.rs
  • crates/engine/tests/integration/main.rs
  • crates/engine/tests/integration/mechtitan_core_return_exiled.rs
  • crates/engine/tests/integration/memory_vessel_std_s25.rs
  • crates/engine/tests/integration/metamorphic_alteration.rs
  • crates/engine/tests/integration/mjolnir_hammer_double_damage.rs
  • crates/engine/tests/integration/mogg_fanatic_target_before_cost.rs
  • crates/engine/tests/integration/molten_psyche.rs
  • crates/engine/tests/integration/mutable_pupa_perpetual_keyword_mirror.rs
  • crates/engine/tests/integration/myrkul_crew_phase1_incarnation.rs
  • crates/engine/tests/integration/najeela_extra_combat_grant_2898.rs
  • crates/engine/tests/integration/natural_balance.rs
  • crates/engine/tests/integration/necrodominance_pay_any_life_draw.rs
  • crates/engine/tests/integration/notion_thief_opponent_draw_redirect.rs
  • crates/engine/tests/integration/orzhov_advokist.rs
  • crates/engine/tests/integration/ozai_phoenix_king_unspent_mana.rs
  • crates/engine/tests/integration/payment_continuation.rs
  • crates/engine/tests/integration/peerless_recycling_gift_recipient.rs
  • crates/engine/tests/integration/power_up_keyword.rs
  • crates/engine/tests/integration/reflexive_body_token_referent.rs
  • crates/engine/tests/integration/relic_of_progenitus_6446.rs
  • crates/engine/tests/integration/restricted_mana_face_down_and_face_up.rs
  • crates/engine/tests/integration/restricted_mana_mv_or_x.rs
  • crates/engine/tests/integration/restricted_mana_x_cost_only.rs
  • crates/engine/tests/integration/revealed_card_type_disjunction_518.rs
  • crates/engine/tests/integration/riptide_gearhulk_5994.rs
  • crates/engine/tests/integration/room_door_lock_unlock.rs
  • crates/engine/tests/integration/rules/battle.rs
  • crates/engine/tests/integration/rules/combat.rs
  • crates/engine/tests/integration/rules/tribute.rs
  • crates/engine/tests/integration/runadi_behemoth_caller_etb_counters.rs
  • crates/engine/tests/integration/s07_coiling_rebirth_full_cast.rs
  • crates/engine/tests/integration/s07_malamet_castpath.rs
  • crates/engine/tests/integration/sacrificial_mana_choice.rs
  • crates/engine/tests/integration/sandswirl_wanderglyph_attacked_you_cant_cast.rs
  • crates/engine/tests/integration/scholarship_sponsor.rs
  • crates/engine/tests/integration/self_destruct_target_power.rs
  • crates/engine/tests/integration/specialize_runtime.rs
  • crates/engine/tests/integration/springheart_nantuko_bestow_landfall.rs
  • crates/engine/tests/integration/springheart_realdb_repro.rs
  • crates/engine/tests/integration/std_longtail_e.rs
  • crates/engine/tests/integration/std_s07_batch5b.rs
  • crates/engine/tests/integration/stolen_goodies_zero_targets.rs
  • crates/engine/tests/integration/strategic_betrayal_6505.rs
  • crates/engine/tests/integration/tamiyo_inquisitive_student_flip.rs
  • crates/engine/tests/integration/temporal_anchor.rs
  • crates/engine/tests/integration/temporary_cant_be_blocked_view.rs
  • crates/engine/tests/integration/the_chain_veil_loyalty_grants.rs
  • crates/engine/tests/integration/the_who_opponent_guess_resolution.rs
  • crates/engine/tests/integration/throne_of_eldraine_mana_riders.rs
  • crates/engine/tests/integration/timely_ward_regression.rs
  • crates/engine/tests/integration/undying_malice_edict_sacrifice_5942.rs
  • crates/engine/tests/integration/until_next_step_deadline_durations.rs
  • crates/engine/tests/integration/wedding_announcement_transform.rs
  • crates/engine/tests/integration/wheel_and_deal.rs
  • crates/engine/tests/integration/willie_lumpkin_cant_attack.rs
  • crates/engine/tests/integration/yurlok_of_scorch_thrash.rs
  • crates/lobby-broker/Cargo.toml
  • crates/lobby-broker/src/protocol.rs
  • crates/manabrew-compat/CLAUDE.md
  • crates/manabrew-compat/Cargo.toml
  • crates/manabrew-compat/src/lib.rs
  • crates/mtgish-import/CLAUDE.md
  • crates/mtgish-import/Cargo.toml
  • crates/mtgish-import/src/convert/action.rs
  • crates/mtgish-import/src/convert/condition.rs
  • crates/mtgish-import/src/convert/keyword.rs
  • crates/mtgish-import/src/convert/mod.rs
  • crates/mtgish-import/src/convert/replacement.rs
  • crates/phase-ai/Cargo.toml
  • crates/phase-ai/baselines/perf-baseline.json
  • crates/phase-ai/baselines/suite-baseline.json
  • crates/phase-ai/src/ability_chain.rs
  • crates/phase-ai/src/auto_play.rs
  • crates/phase-ai/src/bin/ai_bench_state.rs
  • crates/phase-ai/src/bin/ai_commander.rs
  • crates/phase-ai/src/bin/ai_duel.rs
  • crates/phase-ai/src/bin/ai_gate.rs
  • crates/phase-ai/src/bin/ai_perf_gate.rs
  • crates/phase-ai/src/bin/ai_tune.rs
  • crates/phase-ai/src/bin/attack_scaling_bench.rs
  • crates/phase-ai/src/bin/combat_priority_bench.rs
  • crates/phase-ai/src/bin/declare_attackers_bench.rs
  • crates/phase-ai/src/bin/legal_actions_bench.rs
  • crates/phase-ai/src/bin/pass_priority_bench.rs
  • crates/phase-ai/src/bin/resolve_bench.rs
  • crates/phase-ai/src/card_hints.rs
  • crates/phase-ai/src/card_value.rs
  • crates/phase-ai/src/config.rs
  • crates/phase-ai/src/decision_kind.rs
  • crates/phase-ai/src/deck_knowledge.rs
  • crates/phase-ai/src/deck_profile.rs
  • crates/phase-ai/src/duel_suite/harvest.rs
  • crates/phase-ai/src/duel_suite/perf.rs
  • crates/phase-ai/src/duel_suite/run.rs
  • crates/phase-ai/src/eval.rs
  • crates/phase-ai/src/features/aggro_pressure.rs
  • crates/phase-ai/src/features/cost_reduction.rs
  • crates/phase-ai/src/features/devotion.rs
  • crates/phase-ai/src/features/discard_matters.rs
  • crates/phase-ai/src/features/draw_matters.rs
  • crates/phase-ai/src/features/graveyard_types.rs
  • crates/phase-ai/src/features/mana_ramp.rs
  • crates/phase-ai/src/features/mod.rs
  • crates/phase-ai/src/features/poison.rs
  • crates/phase-ai/src/features/reanimator.rs
  • crates/phase-ai/src/features/tests/cost_reduction.rs
  • crates/phase-ai/src/features/tests/devotion.rs
  • crates/phase-ai/src/features/tests/discard_matters.rs
  • crates/phase-ai/src/features/tests/draw_matters.rs
  • crates/phase-ai/src/features/tests/graveyard_types.rs
  • crates/phase-ai/src/features/tests/mod.rs
  • crates/phase-ai/src/features/tests/poison.rs
  • crates/phase-ai/src/features/tests/vehicles.rs
  • crates/phase-ai/src/features/vehicles.rs
  • crates/phase-ai/src/lib.rs
  • crates/phase-ai/src/mana_colors.rs
  • crates/phase-ai/src/plan/mod.rs
  • crates/phase-ai/src/planner/mod.rs
  • crates/phase-ai/src/policies/anti_self_harm.rs
  • crates/phase-ai/src/policies/blight_value.rs
  • crates/phase-ai/src/policies/combat_withdrawal.rs
  • crates/phase-ai/src/policies/context.rs
  • crates/phase-ai/src/policies/copy_value.rs
  • crates/phase-ai/src/policies/cost_reduction.rs
  • crates/phase-ai/src/policies/crew_timing.rs
  • crates/phase-ai/src/policies/cycling_discipline.rs
  • crates/phase-ai/src/policies/devotion.rs
  • crates/phase-ai/src/policies/discard_payoff.rs
  • crates/phase-ai/src/policies/draw_payoff.rs
  • crates/phase-ai/src/policies/effect_classify.rs
  • crates/phase-ai/src/policies/evasion_removal_priority.rs
  • crates/phase-ai/src/policies/free_outlet_activation.rs
  • crates/phase-ai/src/policies/graveyard_types.rs
  • crates/phase-ai/src/policies/hand_disruption.rs
  • crates/phase-ai/src/policies/land_animation.rs
  • crates/phase-ai/src/policies/land_sequencing.rs
  • crates/phase-ai/src/policies/life_total_resource.rs
  • crates/phase-ai/src/policies/mod.rs
  • crates/phase-ai/src/policies/mulligan/aggro_keepables.rs
  • crates/phase-ai/src/policies/mulligan/aristocrats_keepables.rs
  • crates/phase-ai/src/policies/mulligan/card_floor.rs
  • crates/phase-ai/src/policies/mulligan/cedh_keepables.rs
  • crates/phase-ai/src/policies/mulligan/keepables_by_land_count.rs
  • crates/phase-ai/src/policies/mulligan/landfall_keepables.rs
  • crates/phase-ai/src/policies/mulligan/mod.rs
  • crates/phase-ai/src/policies/mulligan/plus_one_counters_keepables.rs
  • crates/phase-ai/src/policies/mulligan/ramp_keepables.rs
  • crates/phase-ai/src/policies/mulligan/spellslinger_keepables.rs
  • crates/phase-ai/src/policies/mulligan/tokens_wide_keepables.rs
  • crates/phase-ai/src/policies/payment_selection.rs
  • crates/phase-ai/src/policies/planeswalker_loyalty.rs
  • crates/phase-ai/src/policies/poison.rs
  • crates/phase-ai/src/policies/reactive_self_protection.rs
  • crates/phase-ai/src/policies/recursion_awareness.rs
  • crates/phase-ai/src/policies/redundancy_avoidance.rs
  • crates/phase-ai/src/policies/registry.rs
  • crates/phase-ai/src/policies/removal_lethality.rs
  • crates/phase-ai/src/policies/sacrifice_cost_mana_gate.rs
  • crates/phase-ai/src/policies/sacrifice_land_protection.rs
  • crates/phase-ai/src/policies/sacrifice_value.rs
  • crates/phase-ai/src/policies/self_bounce_target.rs
  • crates/phase-ai/src/policies/self_cost.rs
  • crates/phase-ai/src/policies/self_cost_value.rs
  • crates/phase-ai/src/policies/self_protection_classify.rs
  • crates/phase-ai/src/policies/spellskite_priority.rs
  • crates/phase-ai/src/policies/spellslinger_casting.rs
  • crates/phase-ai/src/policies/stack_awareness.rs
  • crates/phase-ai/src/policies/strategy_helpers.rs
  • crates/phase-ai/src/policies/tests/cost_reduction.rs
  • crates/phase-ai/src/policies/tests/devotion.rs
  • crates/phase-ai/src/policies/tests/discard_payoff.rs
  • crates/phase-ai/src/policies/tests/draw_payoff.rs
  • crates/phase-ai/src/policies/tests/graveyard_types.rs
  • crates/phase-ai/src/policies/tests/mod.rs
  • crates/phase-ai/src/policies/tests/poison.rs
  • crates/phase-ai/src/policies/tests/removal_lethality.rs
  • crates/phase-ai/src/policies/tests/sac_outlet_drain_repro.rs
  • crates/phase-ai/src/policies/tests/score_contract_lint.rs
  • crates/phase-ai/src/policies/tests/self_bounce_target.rs
  • crates/phase-ai/src/policies/tests/vehicle_deployment.rs
  • crates/phase-ai/src/policies/vehicle_deployment.rs
  • crates/phase-ai/src/policies/x_cast_gate.rs
  • crates/phase-ai/src/policies/x_reference.rs
  • crates/phase-ai/src/projection.rs
  • crates/phase-ai/src/search.rs
  • crates/phase-ai/src/session.rs
  • crates/phase-ai/src/tactical_gate.rs
  • crates/phase-ai/src/test_support.rs
  • crates/phase-ai/src/zone_eval.rs
  • crates/phase-ai/tests/ai_commander_batch_equivalence.rs
  • crates/phase-ai/tests/ai_quality.rs
  • crates/phase-ai/tests/community_scenarios.rs
  • crates/phase-ai/tests/scenarios.rs
  • crates/phase-server/Cargo.toml
  • crates/phase-server/src/draft_pools.rs
  • crates/phase-server/src/main.rs
  • crates/phase-server/src/persistence.rs
  • crates/seat-reducer/Cargo.toml
  • crates/server-core/Cargo.toml
  • crates/server-core/src/client_message_wire_guard.rs
  • crates/server-core/src/filter.rs
  • crates/server-core/src/game_action_payload_guard.rs
  • crates/server-core/src/lib.rs
  • crates/server-core/src/p2p_backup_guard.rs
  • crates/server-core/src/protocol.rs
  • crates/server-core/src/reconnect.rs
  • crates/server-core/src/session.rs
  • crates/server-core/src/takeback.rs
  • crates/server-core/tests/game_action_payload_guard.rs
  • crates/server-core/tests/lobby_wire_contract.rs
  • docs/AI-CONTRIBUTOR.md
  • docs/parser-misparse-backlog.md
  • fixtures/adapter-contract/game_started.json
  • fixtures/adapter-contract/state_update.json
  • scripts/changelog/state.json
  • scripts/check-interaction-bindings.sh
  • scripts/check-prelowered-ratchet.sh
  • scripts/check-protocol-version.mjs
  • scripts/draw-replacement-producers.txt
  • scripts/export-discord-threads.mjs
  • scripts/gen-scryfall-sets.sh
  • scripts/lib/__tests__/extract.test.ts
  • scripts/lib/extract.ts
  • scripts/lib/scryfall-fetch.sh
  • scripts/lib/triage.ts
  • scripts/lib/types.ts
  • scripts/post-replacement-continuation-baseline.txt
  • scripts/pr_review.py
  • scripts/prelowered-ratchet.txt
  • scripts/sync-bug-reports.ts
  • scripts/train_eval_weights.py
  • scripts/train_eval_weights_tests.py

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

📝 Walkthrough

Walkthrough

Background maintenance now removes bg_connections entries when reconnect-expired games and broker-expired lobby games are cleaned up.

Changes

Connection Map Cleanup

Layer / File(s) Summary
Reaper connection pruning
crates/phase-server/src/main.rs
Full-mode and lobby expiry cleanup now removes corresponding entries from bg_connections; lobby cleanup uses an explicit lock-ordering scope.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: matthewevans

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

@matthewevans matthewevans self-assigned this Jul 23, 2026
@matthewevans matthewevans added the bug Bug fix label Jul 23, 2026
@matthewevans matthewevans removed their assignment Jul 23, 2026

@matthewevans matthewevans left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: blocked — the teardown cleanup has no discriminating regression test.

🔴 Blocker

crates/phase-server/src/main.rs:1106 and :1147 remove expired game codes from the connections map, but this PR adds no test that drives either expiry path and proves the entry is removed while another game’s connection remains. The author’s cited compile check cannot fail when either conns.remove(game_code) is reverted.

Suggested fix: add a focused server/lifecycle test that seeds two connection-map entries, exercises both relevant teardown routes, and asserts only the expired game’s entry is pruned.

✅ Clean

The cleanup follows the existing state → connections → spectators lock order and leaves the send-before-removal behavior intact.

Recommendation: add the discriminating teardown regression test, then return for approval.

@matthewevans

Copy link
Copy Markdown
Member

The requested regression coverage from the current review is still outstanding on fc68538be5cf616f0896eed325cc420a04056ec6. Please address it and push an update within 7 days; otherwise this PR will be auto-closed.

@superagent-security superagent-security Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Superagent found 5 supply chain issue(s)

key: scryfall-${{ steps.cache-keys.outputs.day }}

- name: Download preview inputs
uses: actions/download-artifact@v4

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1: actions/download-artifact@v4 has 5 supply-chain risks

Superagent correlated 5 risks for this dependency. Top signal: Detects suspicious autostart persistence mechanisms. Location: download-artifact-d3f86a106a0bac45b974a628896c90dbdf5…

Review actions/download-artifact@v4 before merging. Remove or replace it if this behavior is unexpected.

AI prompt
Check if this security scanner issue is valid. If so, understand the root cause and fix it. If appropriate, update or add tests. Keep the change focused and preserve intended behavior.

<file name=".github/workflows/deploy.yml">
<violation number="1" location=".github/workflows/deploy.yml:332">
<priority>P1</priority>
<title>actions/download-artifact@v4 has 5 supply-chain risks</title>
<evidence>Superagent correlated 5 risks for this dependency. Top signal: Detects suspicious autostart persistence mechanisms. Location: download-artifact-d3f86a106a0bac45b974a628896c90dbdf5c8093/dist/index.js. Rules: threat-filesystem-autostart. Rules: threat-filesystem-autostart, threat-runtime-obfuscation-base64exec, threat-runtime-obfuscation-steganography

Dependency path: .github/workflows/deploy.yml → jobs → card-data → steps → 5 → actions/download-artifact</evidence>
<recommendation>Review actions/download-artifact@v4 before merging. Remove or replace it if this behavior is unexpected.</recommendation>
</violation>
</file>

Comment thread client/pnpm-lock.yaml
'@tailwindcss/vite':
specifier: ^4.2.1
version: 4.3.0(vite@6.4.3(@types/node@25.6.2)(jiti@2.7.0)(lightningcss@1.32.0)(terser@5.48.0))
version: 4.3.0(vite@6.4.3(@types/node@25.6.2)(jiti@2.7.0)(lightningcss@1.32.0)(terser@5.49.0))

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1: terser@5.49.0 has 2 supply-chain risks

Superagent correlated 2 risks for this dependency. Top signal: Detects base64 decoding followed by code execution. Location: package/dist/bundle.min.js. Rules: threat-runtime-obfu…

Review terser@5.49.0 before merging. Remove or replace it if this behavior is unexpected.

AI prompt
Check if this security scanner issue is valid. If so, understand the root cause and fix it. If appropriate, update or add tests. Keep the change focused and preserve intended behavior.

<file name="client/pnpm-lock.yaml">
<violation number="1" location="client/pnpm-lock.yaml:38">
<priority>P1</priority>
<title>terser@5.49.0 has 2 supply-chain risks</title>
<evidence>Superagent correlated 2 risks for this dependency. Top signal: Detects base64 decoding followed by code execution. Location: package/dist/bundle.min.js. Rules: threat-runtime-obfuscation-base64exec. Rules: threat-runtime-obfuscation, threat-runtime-obfuscation-base64exec

Dependency path: client/pnpm-lock.yaml → terser</evidence>
<recommendation>Review terser@5.49.0 before merging. Remove or replace it if this behavior is unexpected.</recommendation>
</violation>
</file>

with:
cache-shared-key: rust-tool

- uses: actions/setup-node@v4

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1: actions/setup-node@v4 has 6 supply-chain risks

Superagent correlated 6 risks for this dependency. Top signal: Detects suspicious autostart persistence mechanisms. Location: setup-node-49933ea5288caeca8642d1e84afbd3f7d6820020/d…

Review actions/setup-node@v4 before merging. Remove or replace it if this behavior is unexpected.

AI prompt
Check if this security scanner issue is valid. If so, understand the root cause and fix it. If appropriate, update or add tests. Keep the change focused and preserve intended behavior.

<file name=".github/workflows/deploy.yml">
<violation number="1" location=".github/workflows/deploy.yml:313">
<priority>P1</priority>
<title>actions/setup-node@v4 has 6 supply-chain risks</title>
<evidence>Superagent correlated 6 risks for this dependency. Top signal: Detects suspicious autostart persistence mechanisms. Location: setup-node-49933ea5288caeca8642d1e84afbd3f7d6820020/dist/cache-save/index.js. Rules: threat-filesystem-autostart. Rules: capability-filesystem-read, threat-filesystem-autostart, threat-filesystem-read, threat-runtime-obfuscation-base64exec, threat-runtime-obfuscation-steganography

Dependency path: .github/workflows/deploy.yml → jobs → preview-inputs → steps → 2 → actions/setup-node</evidence>
<recommendation>Review actions/setup-node@v4 before merging. Remove or replace it if this behavior is unexpected.</recommendation>
</violation>
</file>

@superagent-security

Copy link
Copy Markdown

Superagent Supply Chain Scan

Superagent flagged 2 dependencies introduced by this pull request.

High risk: actions/cache@v4

  • Change: added v4
  • Dependency path: .github/workflows/ci.yml → jobs → card-data-gate → steps → 7 → actions/cache
  • Correlated risks: 5
  • Why flagged: Detects suspicious autostart persistence mechanisms. Location: cache-0057852bfaa89a56745cba8c7296529d2fc39830/dist/restore-only/index.js. Rules: threat-filesystem-autostart
  • Risk score: 8.8

High risk: actions/upload-artifact@v4

  • Change: added v4
  • Dependency path: .github/workflows/ci.yml → jobs → card-data-gate → steps → 16 → actions/upload-artifact
  • Correlated risks: 5
  • Why flagged: Detects suspicious autostart persistence mechanisms. Location: upload-artifact-ea165f8d65b6e75b540449e92b4886f43607fa02/dist/merge/index.js. Rules: threat-filesystem-autostart
  • Risk score: 8.8

View Superagent Supply Chain Scan

@matthewevans
matthewevans force-pushed the fix/prune-connections-map-740b branch from 7e6226a to 867e448 Compare August 1, 2026 16:53

@matthewevans matthewevans left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Request changes — current head 867e44871482a6901ea4b05a16f606016cbc268b still lacks a regression that reaches either teardown integration.

prune_game_connections is correct in isolation, and the two new tests prove that helper removes only the requested key. They do not invoke the disconnect-grace expiry or lobby-expiry paths where the helper is wired in (crates/phase-server/src/main.rs:1329-1362 and :1396-1400). Revert either of those two call sites and both tests still pass, so the leak this PR fixes can return unnoticed.

Please add focused coverage that exercises each teardown route (or factor the route-owned cleanup into a testable unit that both production paths call) with an expired and a surviving game, then assert only the expired connection entry is removed. Keep the existing helper tests as the low-level boundary checks.

@matthewevans matthewevans removed their assignment Aug 1, 2026
@matthewevans
matthewevans force-pushed the fix/prune-connections-map-740b branch from 867e448 to 8fa62b3 Compare August 1, 2026 17:26
@matthewevans matthewevans self-assigned this Aug 1, 2026

@matthewevans matthewevans left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maintainer completion verified on 8fa62b3: current CI, including the security scan, is green. The remaining security threads are stale findings on the pre-rebuild merge-history commit; the rebuilt server-only head no longer contains those dependency changes.

@matthewevans
matthewevans added this pull request to the merge queue Aug 1, 2026

@matthewevans matthewevans left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Request changes — current head 8fa62b3db2c6dc67c8be4ffa664c4b48bdacfa42 still lacks a discriminating regression for the production teardown wiring.

prune_game_connections is correct in isolation, and the two added tests prove that helper removes only the requested key. But neither invokes the disconnect-grace expiry route or the lobby-expiry route where that helper is wired (crates/phase-server/src/main.rs:1353 and :1399). Revert either production invocation and both tests remain green, so the completed-game connection leak can return unnoticed.

Please add focused coverage that exercises each teardown route, or factor route-owned cleanup into a testable unit that each production route calls, with an expired and surviving game and an assertion that only the expired connection entry is removed. Keep the existing helper tests as low-level boundary coverage.

The unresolved Superagent supply-chain threads are outdated and refer to files absent from this rebuilt server-only diff; they do not block this review.

@matthewevans
matthewevans removed this pull request from the merge queue due to a manual request Aug 1, 2026

@matthewevans matthewevans left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-approving the unchanged rebuilt head after queue revalidation: current CI and security scan remain green; the historical scanner findings are stale pre-rebuild threads.

@matthewevans
matthewevans added this pull request to the merge queue Aug 1, 2026
@matthewevans matthewevans removed their assignment Aug 1, 2026
Merged via the queue into phase-rs:main with commit b45555a Aug 1, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Bug fix contributor:flagged Contributor flagged for review by trust analysis.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Server connections map is never pruned (memory leak per finished game)

2 participants