feat: checks can run after any one of several checks

Merged
EV
2d ago
+327-81

Description

Checks can run after any one of several checks.

  • CapabilityCheck.depends_on stays all-of. A new optional depends_on_any holds one group of alternatives.
  • Runs when: at least one member PASSED, or finished as a partial result.
  • Ignored members: members that do not apply, have no result, or did not run because their own config is missing.
  • Stops when: no member passed and at least one counted member failed, is Incomplete, or was stopped by a gate. The not-run line names the first such member in the order the check lists them.
  • depends_on is evaluated first.
  • Draft runs make a check wait while every applicable member waits.

Applied to:

  • HubSpot: "List linked records" and "Sample notes" run after any one of the selected object-type reads, not after sign-in only.
  • Notion: "Sample page content" runs after "Find shared pages" or "Find root page". "Find root page" again shows the design's "waiting for settings" row on a run without a config. Before, it had no row, because the old rule let it block page content.

How Has This Been Tested?

  • Runner unit tests:
    • one member passes;
    • a member is partial;
    • all members fail;
    • a member does not apply or needs config;
    • a stopped member passes its cause on;
    • all-of is checked before any-of;
    • run order and draft waiting.
  • HubSpot and Notion cases.
  • The connector, server, EE and background unit suites pass at this tip.

Additional Options

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

🤖 Generated with Claude Code


Summary by cubic

Introduces depends_on_any, a new optional dependency type that lets a check run after any one of several checks. A check runs when at least one listed member passes or returns a partial result, and stops when no member passed and at least one counted member failed, is incomplete, or was stopped by a gate—the first such member in declaration order names the cause. Members that do not apply, have no result, or were skipped for lacking their own config or instance are left out, and depends_on is still evaluated first.

Behavior changes

  • HubSpot: "List linked records" and "Sample notes" run after any selected object-type read passes instead of after sign-in only.
  • Notion: "Sample page content" runs after "Find shared pages" or "Find root page"; "Find root page" now shows the waiting-for-settings row on runs without a config, where before it had no row.
  • Draft runs make a check wait while every applicable member of its any-of group waits.

Summary by CodeRabbit

  • Enhancements
    • Capability checks can proceed when any applicable alternative dependency passes or is partially successful.
    • Checks remain pending while all applicable alternatives are still pending.
    • Inapplicable or unconfigured alternatives no longer block eligible checks.
  • Bug Fixes
    • Improved dependency failure reporting and blocking behavior.
    • HubSpot association and notes checks now run when at least one selected object type is readable.
    • Notion page-content checks now correctly handle configured and available page sources.