fix(sim): report failed, canceled and incomplete runs instead of a false pass - #58
Open
scott-lowe-vapi wants to merge 1 commit into
Open
scott-lowe-vapi wants to merge 1 commit into
scott-lowe-vapi wants to merge 1 commit into
Conversation
…lse pass `npm run sim` read a `results` field the simulation-run API doesn't return and counted `status === "pass"` (items are `passed`/`failed`), so every watched run summarised as 0/0 and exited 0, including failing runs. - src/sim-result.ts: strict, pure verdict. Passed only when the run ended, every expected item exists and passed, and each had a required evaluation that was actually scored; otherwise failed or incomplete with a reason. - src/sim.ts: read run items (paginated or bare array, deduped by id), wait for late item results, print the run link from the create response and the failing judges, cancel the run on --timeout (default 20 min) or Ctrl-C. - src/vapi-client.ts: config-free client; run creation is never retried on a 5xx, since the run may already be queued. - src/sim-cmd.ts: exported simCommandRun; exit 0 passed, 1 failed, 2 usage, 3 incomplete; --no-watch prints the link and exits 0. - Docs: run/item shapes and the verdict in docs/learnings/simulations.md, sim rows in README and AGENTS.md, improvements.md #33. Refs TEST-141 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
scott-lowe-vapi
force-pushed
the
fix/sim-false-green
branch
from
October 1, 2026 23:11
8a438bc to
06a1492
Compare
Contributor
Author
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
This was referenced Oct 1, 2026
scott-lowe-vapi
marked this pull request as ready for review
October 1, 2026 23:52
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Value
V.A.L.U.E. tier: project — PR 2 of 10 for inline simulation PR checks (TEST-141). Stacked on #57.
npm run simreported every run as passed. It read aresultsfield the simulation-run API doesn't return and countedstatus === "pass"(items arepassed/failed), so it always summarised 0/0 and exited 0, failing runs included.npm run sim, locally or in CI. The PR check (later in this stack) reuses this verdict, so it has to be right.src/sim-result.ts).--timeoutand Ctrl-C both cancel the run.Evidence of value
Same stub API, one passed and one failed item:
main'ssim.ts{"pass":0,"fail":0}→ exits 0 (false green)failed — 1 of 1 simulations failed→ exits 1Live, against a test org (chat transport):
✗ … open-24h (expected = true, got false)— runpassed — 1 of 1 simulations passed— runThe temporary resources were deleted afterwards.
Testing plan
tests/sim-result.test.tsis a verdict table covering:results);itemCounts, and a run that hasn't ended.tests/sim-run.test.tsrunsrunSimulationagainst a local HTTP stub:--no-watch;npm run buildandnpm testpass (377 tests).runningwhen it's canceled (cancel was only exercised against the stub), and voice transport (the live runs used chat). Default behaviour change: unknown CLI arguments are now an error (exit 2) instead of being silently ignored.Refs TEST-141
🤖 Generated with Claude Code