Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(shared): validate cloudflared with the version subcommand #9880

Mergedmaria-rcksmerged 1 commit intomain fromrefs/pull/9880/headmerged by maria-rcks View on GitHub

maria-rckscommented

the pinned windows cloudflared executable can reject --version, preventing a valid relay download from activating. validation now uses the portable version subcommand; the existing installer tests model the rejected flag and verify activation completes.

verification: all 5 focused tests pass; reverting only the command reproduces validation_failed in both installation tests. targeted lint, shared typecheck and formatting pass, and the actual pinned linux binary reports 2026.5.2 with version; native windows execution remains unverified.

cloudflared installer regression checks: 5 tests passed

fixes #8304.

implemented with gpt-6-astra via codex in t3 code.


Note

Low Risk Narrow change to post-install smoke check only; same failure path (validation_failed) if the binary cannot run version.

Overview Fixes relay client install failing on Windows when post-download validation runs cloudflared --version, which the pinned Windows binary rejects even though the binary is valid.

Managed install validation now runs the portable version subcommand instead of the --version flag. Installer tests mock a spawner that fails --version with exit code 1 so activation still completes with the new command.

Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 64e3daedde1557790d00454ac7cb896966c0a84e. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).

Note

Validate downloaded cloudflared with version subcommand in makeCloudflaredRelayClient

The pinned Windows cloudflared executable rejects the --version argument but accepts the version subcommand. Changes the validation call in relayClient.ts from --version to version, and updates the mock spawner in relayClient.test.ts to model --version as exit status 1. A failed validation still triggers the existing failure wrapper.

Macroscope summarized 64e3dae.
    1. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted

    2. Approvability

      Verdict: Approved at 64e3dae

      Macroscope's review found this PR approvable — This narrowly scoped fix updates cloudflared installation validation to use the supported version subcommand and adjusts the corresponding test harness. Its runtime effect is confined to pre-activation binary validation, with no product-default, schema, security, billing, or deployment changes.

      You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).
    3. maria-rcks merged this2c301fd

    4. maria-rcks closed this

Sign in to join this conversation.