Skip to content

Pair End with For loops and simulate For Global/Player Variable #50

Description

@e54-bot

Problem

After athena#46 (PR #49), Bastion (/Users/teakowa/Repos/wrightkit/.task-scratch/bastion/bastion.ow, scenario .../bastion/scen.json; run per .task-scratch/bastion-loop-state.md) stops with not_modeled: "End without an opening action", tick null, in rule initialize hero list. block_maps in blocks.rs does not track For/For Global Variable/For Player Variable openers, so the End of a For loop is unpaired.

Scope

  • Make the block map pair End with all Workshop block openers used by Bastion (For Global Variable, For Player Variable, While, Loop If-free forms, If/Else If/Else).
  • Model For Global/Player Variable execution (range start, stop, step; the loop variable written each iteration) only as far as the Workshop semantics in workshop-rs define it. A behavior without a passing capture fixture is recorded in docs/findings.md as modeled-not-measured, per AGENTS.md.

Acceptance criteria

  • Tests: a rule with a For Global Variable loop containing an If runs to the expected variable values; a For inside If pairs its End correctly; an End without an opener still stops not_modeled.
  • The Bastion run moves past this stop; record the next stop in the PR body.
  • Standard gates (fmt, clippy -D warnings, tests, wasm32 build) and docs updates in the same PR.

Activity

  1. added
    enhancementNew feature or request
    ready-for-implementationContract settled; an Engineer can implement without inventing a decision
    p1Critical path of the current roadmap line, or a bug that hits real workflows
    on Oct 25, 2026
  2. added theissue type on Oct 25, 2026
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

    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