Skip to content

fix(cli): route provider tests through connection API - #10572

Merged
diegosouzapw merged 3 commits into
diegosouzapw:release/v3.8.50from
hydraxman:fix/cli-provider-test-routes
Aug 21, 2026
Merged

diegosouzapw merged 3 commits into
diegosouzapw:release/v3.8.50from
hydraxman:fix/cli-provider-test-routes

Conversation

@hydraxman

@hydraxman hydraxman commented Aug 16, 2026 •

Copy link
Copy Markdown
Contributor

Description

Aligns the provider-test CLI paths with the server's connection-owned management API.

  • omniroute test now resolves a configured connection and calls POST /api/providers/{id}/test instead of the missing /api/v1/providers/test route.
  • omniroute test --all-providers accepts the current { connections, total } response shape and carries exact connection ids into both non-interactive and TUI runs.
  • omniroute providers test-all keeps existing local probes, but falls back to the server for custom API-key connections that the local probe table does not support.
  • The TUI uses the shared API client so management authentication and timeout behavior stay consistent with the rest of the CLI.

Related Issue

Fixes #10570
Related to #10564. The separate rotation method mismatch remains owned by #10366.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

Testing

  • node --import tsx/esm --test tests/unit/cli-provider-test-routes-10570.test.ts tests/unit/cli-providers-command.test.ts tests/unit/cli-providers-rotate.test.ts tests/unit/cli-route-unavailable-fallback-10081.test.ts tests/unit/cli-expanded-commands.test.ts — 41 passed
  • npm run test:vitest — 40 files, 362 tests passed
  • npm run lint — passed
  • npm run typecheck:core — passed
  • npm run check:changelog-integrity — passed
  • npm run check:docs-sync — passed
  • npm run check:any-budget:t11 — passed
  • npx prettier --check CHANGELOG.md bin/cli/commands/test-provider.mjs bin/cli/tui/ProvidersTestAll.jsx bin/cli/commands/providers.mjs tests/unit/cli-provider-test-routes-10570.test.ts — passed
  • npm run test:unit — did not complete within a 600-second local ceiling; the current release branch has an active base-red report for full-suite hangs/failures in 🔴 Release branch not green: release/v3.8.50 #9985. The focused Node suite and Vitest suite above completed successfully.

After publication, four CI jobs failed: Docs Gates (fast-path), Fast Quality Gates, and unit shards 1/4 and 3/4. Fast Quality Gates reports the current-base public-creds and mutation-test-coverage gates tracked in #9985. I reproduced both failing unit shards locally with the exact CI command: shard 1 passed 7,619 tests and failed three untouched dependency/config/catalog tests; shard 3 passed 7,493 tests and failed eight untouched Alibaba quota-classification, call-log rotation, docs-count, CLI-catalog-count, and ServiceSupervisor tests. The strict docs-count failure is the same current-base drift tracked in #9985; none of the failing tests or source owners are changed by this PR.

Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my own code
  • I have added tests that prove my fix is effective
  • New and existing unit tests pass locally with my changes in the focused scope
  • I have updated the changelog
  • I have read and followed the contribution guidelines

Contributions

Made by Nathan.

@hydraxman
hydraxman force-pushed the fix/cli-provider-test-routes branch from 28e4e83 to 3f9fca0 Compare August 17, 2026 22:52
@diegosouzapw

Copy link
Copy Markdown
Owner

Looks solid — verified /api/v1/providers/test doesn't exist and /api/providers/{id}/test does, ran the full stated focused test matrix (41/41 pass) locally. Will re-check the 4 CI jobs you flagged as base-red against current #9985 state before merge, otherwise this is ready to go. Thanks for the thorough test coverage.

bryan and others added 2 commits August 18, 2026 14:28
…ocal

# Conflicts:
#	bin/cli/commands/test-provider.mjs
@diegosouzapw
diegosouzapw merged commit 28788cb into diegosouzapw:release/v3.8.50 Aug 21, 2026
4 of 7 checks passed
muhamadgalihsaputra pushed a commit to niyatna/NiyatnaRoute that referenced this pull request Sep 27, 2026
…0572)

Aligns provider-test CLI paths with the server's connection-owned management API: `omniroute test` now resolves a connection and calls `POST /api/providers/{id}/test` instead of the missing `/api/v1/providers/test` route; `--all-providers` carries exact connection ids into both non-interactive and TUI runs. Fixes diegosouzapw#10570.

Validated in an isolated worktree boarded onto origin/release/v3.8.50 (0 conflicts, 4 files):
- 42/42 focused tests pass (cli-provider-test-routes-10570, cli-providers-command, cli-providers-rotate, cli-route-unavailable-fallback-10081, cli-expanded-commands).
- One pre-existing test in cli-expanded-commands.test.ts (not touched by the PR) mocked the old route and the old `success` response field, exposed only after merging with the current release tip — fixed the mock to match the new per-connection route and the `valid` field the real route actually returns, pushed fix-in-place to the PR branch (owner-authorized rule: fix-in-place over reimplementation, credit preserved).
- check-file-size, check-changelog-integrity: OK.
- typecheck:core: clean.
- check-complexity / check-cognitive-complexity: OK, both under baseline.

Co-authored-by: hydraxman <hydraxman@users.noreply.github.com>
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.

fix(cli): route provider test commands through configured connections

4 participants