Skip to content

runUntil with maxSteps reports $stop as a timeout #1464

Closed

Description

@tignear

Simulation::run_until_bounded (crates/celox/src/simulation.rs) returns false both when the step budget runs out and when a step stops at $stop. The TypeScript Simulation.runUntil(endTime, { maxSteps }) (packages/celox/src/simulation.ts) turns any false into a SimulationTimeoutError. So a design that runs $stop before endTime throws a timeout, and the caller can't get the normal return it needs to check isStopped().

Fix: give the stop its own result, or have the binding check isStopped() before treating false as a timeout. Add a test for $stop under runUntil with maxSteps.

Found by Codex in the review of #1432 (#1432 (comment)). The code comes from #1402.

Activity

  1. added a commit that references this issue on Oct 18, 2026
    85a9753
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