Skip to content

fix: propagate eval failures in CLI exit code#284

Open
thesollyz wants to merge 1 commit intomainfrom
codex/fix-axiom-eval-exit-code
Open

fix: propagate eval failures in CLI exit code#284
thesollyz wants to merge 1 commit intomainfrom
codex/fix-axiom-eval-exit-code

Conversation

@thesollyz
Copy link
Collaborator

@thesollyz thesollyz commented Mar 12, 2026

Fixes #283.

Summary

  • propagate Vitest's failure state through axiom eval instead of always exiting 0 on the normal non-watch path
  • respect dangerouslyIgnoreUnhandledErrors so ignored unhandled errors do not force a failing exit code
  • add focused regression coverage for success, failed tests, failed modules, unhandled errors, ignored unhandled errors, list mode, and validation aborts

New behavior

axiom eval now exits with a nonzero status when eval suites fail on the normal non-watch path, matching CI expectations. If a project enables Vitest's dangerouslyIgnoreUnhandledErrors, ignored unhandled errors continue to be non-fatal.

Validation

  • pnpm --filter axiom exec vitest run test/evals/run-vitest.test.ts
  • pnpm --filter axiom typecheck
  • pnpm --filter axiom test -- run test/evals/run-vitest.test.ts

Note

Medium Risk
Changes the CLI/evals runner process exit behavior, which can affect CI outcomes and downstream scripts; failure detection now depends on Vitest result fields and config flags.

Overview
axiom eval now propagates Vitest execution failures via its exit code on the normal non-watch path instead of always exiting 0.

Failure detection is centralized in hasVitestFailures, covering failed test counts, failed/invalid modules, and unhandled errors while respecting Vitest’s dangerouslyIgnoreUnhandledErrors.

Adds a dedicated run-vitest.test.ts suite to regression-test exit codes across success, failed tests/modules, unhandled/ignored errors, list mode (no execution), and validation abort handling.

Written by Cursor Bugbot for commit 6c2b10c. This will update automatically on new commits. Configure here.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Mar 12, 2026

Open in StackBlitz

npm i https://pkg.pr.new/axiom@284

commit: 3b6ba95

@thesollyz thesollyz force-pushed the codex/fix-axiom-eval-exit-code branch from 2fca7f1 to 6c2b10c Compare March 12, 2026 00:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

axiom eval exits 0 when eval suites fail

1 participant