You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Before, when a bot couldn't read a Slack channel, thread or file, its error didn't say exactly which access condition failed. Now it keeps the cloud's explanation and Update link word for word, and adds the exact reason: missing permission, not in the channel, channel not visible, thread missing, or file missing. Reads from other services don't change.
Files
Added
Deleted
Net
Test
1
$\color{#1a7f37}{\Huge{\mathbf{+}}}$176
0
$\color{#1a7f37}{\Huge{\mathbf{+}}}$176
Prod
3
$\color{#1a7f37}{\Huge{\mathbf{+}}}$44
$\color{#cf222e}{\Huge{\mathbf{−}}}$4
$\color{#1a7f37}{\Huge{\mathbf{+}}}$40
What Changed
A refused orca slack read keeps Orca Cloud's message unchanged and appends the typed reason (and the missing permission, if any). In --json output the reason and permission also appear as error data.
A missing thread also points to orca slack read <channel> for a current ref. A channel the bot can't see also asks to check that the channel or link is in this bot's Slack workspace.
A read with no reason (older cloud), a malformed reason, or a non-Slack ref keeps the original message.
Why
Each Slack access condition needs a different fix. A typed reason lets a bot, or the person helping it, tell which one applies without losing the cloud's own next step. This makes failures easier to diagnose; it doesn't fix them. A release bot's read of a thread it was allowed to see, with attachments, came back empty, and that still needs checking after the next desktop release (see Notes).
Linked Issue
Tracked internally (item 383).
Visual Proof
N/A: this changes CLI error text only; there is no rendered interface.
Testing
I manually tested these changes locally (covered by tests that run the real CLI read handler against a fake Slack service)
Automated tests added/updated: slack-read.test.ts covers an allowed thread read with attachments, a streamed attachment download, every typed refusal, the thread hint, and the unchanged cases
Every added refusal test fails if the cloud's message is replaced or the reason is dropped
Performance
None, because the only new work is a few string checks after a failed read.
Risk
Level: Low. The worst case is an extra sentence on a refused read. A plain revert restores the old text.
AI Disclosure
Review
Agent skill upstream boundary
Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.
Notes
After the next desktop release, repeat the release bot's original thread and attachment read. If it is refused, the new reason names the fix. If it still comes back empty with no refusal, the problem is in the cloud's thread fetch, not access. Security, cross-platform, SSH, mobile, and backward compatibility: no impact (CLI-only text, optional response fields).
Checklist
This PR is small and focused
I explained what changed and why
I stated the risk
N/A screenshots, with reason
Self-reviewed for correctness, security, and performance
Cross-platform, SSH/remote, and path/shortcut impact considered
pnpm check:changed passes; CI covers the full suite
It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.
No actionable comments were generated in the recent review.
Walkthrough
A shared helper maps recognized Slack read refusal reasons to specific guidance. The CLI and runtime use that guidance when handling read failures. Other verbs and unrecognized refusal reasons retain the existing error handling. Tests cover mapped Slack refusals and cases where the original message remains unchanged.
Merge Risk: Low · up to 6a603
Slack read refusals now explain the missing permission or access condition. The mapping is applied to all connectors' read refusals rather than only Slack, so a non-Slack refusal that happens to use a mapped code could show Slack guidance. The risk is minor and limited to message wording.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title "fix(slack): explain read access refusals" matches the main change: failed Slack read refusals for history scope, channel membership, channel visibility, and missing threads/files now produc…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Description check
The description is mostly complete and follows the repository template. It has a clear ELI5, a What Changed section with before/after behavior, a Why section that explains the trade-off, a Testing sec…
Full details: Title check
Explanation
The title "fix(slack): explain read access refusals" matches the main change: failed Slack read refusals for history scope, channel membership, channel visibility, and missing threads/files now produce actionable CLI error messages. It is concise, specific, and follows a conventional-commit style. The title does not mention the non-Slack preservation or tests, which is acceptable.
Full details: Description check
Explanation
The description is mostly complete and follows the repository template. It has a clear ELI5, a What Changed section with before/after behavior, a Why section that explains the trade-off, a Testing section that lists the test file and cases, a Performance line, a Risk section with level and revert path, N/A visual proof with reason, and a Notes section with post-release verification steps. Minor gaps: the Linked Issue section cites an internal item (383) rather than a linked GitHub issue, the Testing checkbox for manual testing is unchecked and the 'Fails without this change' item is checked without a clear statement of the manual run, the AI Disclosure section is empty, and the Review section is empty. The description also references a test file (slack-read.test.ts) that does not appear in the raw summary, which lists slack-read-refusal.test.ts, so the test reference should be confirmed.
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Repository UI
Review profile: CHILL
Plan: Advanced
Run ID: f43b3473-1e2a-44fb-a6ae-85ad1549a3f0
Commits
Reviewing files that changed from the base of the PR and between 5d3e8f9 and 6a60359.
Files selected for processing: 4
src/cli/slack/slack-read-refusal.test.ts
src/cli/slack/slack.ts
src/shared/connector-action-contract.ts
src/shared/connectors/slack-read-refusal.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 4 remain after this review.
Scope: src/cli/slack/slack-read-refusal.ts (new), src/cli/slack/slack.ts (callAct failure branch), src/shared/connector-action-contract.ts (two optional fields on the refusal variant), plus the main-process consumers of ConnectorActionResponse (src/main/connector-cloud/connector-actions.ts:44, connector-replies.ts:126). Test file not runtime.
New or changed work
Work
Trigger / frequency
Process
Population × work
Bound
slackRead classification in callAct (slack.ts:89-91): verb === 'read', ref.trim(), one OTHER_SOURCE regex test
Only when a connector.act answer is ok: false — once per refused CLI call
short-lived orca CLI process
1 call × 1 anchored regex over the ref string (the same regex refuseOtherSource already runs on the ref)
O(ref length), one per refused call; no loop, no fleet dimension
slackReadRefusal (slack-read-refusal.ts:11): two anchored regexes, one constant-map lookup, join of ≤3 strings
Same refused Slack read only
CLI process
1 × constant
REASON caps at 64 chars, SCOPE at 128; patterns are linear with no nested quantifiers; message is the existing cloud text
Zod schema: reason/scope optional strings on the refusal variant
Each cloud action response parsed in main (existing parse, per act call)
Electron main
+2 optional key checks per response
Constant; no new parse, call or payload; success variant unchanged
callAct made export
none (test access)
—
—
—
No new timers, polls, subscriptions, IPC, listeners, subprocesses, fs/SQLite, store writes, renderer code or startup imports (new module is a tiny pure CLI-side import, no SDK).
Regression classes touched
Re-reading / hot-path rescans: matched (regex on ref) — disproved: one test per refused call, anchored, linear, the input is a single user-supplied ref.
Fixed-cadence poll / new idle wakeups: no matching code; idle wakeups/s unchanged (0 → 0) on main, renderer and daemon.
Eager startup imports: matched (new import into slack.ts) — disproved: dependency-free 30-line module on the CLI's slack command graph only.
All other classes: no matching code.
Six questions
Unused work before gate — reviewed: refusal formatting runs only after ok: false and only for Slack reads; success path untouched.
Ownership multiplication — N/A: no owners/resources; one CLI invocation, one call.
Thread/storage — reviewed: CLI process; main pays only two optional-field zod checks inside an existing parse.
Growth/progress — reviewed: no state, no retries added; the existing host retry for unavailable cloud is unchanged.
Execution host — N/A: pure string work, same on local/SSH/Windows; no extra round trips.
Obsolete work/release — N/A: nothing retained; it throws synchronously.
Evidence: diff and caller trace read at the head (no runtime measurement needed; the costs are constant per refused call). Residual risk: none identified.
Problem: a refused Slack read didn't say which access condition failed, so a bot couldn't tell what to do next.
Change: a refused orca slack read keeps Orca Cloud's message word for word, including any Update link. It then adds the typed reason and the missing permission, and --json output includes them as error data. A missing thread, or a channel the bot can't see, also gets a short next step. Reads from other connectors, an older cloud that sends no reason, and malformed reasons are unchanged.
Fixed during review: an earlier version replaced the cloud's message, which dropped the Update link and gave the wrong advice for deleted files; it also had a host-side mapping that never ran. The current version keeps the cloud's message and adds to it.
Deferred: the thread-hint test still matches part of the hint's wording; some test cases send a permission with every reason.
Verified: CI green, the changed-file checks pass on Linux, slack-read.test.ts (12 tests, fake Slack service), regression audit SAFE, and the perf scan found no regressions.
Still open: this change explains failures; it doesn't fix the original report, where a release bot's read of a thread it was allowed to see came back empty. After the next desktop release, repeat that read. If it is refused, the reason names the fix. If it is still empty with no refusal, the problem is in the cloud's thread fetch.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ELI5
Before, when a bot couldn't read a Slack channel, thread or file, its error didn't say exactly which access condition failed. Now it keeps the cloud's explanation and Update link word for word, and adds the exact reason: missing permission, not in the channel, channel not visible, thread missing, or file missing. Reads from other services don't change.
What Changed
orca slack readkeeps Orca Cloud's message unchanged and appends the typed reason (and the missing permission, if any). In--jsonoutput the reason and permission also appear as error data.orca slack read <channel>for a current ref. A channel the bot can't see also asks to check that the channel or link is in this bot's Slack workspace.Why
Each Slack access condition needs a different fix. A typed reason lets a bot, or the person helping it, tell which one applies without losing the cloud's own next step. This makes failures easier to diagnose; it doesn't fix them. A release bot's read of a thread it was allowed to see, with attachments, came back empty, and that still needs checking after the next desktop release (see Notes).
Linked Issue
Tracked internally (item 383).
Visual Proof
N/A: this changes CLI error text only; there is no rendered interface.
Testing
slack-read.test.tscovers an allowed thread read with attachments, a streamed attachment download, every typed refusal, the thread hint, and the unchanged casesPerformance
None, because the only new work is a few string checks after a failed read.
Risk
Level: Low. The worst case is an extra sentence on a refused read. A plain revert restores the old text.
AI Disclosure
Review
Agent skill upstream boundary
Notes
After the next desktop release, repeat the release bot's original thread and attachment read. If it is refused, the new reason names the fix. If it still comes back empty with no refusal, the problem is in the cloud's thread fetch, not access. Security, cross-platform, SSH, mobile, and backward compatibility: no impact (CLI-only text, optional response fields).
Checklist
pnpm check:changedpasses; CI covers the full suite