feat(runner): key a runner run to its flow with --flow-id - #1628
Draft
Huishi (huishi329) wants to merge 4 commits into
Draft
Huishi (huishi329) wants to merge 4 commits into
Huishi (huishi329) wants to merge 4 commits into
Conversation
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.
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueComment |
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.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Relates to qawolf/platform#33638 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 sawundefined.qawolf runner runnow takes--flow-id, the flow the run is for, and the platform stamps it onto the run asQAWOLF_WORKFLOW_ID, like a platform run of that flow gets. The runner SDK'srunverb takes the sameflowId. Runs that name no flow are unchanged, and the CLI's ownQAWOLF_WORKFLOW_IDis deliberately not read: only an AI Job's pod has one, and it names the pod's flow, not every flow run from there.The bump to
@qawolf/api-contracts0.64.0 also bringsrunner.recordandrunner.recordings, added to the hand-written runner skip list so the generator does not mint them.Blocked on publishing. 0.64.0 comes from qawolf/platform#33638 and is not on npm yet, so
bun.lockis untouched. Once it is published:bun install, commit the lockfile, and CI can run. Verified locally against the platform branch's built 0.64.0.Testing
bun run typecheck bun run lint bun run format:check bun run knip bun run testAll pass locally: 2613 tests, including
runFlow.flowId.test.ts(flag sent, trimmed, absent, ambient variable ignored, blank flag refused) and the refreshedrunner run --helpsnapshot.Checklist
🤖 Generated with Claude Code