Files
onyx/backend/tests/external_dependency_unit
Evan LohnandClaude Opus 5.5 f6557e2021 feat(connectors): connectors without named checks get the design's generic row (#16206)
## Description

Backend PR for the connector checks redesign (plan item A7), stacked on
#16205. A source without named checks shows the design's generic row.

**The generic row**
- The fallback check is "Test connection". A pass gives "Connected".
- A failure of the legacy `validate_connector_settings` probe gets a
line and a description for its kind:

  | Kind | Line |
  |---|---|
  | Rejected sign-in (401) | Sign-in rejected |
  | Denied permission (403) | No permission for the connector |
  | Not found (404) | Not found at the source |
  | Other settings error | Settings not accepted |
  | Rate limit (429) | Rate limited by the source |
  | Connection error or timeout | Cannot reach the source |
  | Unknown error | Unexpected response from the source |

- A typed error keeps its class. An untyped error (for example a raw
`requests.HTTPError`) gets its class from its HTTP status, as the named
checks map them. The description names the status, e.g. "(HTTP 401)".
- The probe's own text stays the `message`, so Error Details show it.
- An error that gives its own row text keeps it.
- The check is like a sign-in: on a form run, an unreachable source
fails it (`fails_when_unreachable`).
- The blocking-validation recorder writes the same row, so stored
reports and draft runs agree. It keeps the original error class in
`error_type`, for support.
- The new module `capability_checks/generic_row.py` holds the row text.
The check and the recorder both use it.

**Connectors that run nothing**
- 23 connectors keep the no-op `validate_connector_settings` of
`BaseConnector` (for example GitLab, Gmail, Asana). The fallback check
passed for them without a request to the source.
- These sources now get no INDEXING check
(`factory.py:source_has_settings_probe`). The plan and the runs hold no
check, and the recorder writes no row for a pass. A failure (for example
at construction) is still recorded.
- The frontend already hides the card when no check applies. Phase C can
show "No checks for this connector yet" from the same empty list. No new
API field is necessary.

**Not in this PR**
- The EE perm-sync fallback ("Permission sync validation") keeps its
name and text. The design has no generic row for it.
- The generic row does not set `validates_binding`. It needs the full
config, so a create form could not unlock on it.

## How Has This Been Tested?

- New unit tests (`test_generic_check_row.py`): the pass line, each
failure kind (typed and from an HTTP status), the status in the
description and in Error Details, an error with its own row, the
form-run unreachable policy, and the recorder's rows (with no row for a
pass without a probe).
- Updated `test_registry_fallbacks.py` (name, pass line, no check
without a probe) and the ratchet test (an INDEXING check exists only
with named checks or a settings probe).
- Updated the integration test `test_capability_check_run.py`: a
mock-connector run now holds no check. I did not run integration tests.
- Connector, server and EE unit tests: 7878 passed, 1 failed. The
failure
(`test_browser_lifecycle.py::test_download_is_not_retried_and_does_not_relaunch_browser`)
also fails on the stack below. Pre-commit is clean.

## Additional Options

- [ ] [Optional] Please cherry-pick this PR to the latest release
version.
- [x] [Optional] Override Linear Check

---
_Generated by [Claude
Code](https://claude.ai/code/session_01KFMazQbuG8ui3jxBxm47sC)_

<!-- This is an auto-generated description by cubic. -->
---
## Summary by cubic
Sources without named checks now show the design's generic "Test
connection" row instead of a pass-through fallback. Sources whose
connector keeps the no-op `validate_connector_settings` probe get no
INDEXING check.

- The fallback maps each failure kind of the legacy settings probe to a
line and description; a typed error keeps its class, an untyped one gets
its class from its HTTP status (401, 403, 404, 429), and the probe's own
text stays the message for Error Details.
- The blocking-validation recorder writes the same row, so draft runs
and stored reports agree, and a later pass on a source without a
settings probe replaces an earlier stale failure.
- Fallback checks keep the original stack trace in Error Details for
every error kind, and the EE permission-sync fallback keeps its existing
name and text, since the generic row does not apply to it.

<sup>Written for commit 3e05be6b05.
Summary will update on new commits.</sup>

<a
href="https://cubic.dev/pr/onyx-dot-app/onyx/pull/16206?utm_source=github"
target="_blank" rel="noopener noreferrer"
data-no-image-dialog="true"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img
alt="View guided diff"
src="https://www.cubic.dev/buttons/review-in-cubic-light.svg"></picture></a>
<a
href="https://www.cubic.dev/action/auto-fix/pr/onyx-dot-app/onyx/16206?returnTo=https%3A%2F%2Fgithub.com%2Fonyx-dot-app%2Fonyx%2Fpull%2F16206&source=description"
target="_blank" rel="noopener noreferrer"
data-no-image-dialog="true"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://www.cubic.dev/buttons/turn-on-auto-fix-dark.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://www.cubic.dev/buttons/turn-on-auto-fix-light.svg"><img
alt="Turn on auto-fix"
src="https://www.cubic.dev/buttons/turn-on-auto-fix-light.svg"></picture></a>

<!-- End of auto-generated description by cubic. -->



<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **New Features**
* Added a standardized **“Test connection”** capability check for
connectors with settings validation.
* Successful checks now display **“Connected”** with consistent results.
* Connection failures provide clearer, categorized error messages,
including relevant HTTP status details.

* **Bug Fixes**
* Capability-check results now correctly reflect successful validation
after an earlier connection failure.
* Sources without an applicable settings validation no longer display an
unnecessary indexing check.

* **Documentation**
* Clarified how connector validation checks appear in capability-check
reports.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 00:56:53 +00:00
..