Skip to content

feat(runner): key a runner run to its flow with --flow-id - #1628

Closed
Huishi (huishi329) wants to merge 5 commits into
mainfrom
huishi/runner-run-flow-id
Closed

Huishi (huishi329) wants to merge 5 commits into
mainfrom
huishi/runner-run-flow-id

Conversation

@huishi329

@huishi329 Huishi (huishi329) commented Sep 22, 2026 •

Copy link
Copy Markdown

Relates to qawolf/platform#34164 and Linear GRI-426.

Overview of Changes

Flows run on an interactive runner never received QAWOLF_WORKFLOW_ID, so a flow that keys its fixtures and cleanup on that id saw undefined. The platform now finds the flow from the entry point on the environment's flow-code branch (qawolf/platform#34164), and qawolf runner run --flow-id names it when that lookup cannot: the run uses --env-file, the environment has no branch, or the entry point is a file the branch does not know yet. The run receives the id as QAWOLF_WORKFLOW_ID, like a platform run of that flow does. The runner SDK's run verb takes the same flowId.

Runs that name no flow are unchanged, and the CLI's own QAWOLF_WORKFLOW_ID is deliberately not read: only an AI Job's pod has one, and it names the pod's flow, not every flow run from there.

@qawolf/api-contracts 0.74.0, already on main, carries runner.runFlow's flowId, so nothing is pinned or blocked here.

Testing

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

All pass locally: 2678 tests, including runFlow.flowId.test.ts (flag sent, trimmed, absent, ambient variable ignored, blank flag refused) and the refreshed runner run --help snapshot.

Checklist

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

🤖 Generated with Claude Code

@coderabbitai

coderabbitai Bot commented Sep 22, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

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

A run on an interactive runner never saw QAWOLF_WORKFLOW_ID, so a flow that
names and cleans up fixtures by it read undefined and Tester took the id for
unavailable. `qawolf runner run --flow-id` names the flow, falling back to
QAWOLF_WORKFLOW_ID from the shell, which the pod an AI Job runs on exports;
the platform stamps it onto the run as QAWOLF_WORKFLOW_ID. The runner SDK's
run verb takes the same flowId.

Takes @qawolf/api-contracts 0.64.0, which carries the field. That version
also adds runner.record and runner.recordings, listed with the rest of the
hand-written runner group so the generator does not mint them.
The old wording said the run falls back to the variable, which reads as the
run reading the id it is about to be given. The CLI reads it, from its own
shell. Show the fixture-name convention the flag exists for instead of
naming it in the abstract.
The fallback read QAWOLF_WORKFLOW_ID from the CLI's own environment. Only an
AI Job's pod holds it, and there it is the id of that pod's own flow, not of
whatever flow the run is for. An agent on such a pod routinely runs sibling
flows, so the fallback would key those runs to the wrong flow and strand
their fixtures in another flow's namespace.

The flag is now the only source. A test pins that an ambient
QAWOLF_WORKFLOW_ID is ignored, so the fallback is not reintroduced.
Same facts in fewer words across the help text, changeset, skill, reference
and the helper's comment.
…int lookup

qawolf/platform#34164 finds the flow from the entry point on the environment's
flow-code branch, so the flag is for runs that lookup cannot cover.
@huishi329
Huishi (huishi329) force-pushed the huishi/runner-run-flow-id branch from bf3a8dc to fbaa1ad Compare October 1, 2026 18:52
@huishi329

Copy link
Copy Markdown
Author

Superseded by qawolf/platform#34164, which resolves the flow from the entry point on the server.

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.

1 participant