Repository navigation
Labels
enhancementNew feature or requestNew feature or requestp1Critical path of the current roadmap line, or a bug that hits real workflowsCritical path of the current roadmap line, or a bug that hits real workflowsready-for-implementationContract settled; an Engineer can implement without inventing a decisionContract settled; an Engineer can implement without inventing a decision
Description
Problem
The editor and the user need a Workshop-Inspector-like view of a run: which rules ran at which server frame, how variables changed, what was logged. The trace only has end-of-run state (logs, globals, players, hud), so nothing can be shown per frame.
Scope
- Add a
timelinetoTrace: one entry per tick that had activity (empty ticks omitted), in order. Each entry holds:tick,time(ms), the rule executions started or resumed on that tick (ruleindex and name,eventPlayerid or null, how it ended: finished, waiting with wake tick, aborted), and the state changes in execution order: global and player variable writes (name,indexpath when an array element,old,new), world-state changes (health/cooldown/ultimate), HUD element creation/destruction, log lines. - Bound the size: cap on entries with a
truncatedmarker, so a long Bastion run cannot blow up the JSON. Pick and document the cap. - Recording is part of the simulator; wasm32 build stays green. Existing fields keep their meaning. A run that ends
not_modeledstill returns the timeline up to the stop. - Document the JSON shape in
docs/simulator-interface.md. Add the shape todocs/scenario.schema.jsononly if the schema covers traces.
Acceptance criteria
- Test: a program with
Set Global Variable,Wait(0.5), then a second write yields timeline entries at the expected ticks with correctold/newand a wait wake tick. - Test: a
not_modeledstop keeps the entries before the stop. - Test: the cap truncates and sets the marker.
- Existing tests unchanged and green; standard gates and wasm32 build pass.
Non-goals
Any viewer UI (editor issue); new modeled constructs.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestp1Critical path of the current roadmap line, or a bug that hits real workflowsCritical path of the current roadmap line, or a bug that hits real workflowsready-for-implementationContract settled; an Engineer can implement without inventing a decisionContract settled; an Engineer can implement without inventing a decision
Activity
feat(sim): record a per-tick timeline in the trace