Skip to content

[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

Closed

Description

@bagusardin25

Verified against (commit SHA or released version)

main 5281202

Discord Username / User ID

bagusardin_

What does this improvement do?

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.

Activity

  1. added
    needs-triage
    hackathon
    on Oct 29, 2026
  2. fyZhang66 commented on Oct 31, 2026

    @fyZhang66
    Contributor

    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.

    No new dependency. Comment /assign to claim it.

  3. added
    accepted
    and removed
    needs-triage
    on Oct 31, 2026
  4. bagusardin25 commented on Oct 31, 2026

    @bagusardin25
    ContributorAuthor

    /assign

  5. added
    in-progress
    on Oct 31, 2026
  6. testsprite-hob commented on Oct 31, 2026

    @testsprite-hob

    Assigned to @bagusardin25. Thanks for taking this on. (1 more slot available.)

    Your open assigned issues (2/3):

  7. added a commit that references this issue on Nov 10, 2026
    dfb4b78
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

acceptedhackathonin-progress

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions