Skip to content

[Hackathon] fix(testlist): testlist run --wait exits 0 when some cases were refused or are already in flight #703

Closed as not planned

Description

@neromtoobad

Verified against (commit SHA or released version)

commit a18d37c

Discord Username / User ID

neromtoobad

What does this improvement do?

testlist run --wait gates a batch on its accepted runs only. When the POST returns a mixed batch, some cases accepted and some in conflicts, only the accepted runs are polled, and the exit code ignores the conflicts. Two cases:

  • One case passes, and another is refused ({testId:'case-b', reason:'insufficient_credits'}). The command exits 0 with Test-list run complete: 1/1 passed, 0 failed/blocked, 0 timed out.
  • One case passes, and another is already in flight ({testId:'case-b', currentRunId:'run_b_inflight'}) and failing. The command exits 0; run_b_inflight is never polled or mentioned.

test run --all --wait handles the same shape with exit 6. See test.run.spec.ts: "a credits conflict beside an accepted run is a hard conflict after the poll: exit 6, not 12", and "mixed batch … exits 6". #380 fixed the same kind of bug for test rerun --all --wait. testlist run --wait is a CI gate, so a list that overlaps a scheduled run of itself, or that is partly refused for credits, goes green although those cases never ran.

Details / implementation notes

  • Root cause: in src/commands/testlist.ts, the only conflict gate is the all-conflict branch (accepted.length === 0 && conflicts.length > 0). The mixed path's tail (resolveWaitFailure, assertNoNotFound) never looks at resp.conflicts, and the "N/M passed" line uses accepted.length as the total.
  • Fix (PR ready):
    • After the existing gates, any remaining conflict ends the wait with exit 6, naming the cases and any in-flight runs to follow (testsprite test wait <runId>).
    • The summary line adds ", N not run (conflict)".
    • This invocation never adopts another run's verdict, which is the same choice test run makes under --ci.
    • Two unit tests, which fail before the change. The testlist specs pass.

Confirmations

  • I have searched existing issues and this is not a duplicate.
  • I have provided my Discord identity above for reward coordination.

Activity

  1. neromtoobad commented on Oct 29, 2026

    @neromtoobad
    Author

    /assign

  2. testsprite-hob commented on Oct 29, 2026

    @testsprite-hob

    Thanks for the interest, @neromtoobad! This issue hasn't been accepted for implementation yet — see the triage comment (a maintainer will label it accepted once it is). Feel free to check back, or ping us on Discord if it's been quiet.

  3. fyZhang66 commented on Oct 31, 2026

    @fyZhang66
    Contributor

    Thanks @neromtoobad, confirmed and already decided in #380: testlist run will follow test run --all (exit 6 on a mixed batch) as part of the 1.0 exit-code changes, since changing it in 0.x would break existing CI scripts — tracked internally as DEV-2180. Closing this and #706 as not planned.

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

    hackathonCLI hackathon submissions

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions