Skip to content

feat(cli): refuse a SlackAppAlertChannel without the Checkly Slack app [RED-1289] - #1585

Open
sorccu wants to merge 4 commits into
mainfrom
simo/red-1289-slack-app-validation
Open

sorccu wants to merge 4 commits into
mainfrom
simo/red-1289-slack-app-validation

Conversation

@sorccu

@sorccu sorccu commented Oct 28, 2026 •

Copy link
Copy Markdown
Member

Affected Components

  • CLI
  • Create CLI
  • Test
  • Docs
  • Examples
  • Other

checkly validate, test and deploy (and every other command that validates the project, such as pw-test and import plan) now fail for a SlackAppAlertChannel with Slack destinations when the account has no Checkly Slack app connected:

SlackAppAlertChannel 'ops-slack' needs the Checkly Slack app, which is not connected to this account, so its alerts cannot be delivered.

Hint: Connect the Checkly Slack app at https://app.checklyhq.com/accounts/<id>/settings/account/integrations, or remove the channel.

It's an error rather than a warning on purpose. A Slack App channel without the app delivers nothing, and that includes a channel deployed before the app was disconnected. A warning printed in CI output goes unseen.

How it works

  • The account the CLI already loads at startup reports a new field, integrations: [{ type, connected }], listing every integration type the API reports. AuthCommand now keeps the whole account on Session.account, so the check reads integrations and the account ID for the link from there.
  • SlackAppAlertChannel.validate() adds the error when the SLACK entry says connected: false. When the API doesn't send the field, or lists no SLACK entry, the check is skipped, so the CLI never refuses an integration the API doesn't report.
  • The advanced project templates no longer construct a Slack App channel; it's commented out with a note that it needs the app. Without this, a freshly created project would fail checkly test on any account without the app.
  • The AI-context guidance that recommends SlackAppAlertChannel now says it needs the app.

Other changes

  • Session.accountFeatures is gone; the response time limits read Session.account?.features instead. The behaviour is unchanged: no account, or no features, means the standard limits.

Notes for the Reviewer

  • Depends on a backend change (RED-1289) that adds integrations to the account routes. It isn't merged or deployed yet. Merging this first is safe, because the check stays off until the backend sends the field. In practice it takes effect once both the backend deploy and a CLI release are out.
  • Behaviour change for existing projects. A project with a Slack App channel on an account whose app is disconnected starts failing test and deploy, including a deploy that leaves the channel unchanged, which Checkly itself would accept. This PR doesn't use the ! marker that previous changes like this used in 10.0.0. Decide whether it should be marked breaking.
  • Stored credentials, not a live check. SLACK reflects what Checkly has stored. An app uninstalled on the Slack side still reads as connected.

Testing

src/constructs/__tests__/slack-app-alert-channel.spec.ts covers five cases:

  • refused, with the message and link;
  • accepted when connected;
  • skipped when the field is absent;
  • skipped when no SLACK entry is listed;
  • accepted without Slack destinations.

The construct, command and REST suites pass (1,785 tests) and tsc -p tsconfig.json --noEmit is clean. No test covers the wiring from AuthCommand into Session.account.

🤖 Generated with Claude Code

sorccu and others added 2 commits November 3, 2026 00:48
…p [RED-1289]

validate, test and deploy now fail with an error for a
SlackAppAlertChannel with Slack destinations when the account reports,
through the account's new connectedIntegrations, that the Checkly Slack
app is not connected. Its alerts cannot be delivered, including for a
channel deployed before the app was disconnected, and a warning in CI
output goes unseen. The check is skipped when the API does not report
connected integrations.

The advanced project templates no longer construct a Slack app channel,
so a freshly created project validates on an account without the app,
and the agent guidance that recommends the construct says it needs one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…flag [RED-1289]

The account response reports `integrations: [{ type, connected }]`, every
type the API reports with whether it is connected, instead of a list of
connected types. SlackAppAlertChannel errors only when the SLACK entry says
it is not connected, and skips the check when the API lists no SLACK entry.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sorccu
sorccu force-pushed the simo/red-1289-slack-app-validation branch from 8bc4e00 to aab96c9 Compare November 2, 2026 15:49
sorccu and others added 2 commits November 3, 2026 01:22
Session.account holds the account AuthCommand loads, replacing the
separate Session.accountId and Session.accountIntegrations copies the
SlackAppAlertChannel check read.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
responseTimeLimits reads the features of Session.account instead of a
separate Session.accountFeatures copy. An unauthenticated session or an
API without features still gets the standard limits.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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.

1 participant