Skip to content

fix(flows): exit 2 when flows run selects no runnable flow - #1519

Merged
Simon Ingeson (smonn) merged 7 commits into
mainfrom
simon/wiz-11675-ticket-87264d
Aug 24, 2026
Merged

fix(flows): exit 2 when flows run selects no runnable flow#1519
Simon Ingeson (smonn) merged 7 commits into
mainfrom
simon/wiz-11675-ticket-87264d

Conversation

@smonn

@smonn Simon Ingeson (smonn) commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Relates to WIZ-11675

Overview of Changes

flows run exited 0 when its pattern selected nothing, so a typo'd pattern reported success with nothing run. It now exits 2, as the --env path already did. Two cases beyond the ticket's repro close the same hole: files that declare no target, and a selection of only iOS, Basic, or Electron flows. --allow-no-match restores exit 0.

Testing

Reverting either guard turns 5 and 2 tests red. Ran the built binary against fixture flows for each case.

bun run typecheck
bun run lint
bun run format:check
bun run knip
bun run test
bun run build

Checklist

  • Changes follow the code style of this project
  • Self-review completed
  • Tests added/updated (or not applicable)
  • No breaking changes (or described below)

CI that currently passes on an empty selection starts failing. That is the bug. Only the no-target case was outside the repro; keep it at exit 2?

Plumbing only; no behavior change yet. The flag and the two new messages are wired in the following commits.
A selection of only iOS, Basic, or Electron flows reported success with
nothing executed, as did a selection of flows that declare no target.

Refs WIZ-11675
The exit code and the --allow-no-match downgrade were triplicated across the
two command handlers and the runner, so changing the policy meant three edits.
The local path told the user to run 'qawolf flows run --allow-no-match',
which drops the pattern they typed and runs every flow. The --env path never
mentioned the flag at all. Also records the new cause of exit 2 in the
exit-code contract.
@coderabbitai

coderabbitai Bot commented Aug 21, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your current included review allowance is based on your included PR review attempts over the past 7 days.

Next review available in: 45 seconds

Limit details: You’ve used all 3 included reviews currently available. Your 49 included PR review attempts over the past 7 days set your current allowance at 3 reviews per hour.

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

Wait for the limit to reset, then comment @coderabbitai review or push new commits to the PR.

An organization admin can change what happens after included review limits in Billing.

How do review limits work?

CodeRabbit enforces per-developer PR review limits within each organization.

For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 5c1cbc69-3db4-430e-acb4-b2a1654d45a2

📥 Commits

Reviewing files that changed from the base of the PR and between b557313 and 7a9065c.

⛔ Files ignored due to path filters (1)
  • src/commands/__snapshots__/help.test.ts.snap is excluded by !**/*.snap
📒 Files selected for processing (16)
  • .changeset/tame-donkeys-listen.md
  • docs/exit-codes.md
  • src/commands/flows/hybridRun.test.ts
  • src/commands/flows/hybridRunDefaults.ts
  • src/commands/flows/run.register.ts
  • src/commands/flows/runDefaults.handle.test.ts
  • src/commands/flows/runDefaults.reporterWiring.test.ts
  • src/commands/flows/runDefaults.ts
  • src/commands/flows/runStagedFlows.testUtils.ts
  • src/core/messages/runner.ts
  • src/domains/runner/noMatch.test.ts
  • src/domains/runner/noMatch.ts
  • src/domains/runner/run.fixtures.ts
  • src/domains/runner/run.test.ts
  • src/domains/runner/run.ts
  • src/domains/runner/runInternals.ts

Comment @coderabbitai help to get the list of available commands.

@smonn
Simon Ingeson (smonn) marked this pull request as ready for review August 21, 2026 19:36
@smonn
Simon Ingeson (smonn) merged commit 835fb6e into main Aug 24, 2026
7 checks passed
@smonn
Simon Ingeson (smonn) deleted the simon/wiz-11675-ticket-87264d branch August 24, 2026 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants