You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Hackathon] fix(test): the in-flight re-trigger hint leaves --env unquoted, so a multi-word environment name is parsed as another test id #708
test run --wait attaches to a run that is already in flight and prints a re-trigger command. The environment name in that command is not shell-quoted. A name with a space is parsed as a second test id, so the command the hint tells the user to paste does not re-run the one test against the environment the CLI just verified.
verifyInFlightRunEnvironment returns --env ${currentEnvironment.name}. The advisory then prints:
then re-trigger with testsprite test run <test-id> --env QA West.
### Details / implementation notes
**Details / implementation notes**
```markdown
**Cause:** `src/commands/test.ts` `verifyInFlightRunEnvironment` returns the unquoted flag. The only caller interpolates it into the auto-resume advisory (`then re-trigger with testsprite test run ...`).
**Proposed scope:**
- Return `--env ${quoteEnvironmentName(currentEnvironment.name)}`. `quoteEnvironmentName` is already imported in this file.
- `src/commands/test.run.spec.ts` "auto-resume advice uses the resolved $name environment" currently expects the unquoted form for `staging`, `local-dev`, `local-http`, `local-ipv6`, and `local-https`. Point that assertion at `quoteEnvironmentName(name)`. Add `QA West` and `Owner's QA`.
- No new command, flag, or dependency.
**Not a duplicate of #560.** That issue is `confirmRequestedEffects` in `src/commands/project-env.ts`: the recovery command after an old server drops `--var` / `--clear-credentials` on `project env update`. This is the live `test run --wait` in-flight advisory. Fixing #560 does not change this string.
### Confirmations
- [x] I have searched existing issues and this is not a duplicate.
- [x] I have provided my Discord identity above for reward coordination.
Confirmed on v0.15.0, thanks @bagusardin25. verifyInFlightRunEnvironment returns --env ${name} unquoted while every other --env hint in the CLI goes through quoteEnvironmentName, so this one re-trigger line breaks for a name with a space. Accepted, scope:
Return --env ${quoteEnvironmentName(currentEnvironment.name)}; nothing else in the advisory changes.
Tests (must fail before the fix): point the existing "auto-resume advice uses the resolved environment" assertion at the quoted form, and add QA West and Owner's QA cases.
Activity
fyZhang66 commentedon Oct 31, 2026
Confirmed on v0.15.0, thanks @bagusardin25.
verifyInFlightRunEnvironmentreturns--env ${name}unquoted while every other--envhint in the CLI goes throughquoteEnvironmentName, so this one re-trigger line breaks for a name with a space. Accepted, scope:--env ${quoteEnvironmentName(currentEnvironment.name)}; nothing else in the advisory changes.QA WestandOwner's QAcases.No new dependency. Comment
/assignto claim it.bagusardin25 commentedon Oct 31, 2026
/assign
testsprite-hob commentedon Oct 31, 2026
Assigned to @bagusardin25. Thanks for taking this on. (1 more slot available.)
Your open assigned issues (2/3):
fix(test): quote the environment name in the in-flight re-trigger hint (