feat: Confluence check outcomes follow the design's states

Merged
EV
4d ago
+307-56

Description

Sixth backend PR for the connector checks redesign, stacked on #16169. It gives Confluence's checks the design's outcome states, not only its copy.

Framework

  • InconclusiveValidationError: the probe ran, but its sample cannot decide.
    • The check is incomplete with error_kind: inconclusive.
    • It keeps no stack trace, because the cause is known.
  • NothingToCheckError: a full read proves the scope has nothing to test.
    • The check is skipped with not_run_reason: nothing_in_scope, and keeps its row (unlike a check that does not apply).
    • A check that depends on it reads "Not run: {name} found nothing to test".

Confluence

OutcomeBeforeNow
No comments, no attachments, no attachment small enough, no page authorpassed silentlyIncomplete: "No comments found to test", …
Sampled users in no groupIncomplete (unexpected, stack trace)Incomplete (inconclusive)
Confluence refused or rate limited every tryIncomplete (unexpected)Incomplete (inconclusive): "Requests refused or rate limited"
Space granted only to groups; user listing of only appspassed silentlySkipped: "No users in space permissions", "No users to test"
Empty scope or queryIncompleteFailed: "No pages in the selected scope", "No pages match the query"
CONFCLOUD-77618 on the batch readFailed (optional)Passed with a caveat: "Reads parent pages one at a time"

Behavior to review: an empty scope now fails a required check. It blocks Create and holds the first index attempt. The old code chose not to fail ("the scope can be empty on purpose, pages come later"). The design says: "An empty scope, with nothing to index, fails the first check that reads it." I followed the design; say if you want the old behavior kept.

The partial Find ("3 of 20 spaces not found") does not apply to Confluence, which takes one space key. It lands with the first connector that takes several items (Jira projects or GitHub repos).

How Has This Been Tested?

  • New framework tests (test_check_row_text.py):
    • an inconclusive sample is incomplete without a stack trace;
    • nothing in scope is a skipped row and stops its dependents.
  • New Confluence tests: a groups-only space is skipped; a page without comments is incomplete.
  • Existing Confluence tests updated to the new states.
  • Connector and EE unit tests: 4286 passed. The 93 capability-check external dependency tests pass on a scratch DB. ty is clean.

Additional Options

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

🤖 Generated with Claude Code


Summary by cubic

Gives Confluence's connector checks the outcome states from the design instead of silent passes, unexpected errors, and wrong failure modes.

  • Probes whose sample cannot decide (no comments, no small enough attachment, no page author, users in no group, requests refused or rate limited) are INCOMPLETE with error kind inconclusive, without a stack trace.
  • The attachment check keeps sampling later pages when its sample pages only hold large or unknown-size attachments.
  • The member-email row is INCOMPLETE when a capped user sample holds only apps, and only reports "no users to test" after the full listing ends.
  • Scopes with nothing to test (a space granted only to groups, a fully listed set of other user listings) are SKIPPED with not_run_reason: nothing_in_scope and keep their row; dependent checks read "Not run: {name} found nothing to test".
  • An empty scope or query now fails the first check that reads it instead of finishing incomplete.
  • CONFCLOUD-77618 on the batch read now passes with a caveat ("Reads parent pages one at a time") instead of failing a non-required check.

Behavior to review

  • An empty scope fails the first check that reads it, blocking Create and holding the first index attempt. The old code allowed empty scopes since pages can come later; the design says an empty scope fails. Reply if you want the old behavior kept.

Summary by CodeRabbit

  • Bug Fixes

    • Capability checks now distinguish inconclusive results, which are marked incomplete, from checks with nothing in scope, which are marked skipped.
    • Checks that depend on a skipped check are also skipped, with a summary identifying the blocker.
    • Empty Confluence query or content scopes fail validation. Attachment checks continue through pages to find a suitable sample and report when none can be verified.
    • When restriction data can’t be read in a batch, checks pass with an advisory about the slower fallback.
  • Documentation

    • Clarified how inconclusive checks, checks with nothing in scope, and empty scopes are reported.