hotfix(runner): default --env-id to QAWOLF_ENVIRONMENT - #1532
Merged
Atchyut Preetham Pulavarthi (theonly1me) merged 1 commit intoAug 28, 2026
Merged
Conversation
…e and --env-id are not specified
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (9)
Walkthrough
Estimated code review effort: 2 (Simple) | ~10 minutes Sequence Diagram(s)sequenceDiagram
participant RunnerCLI
participant handleRunnerRun
participant prepareRun
participant ProcessEnv
participant AuthContext
RunnerCLI->>handleRunnerRun: start runner run
handleRunnerRun->>prepareRun: prepare environment
prepareRun->>ProcessEnv: read QAWOLF_ENVIRONMENT
ProcessEnv-->>prepareRun: environment value
prepareRun-->>handleRunnerRun: resolved environment ID
handleRunnerRun->>AuthContext: report selected environment
AuthContext-->>RunnerCLI: emit informational message
Suggested reviewers: ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Atchyut Preetham Pulavarthi (theonly1me)
marked this pull request as ready for review
August 28, 2026 16:14
Jason Allen (JAllen2022)
approved these changes
Aug 28, 2026
QAWOLF_ENVIRONMENT
Goran Gajic (gorangajic)
approved these changes
Aug 28, 2026
Atchyut Preetham Pulavarthi (theonly1me)
merged commit Aug 28, 2026
8d48a2e
into
main
6 of 7 checks passed
Atchyut Preetham Pulavarthi (theonly1me)
deleted the
hotfix/nova-1676-fix-cli-deafult-env
branch
August 28, 2026 16:17
Merged
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.
Overview of Changes
A
qawolf runner runthat names no environment gets none. Anyone who already exportsQAWOLF_ENVIRONMENT, the variableqawolf flowsreads and the documented way to set a default, has to repeat it as--env-idon every run. In CI that is easy to miss, and the run executes against no environment rather than failing.qawolf runner runnow falls back toQAWOLF_ENVIRONMENTwhen neither--env-idnor--env-fileis passed, so one export covers both commands.--env-idwins over it, and--env-filesuppresses it, so a run reading a dotenv file is not handed a second environment on top. A blank or unset variable counts as absent rather than being sent as an empty id the server would reject.usingFromEnvVarmessageqawolf flowsalready prints. It fires only for the fallback, never for an explicit flag. Those variables reach your flow's code, so a run should not be given an environment silently.--env-idtogether with--env-file, and a blank--env-id.This reverses a deliberate choice from #1530, which made
--env-idexplicit-only. That was right whenrunner runhad no environment concept. Now that it has one, matchingqawolf flowsis the less surprising behaviour.Behaviour change on upgrade: a run with no env flags, in a shell exporting
QAWOLF_ENVIRONMENT, now sends that environment where 1.17.0 sent none.Testing
bun run typecheck bun run lint bun run format:check bun run knip bun run test1856 tests pass. Four new cases in
runFlow.environment.test.ts: the fallback applies and announces,--env-idbeats the variable,--env-filesuppresses it, and a blank variable is ignored.makeTestDepsalready defaultedenv: {}, so no existing test picks the variable up by accident.The fallback case was checked against a revert rather than trusted because it passed: replacing the resolution with
const environmentId = explicitEnvIdmakes that test fail, and restoring it makes it pass again. The other three pass either way by design, pinning the boundaries rather than the new behaviour.Checklist