Skip to content

fix(auth): Hard-fail bot authorization requests - #700

Merged
dcramer merged 2 commits into
mainfrom
fix/slack-bot-auth-hard-fail
Jun 30, 2026
Merged

dcramer merged 2 commits into
mainfrom
fix/slack-bot-auth-hard-fail

Conversation

@dcramer

@dcramer dcramer commented Jun 30, 2026

Copy link
Copy Markdown
Member

Bot-authored Slack turns can still run through subscribed and mention handling, but they now fail authorization requests before Junior records pending auth or sends private OAuth links. Disabled auth from bot requesters is treated as a terminal auth condition at the Slack handler boundary, which avoids fallback replies and queue retry loops.

Pending auth resume also ignores skipped bystander messages when deciding whether the parked auth turn is still the latest real request. The regression coverage uses Slack runtime integration paths for MCP auth, plugin auth, and OAuth callback resume rather than isolated unit tests.

Fixes #695
Fixes #698

@vercel

vercel Bot commented Jun 30, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
junior-docs Ready Ready Preview, Comment Jun 30, 2026 11:02pm

Request Review

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 20c3cd9. Configure here.

dcramer and others added 2 commits June 30, 2026 15:46
Bot-authored Slack turns can still run through the subscribed reply path, but they cannot own user authorization. Treat bot requesters as disabled auth flows before recording pending auth or sending private auth links, and make Slack handlers treat that disabled-auth error as terminal instead of posting fallback errors.

Ignore skipped bystander messages when deciding whether a pending auth turn is still the latest real request, so OAuth callbacks can resume the original parked turn.

Fixes #695
Fixes #698
Co-Authored-By: GPT-5 Codex <[email protected]>
Only ignore skipped non-request messages when checking whether a pending auth callback still belongs to the latest request. Failed and opt-out turns remain real newer user turns, so stale OAuth callbacks cannot resume older parked sessions after them.

Co-Authored-By: GPT-5 Codex <[email protected]>
@dcramer
dcramer force-pushed the fix/slack-bot-auth-hard-fail branch from 8e58d78 to 912270f Compare June 30, 2026 23:00
@dcramer
dcramer marked this pull request as ready for review June 30, 2026 23:12
@github-actions github-actions Bot added the risk: medium PR risk score: medium label Jun 30, 2026
@dcramer
dcramer merged commit 0023630 into main Jun 30, 2026
20 checks passed
@dcramer
dcramer deleted the fix/slack-bot-auth-hard-fail branch June 30, 2026 23:12

This branch was successfully deployed

1 active deployment
Preview – junior-docs — 912270f5 Deployed Jun 30, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: medium PR risk score: medium

Projects

None yet

1 participant