Skip to content

Simulation start crashes when LLM writes time_config values as strings #28

@wbryanta

Description

@wbryanta

Problem

simulation_runner.py line 353 performs arithmetic on time_config values read from JSON:

total_rounds = int(total_hours * 60 / minutes_per_round)

If the LLM writes "60" (string) instead of 60 (int) during config generation, this raises unsupported operand type(s) for /: 'int' and 'str' and returns a 500 on simulation start.

Fix

Cast total_simulation_hours and minutes_per_round to int() before arithmetic. One-line change, no behavior difference for well-formed configs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions