Skip to content

fix(cloud): refuse a device matrix on an API that cannot honour it#80

Merged
finalerock44 merged 1 commit into
devfrom
fix/1105-reject-matrix-on-unsupported-api
Jul 13, 2026
Merged

fix(cloud): refuse a device matrix on an API that cannot honour it#80
finalerock44 merged 1 commit into
devfrom
fix/1105-reject-matrix-on-unsupported-api

Conversation

@finalerock44

@finalerock44 finalerock44 commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

An API predating #1105 does not merely lack the feature — it accepts the submission and SILENTLY STRIPS the unknown deviceMatrix field, because the API's global ValidationPipe runs whitelist:true / forbidNonWhitelisted:false. Every flow then runs on a single default device and the run exits 0. The user asked for N devices, tested one, and is told nothing: the exact silent under-testing the device matrix exists to prevent, and the worst outcome the feature can produce.

The estimate endpoint is only called when a matrix was requested, so a null estimate (gateway maps 404/405 -> null) is a definitive 'API too old' signal. Fail loudly there instead of proceeding.

This also removes the ordering footgun for the prod rollout structurally rather than by remembering it: if the CLI ever reaches an API without the matrix (stale deploy, rollback, lagging self-host), it now refuses instead of quietly under-testing.

Verified against a local Prism mock served from PRODUCTION's swagger (no estimateMatrix): matrix run refuses with exit 1; a legacy single-device run on the same API still succeeds with exit 0.

What & why

Type of change

  • fix — bug fix
  • feat — new feature
  • perf — performance improvement
  • refactor — code change that's neither a fix nor a feature
  • docs — documentation only
  • chore / ci / build / test — tooling, no user-facing change
  • Breaking change (title has ! or PR notes a BREAKING CHANGE:)

Checklist

  • PR title follows the Conventional Commits format (see comment above)
  • pnpm lint passes
  • pnpm typecheck passes
  • pnpm build passes
  • I have not bumped the version or edited CHANGELOG.md (release-please handles this)
  • I have signed the CLA (the bot will prompt on first contribution)
  • Docs / README.md / STYLE_GUIDE.md updated if behaviour or output changed

How to test


View with Codesmith Autofix with Codesmith
Need help on this PR? Tag /codesmith with what you need. Autofix is disabled.

An API predating #1105 does not merely lack the feature — it accepts the
submission and SILENTLY STRIPS the unknown deviceMatrix field, because the API's
global ValidationPipe runs whitelist:true / forbidNonWhitelisted:false. Every
flow then runs on a single default device and the run exits 0. The user asked
for N devices, tested one, and is told nothing: the exact silent under-testing
the device matrix exists to prevent, and the worst outcome the feature can
produce.

The estimate endpoint is only called when a matrix was requested, so a null
estimate (gateway maps 404/405 -> null) is a definitive 'API too old' signal.
Fail loudly there instead of proceeding.

This also removes the ordering footgun for the prod rollout structurally rather
than by remembering it: if the CLI ever reaches an API without the matrix
(stale deploy, rollback, lagging self-host), it now refuses instead of quietly
under-testing.

Verified against a local Prism mock served from PRODUCTION's swagger (no
estimateMatrix): matrix run refuses with exit 1; a legacy single-device run on
the same API still succeeds with exit 0.
@finalerock44 finalerock44 self-assigned this Jul 13, 2026
@finalerock44 finalerock44 merged commit 5560158 into dev Jul 13, 2026
10 checks passed
@finalerock44 finalerock44 deleted the fix/1105-reject-matrix-on-unsupported-api branch July 13, 2026 11:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant