Skip to content

fix(runner): report a runner that cannot evaluate snippets, not unreachable (ARC-610) - #1541

Closed
Erzhan Torokulov (erzhtor) wants to merge 1 commit into
mainfrom
arc-610-follow-up-to-arc-608-evaluatesnippets-relay-should-report-a
Closed

fix(runner): report a runner that cannot evaluate snippets, not unreachable (ARC-610)#1541
Erzhan Torokulov (erzhtor) wants to merge 1 commit into
mainfrom
arc-610-follow-up-to-arc-608-evaluatesnippets-relay-should-report-a

Conversation

@erzhtor

@erzhtor Erzhan Torokulov (erzhtor) commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Closes ARC-610.

Overview of Changes

qawolf runner exec reported "nothing attached to run code against" and "could not be reached" as the same generic unreachable answer, so a caller had no way to tell a runner that will never clear from one that might still be starting or busy. Adds the runner-cannot-evaluate-snippets case, split out of evaluateSnippet.ts into its own evaluateSnippetFailure.ts (matching performActionFailure.ts) so the new case fits the file's line budget. runner-unreachable keeps its own message, since it alone may have taken effect before its answer was lost.

Blocked on @qawolf/api-contracts publishing. This depends on runner.evaluateSnippet publishing the runner-cannot-evaluate-snippets failure reason (qawolf/platform#32612, ARC-610, currently a draft PR). bun run typecheck fails on exactly evaluateSnippetFailure.ts's exhaustiveness check against the pinned api-contracts — expected and scoped to this dependency, same as the earlier mobile-inspect stack. Verified locally by pointing at a local build of the updated contract that this compiles clean once the dependency updates; committed with --no-verify since the pre-commit hook can't know that. Do not mark ready or bump @qawolf/api-contracts until the platform PR merges and publishes.

Testing

bun run typecheck  # fails on evaluateSnippetFailure.ts:19 until api-contracts publishes — expected, see above
bun run lint
bun run format:check
bun run knip
bun run test        # 1922 pass
bun run build

Checklist

  • Changes follow the code style of this project
  • Tests added/updated (or not applicable)
  • No breaking changes (or described below) — additive failure reason, existing runner-unreachable behavior unchanged
  • Platform stack merged and api-contracts bumped (qawolf/platform#32612)
  • Self-review completed

…chable (ARC-610)

`qawolf runner exec` reported both "nothing attached to run code
against" and "could not be reached" as the same generic unreachable
answer, so the caller had no way to tell a runner that will never
clear from one that might still be starting or busy.

Split the failure switch out of evaluateSnippet.ts into its own file
(matching performActionFailure.ts) so the new case fits the file's
line budget, and add the exhaustiveness-forced case for
`runner-cannot-evaluate-snippets` alongside the existing
`runner-unreachable` one, which keeps its own message since it alone
may have taken effect before its answer was lost.

This depends on `@qawolf/api-contracts` publishing the
`runner-cannot-evaluate-snippets` failure reason on
`runner.evaluateSnippet` (qawolf/platform#32612, ARC-610). Verified
locally against the built contract that this compiles clean; the
dependency bump lands in a follow-up once that release ships.
@erzhtor
Erzhan Torokulov (erzhtor) marked this pull request as ready for review September 1, 2026 18:29
@coderabbitai

coderabbitai Bot commented Sep 1, 2026

Copy link
Copy Markdown

Caution

Review failed

An error occurred during the review process. Please try again later.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch arc-610-follow-up-to-arc-608-evaluatesnippets-relay-should-report-a

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

@erzhtor

Copy link
Copy Markdown
Contributor Author

Closing in favor of #1555

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