Skip to content

Run production smoke CLI from workspace paths with spaces #6

Closed

Description

@sarthakagrawal927

Problem

pnpm smoke:prod can exit 0 without running any checks when invoked from a checkout path containing spaces. scripts/production-smoke.mjs compares import.meta.url with a file:// string built from the raw process.argv[1]; Node percent-encodes spaces in import.meta.url, so the direct-execution guard does not match in managed macOS workspaces.

Acceptance

  • Detect direct execution with a URL-safe comparison such as pathToFileURL(process.argv[1]).href.
  • Add a regression check that exercises a script path containing spaces.
  • Verify pnpm smoke:prod prints the six public check results and returns nonzero if a check fails.

Observed during RolePatch Precise footer release on 2026-10-05: the direct command returned 0 with no smoke output from the managed workspace. Importing and calling runProductionSmoke() explicitly then passed 6/6 public checks.

Activity

  1. sarthakagrawal927 commented on Oct 5, 2026

    @sarthakagrawal927
    MemberAuthor

    Completed in PR #7 and merged to main as 2a6b0be. The direct-execution check now compares against pathToFileURL(process.argv[1]).href. The regression runs the CLI from a workspace path containing spaces, asserts all six public check result lines in order, and verifies a fixture with one failed check reports 5/6 and exits 1. Before the fix, the same spaced-path CLI reproduced the silent exit 0; the regression failed against that behavior and passes after the fix. Local focused suite (5/5), typecheck, Biome, and full quality checks passed. PR-head CI 37248066643 passed; exact-main CI 37248388498 passed both pnpm quality and pnpm cf:build at the merge SHA. No runtime deployment was required for this CLI repair.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions