Skip to content

Instantiate Each Player rules by team and player filter #46

Description

@e54-bot

Problem

Reference workload: /Users/teakowa/Repos/wrightkit/.task-scratch/bastion/bastion.ow (Bastion mode, 291 rules) with scenario /Users/teakowa/Repos/wrightkit/.task-scratch/bastion/scen.json. Run it with cargo run --release -- <ow> <scenario> in /Users/teakowa/Repos/wrightkit/.task-scratch/bastion-run (calls athena_sim::run_scenario and prints the trace). Today it ends not_modeled at rule Update targetPlayer when player left: event team or player filter, tick null.

sched.rs rejects every Event::Player whose team or target is not All. Bastion has 202 Ongoing - Each Player rules, 158 of them with Team 2/Team 1 or a slot/target filter. No such rule can run.

Scope

  • Instantiate each Each Player rule once per scenario player that matches its team filter (All, Team 1, Team 2) and player-slot filter (All, Slot N, Host... as the Workshop event definitions in workshop-rs list them), with Event Player bound to that player.
  • Each instance has its own wait state and trigger state, as a per-player rule does in the game. Follow the layer rules in docs/architecture.md: if the behavior has no passing capture in probes/, record the gap in docs/findings.md as modeled-not-measured per the existing convention; do not claim it as measured.
  • Event types other than ongoing (Player Died, Player Joined Match, ...) stay out of scope (see the player-events issue).

Acceptance criteria

  • A unit test with a two-player scenario shows a Team 2 rule fires only for the team 2 player, and Event Player reads that player.
  • A rule filtered to a team with no player never fires and does not stop the run.
  • The Bastion run no longer stops with event team or player filter; record the next stop in the PR body.
  • docs/simulator-interface.md and docs/architecture.md describe the new behavior in the same PR.
  • cargo fmt --check, cargo clippy --all-targets -- -D warnings, cargo test and the wasm32 build pass.

Non-goals

Other event kinds; frame timeline; extra constructs Bastion hits later.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestp1Critical path of the current roadmap line, or a bug that hits real workflowsready-for-implementationContract settled; an Engineer can implement without inventing a decision

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions