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
{{ message }}
Repository navigation
perf(slack): skip redundant bot lookups for ordinary replies - #49450
A bot could do extra work to find its chat again before sending an ordinary Slack reply. Orca now checks whether the reply can become an attachment first.
Files
Added
Deleted
Net
Test
2
$\color{#1a7f37}{\Huge{\mathbf{+}}}$201
$\color{#cf222e}{\Huge{\mathbf{−}}}$12
$\color{#1a7f37}{\Huge{\mathbf{+}}}$189
Prod
3
$\color{#1a7f37}{\Huge{\mathbf{+}}}$28
$\color{#cf222e}{\Huge{\mathbf{−}}}$19
$\color{#1a7f37}{\Huge{\mathbf{+}}}$9
What Changed
The CLI requests automatic attachments only when the reply contains a possible HTML fence. The host checks cloud capabilities before looking up the bot’s session, and checks the session before parsing the fence.
Why
An ordinary reply or a reply to a cloud without attachment support has no use for this second lookup.
N/A. Slack replies and HTML attachments look the same.
Testing
I manually tested these changes locally.
Nine Linux tests passed across bot-reply-html-pages, connector-reply-html-page, connector-turn-for-caller, and html-document-fences. The Bun typecheck command used by CI passed on Linux.
The CLI prose and older-cloud lookup assertions guard against redundant lookups. The tests also cover the existing HTML staging retry, caller checks, and fence parsing.
Performance
One lightweight text check in the CLI replaces the second host roster and session lookup for ordinary replies. The host performs full HTML parsing only for a file-capable destination and a bot session.
Risk
Level: Low. The precheck must admit every opener the full parser accepts. An older CLI keeps its existing lookup cost on capable destinations. A newer CLI still works with older hosts. A plain revert restores the previous behavior.
AI Disclosure
Review
The host checks conversation ownership before evaluating attachment eligibility.
Agent skill upstream boundary
Not applicable.
Notes
The changed RPC code is shared across host platforms and remote connections.
Checklist
Small, focused change with the user impact, implementation and rationale explained.
Risk, rollback, platform, remote compatibility and performance reviewed.
No actionable comments were generated in the recent review.
Walkthrough
The CLI now requests HTML-page-as-file handling only when a session exists and the reply text has an HTML fence candidate. The connector checks for a session before evaluating cloud feature flags in its rejection condition. Tests cover connector and CLI replies, HTML-file staging, and unlinked replies.
Merge Risk: Minimal · up to 705ee
This change avoids redundant bot lookups for ordinary Slack replies and only requests HTML attachments when the reply contains a possible HTML fence. The examined paths show no regression and the HTML-attachment fallback is preserved, so merge risk is minimal pending normal CI.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title names the change: a perf fix in the Slack connector that skips redundant bot lookups for ordinary replies. The diff matches this. The CLI requests HTML-page-as-file handling only when a sess…
Description check
The description follows the template sections, and the ELI5, What Changed, Why, Testing, Performance, Risk, and Checklist sections have content. The Visual Proof section gives N/A with a reason. Gaps:…
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.
Full details: Title check
Explanation
The title names the change: a perf fix in the Slack connector that skips redundant bot lookups for ordinary replies. The diff matches this. The CLI requests HTML-page-as-file handling only when a session exists and an HTML fence candidate is present, and the host checks cloud features before the bot session. The title uses the conventional commit format and stays within a single line.
Full details: Description check
Explanation
The description follows the template sections, and the ELI5, What Changed, Why, Testing, Performance, Risk, and Checklist sections have content. The Visual Proof section gives N/A with a reason. Gaps: the Linked Issue section cites STA-18542 and #49288 but does not use the required 'Fixes #' form, and the description does not say how the change was verified across platforms beyond Linux. The Testing items are checked but the manual testing box is unchecked, and the AI Disclosure and Review sections are blank or unclear. The Risk level is given as Low but the rollback wording is brief. The Performance section gives a clear one-line reason. Most required content is present, so the check passes.
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.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.
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
A bot could do extra work to find its chat again before sending an ordinary Slack reply. Orca now checks whether the reply can become an attachment first.
What Changed
The CLI requests automatic attachments only when the reply contains a possible HTML fence. The host checks cloud capabilities before looking up the bot’s session, and checks the session before parsing the fence.
Why
An ordinary reply or a reply to a cloud without attachment support has no use for this second lookup.
Linked Issue
STA-18542. Original change tracked in #49288.
Visual Proof
N/A. Slack replies and HTML attachments look the same.
Testing
bot-reply-html-pages,connector-reply-html-page,connector-turn-for-caller, andhtml-document-fences. The Bun typecheck command used by CI passed on Linux.Performance
One lightweight text check in the CLI replaces the second host roster and session lookup for ordinary replies. The host performs full HTML parsing only for a file-capable destination and a bot session.
Risk
Level: Low. The precheck must admit every opener the full parser accepts. An older CLI keeps its existing lookup cost on capable destinations. A newer CLI still works with older hosts. A plain revert restores the previous behavior.
AI Disclosure
Review
The host checks conversation ownership before evaluating attachment eligibility.
Agent skill upstream boundary
Notes
The changed RPC code is shared across host platforms and remote connections.
Checklist