Skip to content

Read the match phase from the scenario for Is In Setup and its siblings #101

Closed

Description

@e54-bot

Problem

After #99, Bastion on athena main (docs/scenario-examples/valid/bastion.json plus buttons for every slot and a slot per player) ends not_modeled at tick 0:

{ "status": "not_modeled", "construct": "value isInSetup", "tick": 0,
  "location": { "rule": 187, "name": "[Bastion] Freeze match time", "condition": 0 } }

Bastion reads the match phase through Is In Setup, Is Assembling Heroes and Is Game In Progress (rule 187 Is In Setup == False; another rule Or(Or(Is In Setup, Is Assembling Heroes), Is Game In Progress) == True).

Design

The match phase is a scenario fact; the simulator does not run a match. Follow the absent-input invariant: add an optional top-level scenario field matchPhase taking one catalog-backed phase id (look up the exact set the three reads and the sibling phase reads — Is Match Complete, Is Waiting For Players, Is Between Rounds if present in the catalog — describe, and use only phases the catalog defines; do not invent phases). Each phase read answers true exactly for its own phase and false for the others. When matchPhase is absent, any phase read ends missing_input named matchPhase. An unknown value is rejected at load. No default.

Check whether any read in the catalog description is true across two phases (for example "game in progress" including overtime); if the catalog text does not settle the relation, make that phase read not_modeled and say so rather than guess.

Scope

  • scenario.rs, eval.rs/call.rs: parse, validate and implement the phase reads.
  • Docs: docs/scenario-format.md (field table, modeled reads, missing inputs), docs/simulator-interface.md, schema file, and docs/findings.md for any modeled-not-measured relation.
  • Add matchPhase to docs/scenario-examples/valid/bastion.json (choose the phase that lets the match run: game in progress, if the catalog has it) and a negative example.

Acceptance

  • Tests: each phase read true/false for each declared phase; absent gives missing_input naming matchPhase; unknown value rejected; schema test picks up the examples.
  • Bastion rerun with buttons for every slot and slot: report the new first stop, or completion. Parent: Run Bastion to completion on athena-sim #45.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions