Files
Wenxi 973253521c fix(slack): make connection checks configurable actions (#16576)
## Description

Fixes #16565.

Scheduled Slack delivery can pause for approval when the agent checks
its connection with `auth.test`. This endpoint was absent from the Slack
action catalog, so users could not configure its approval policy.

Add a **Check connection** action for `POST /api/auth.test`, with an
Auto-approve catalog default. The existing permission editors expose
this action. Other unrecognized endpoints still require approval.

Existing tasks must set **Check connection** to Auto-approve and save
the task. Missing task choices still default to Ask, and workspace
restrictions still apply. This change does not grant new permissions to
existing tasks.

## How Has This Been Tested?

- `uv run pytest -q
backend/tests/unit/external_apps/test_slack_catalog.py
backend/tests/unit/external_apps/test_action_policy_defaults.py
backend/tests/unit/sandbox_proxy/test_gate.py` — 111 passed.
- Added coverage for connection-check matching and its default policy.
Verified that `auth.revoke` and a similar endpoint remain unrecognized.
- Pre-commit checks passed for all three changed files, including
typing, lint, formatting, and feature-map integrity.
- Live scheduled Slack delivery was not tested.

## Additional Options

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


<!-- This is an auto-generated description by cubic. -->
---
## Summary by cubic
Makes Slack connection checks configurable by cataloging `POST
/api/auth.test` as the `slack.auth.test` action with an Auto-approve
default, so the endpoint is no longer unrecognized.

- Existing tasks must explicitly save this action as Auto-approve for
unattended connection checks; missing task choices still resolve to Ask.
- Other `auth.*` endpoints remain unrecognized and continue to ask.

<sup>Written for commit 4069f071ce.
Summary will update on new commits.</sup>

<a
href="https://cubic.dev/pr/onyx-dot-app/onyx/pull/16576?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/16576?returnTo=https%3A%2F%2Fgithub.com%2Fonyx-dot-app%2Fonyx%2Fpull%2F16576&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
-->

<!-- coderabbit-ai-generated:v1 -->

## Summary by CodeRabbit

* **New Features**
* Added a configurable Slack **Check connection** action that verifies
whether the connection is working.
  * New configurations default this action to Auto-approve.
* **Behavior Changes**
* Existing tasks need to save Auto-approve to run connection checks
unattended; tasks without a saved choice will ask for approval.
  * Other unrecognized Slack endpoints continue to require approval.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-10-22 21:17:07 +00:00
..