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
Keep a quiet Slack bot reply quiet when Orca restarts mid-upgrade - #48164
A recent change (#47896) made a Slack bot post the words it writes before a trailing NO_REPLY, instead of staying silent. A reply that was already waiting when someone upgraded Orca could then be posted under that new rule, although it was admitted under the old one (stay silent, except in the bot owner's own DM). Now each waiting reply remembers the rule from when its request was admitted, and the restart path follows it. New requests keep #47896's behavior.
What Changed
Before: a bot turn in a Slack thread (or a member's DM) that began on the older build and ended with Checked it. NO_REPLY stayed silent if it finished live. If Orca restarted to upgrade before the reply was filled, the new build's recovery applied the new rule and posted "Checked it." to Slack.
The rule should be the one in effect when the request was admitted, not whichever build happens to finish it. Recording it on the pending row is the only place both the live fill and post-restart recovery read.
Linked Issue
N/A (maintainer).
Visual Proof
N/A: no UI change. The change decides whether a Slack reply is sent; it is covered by the restart test below with simulated messages.
Testing
I manually tested these changes locally
Automated tests added/updated, or explained why not below
Every added test fails without this change and avoids the test anti-patterns
Added an upgrade-restart case to connector-reply-restart-matrix.test.ts on a real journal file: a reply admitted under the older rule, a restart, then recovery. Without the fix it fills answered with "Checked it."; with it, quiet. A row admitted by this build still posts the words.
Performance
None, because the only added work is one owner lookup per older-build DM row, and only when a bot's turn ends with the quiet marker.
Risk
Saved data: one nullable column on the reply table; older builds never read it. Worst case if wrong: a reply from the older build stays quiet when its words would now be posted. Known trade-off: hourly team builds cut from main after #47896 and before this fix also leave the rule unrecorded. On upgrade from one of those builds, a pending "words + NO_REPLY" reply stays quiet instead of posting its words. It fails toward the older silent behavior, never toward posting. Back out with a plain revert (the column stays, unused).
Level: Low
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
Ensure no issues in: Security, Cross-platform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance
Checklist
This PR is small and focused
I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
I stated the risk: what could break, for whom, and how to back it out
Before/after screenshots or videos attached for UI changes, or N/A with reason
Self-reviewed for correctness, security, and performance
Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)
Perf scan (head 29c852853559): clean, no findings.
Trigger: a Slack bot turn's end (live fill) or boot recovery, once per ended turn, not per keystroke, status update or poll.
Added work: one nullable column written with each Slack admission and read with each row (no extra query). One owner lookup (a journal submission-body read) per older-build DM row, only when a bot turn ends with the quiet marker. That set is fixed at upgrade time: new rows never reach it, so it goes to zero as older rows drain.
Schema: one more pragma_table_info check at journal open (constant, boot only).
Regression classes: none of the classes match (no store writes, selectors, timers, subprocesses, renderer code or fan-out). Idle wakeups: 0 before and after.
Six questions: 1, 2, 4 and 6 do not apply (no producer/subscriber, owner, growth or lifetime change). 3: the work runs on the existing journal writer/reader, same as before. 5: no host-specific code.
No actionable comments were generated in the recent review.
Walkthrough
Connector reply rows now record whether they use the trailing quiet-marker rule. Recovery uses this value to distinguish current rows from legacy rows when processing bot replies. For legacy rows, owner-authored Slack direct messages are exempt from whole-reply silencing. The installation provides an owner-attribution lookup, and restart tests cover legacy and current rows.
Merge Risk: Minimal · up to a456f
Quiet Slack replies now record their rule at admission, so restart recovery follows the rule in effect when each reply was admitted. The one remaining trade-off is that replies from a narrow window of intermediate builds stay silent rather than posting their words, and this was accepted. No merge-blocking risk remains.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title names the main change: a quiet Slack bot reply stays quiet when Orca restarts during an upgrade. The changeset records a quiet-marker rule on pending reply rows so that live fill and restart…
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 follows the repository template and covers ELI5, What Changed, Why, Linked Issue (N/A for maintainer), Visual Proof (N/A with reason), Testing, Performance, Risk with level and rollbac…
Full details: Title check
Explanation
The title names the main change: a quiet Slack bot reply stays quiet when Orca restarts during an upgrade. The changeset records a quiet-marker rule on pending reply rows so that live fill and restart recovery apply the rule in effect when the reply was admitted. The title is specific and matches the summarized changes and the stated objectives.
Full details: Description check
Explanation
The description follows the repository template and covers ELI5, What Changed, Why, Linked Issue (N/A for maintainer), Visual Proof (N/A with reason), Testing, Performance, Risk with level and rollback, and the checklists. It explains the mechanism (a quiet_rule column recorded on pending rows) and the trade-off for builds cut between #47896 and this fix. The Testing section names the restart matrix test and its expected outcomes. The AI Disclosure section is left empty, but the template says maintainers may skip it, and the author is a maintainer per the Linked Issue note. The Performance section is a one-line answer with a reason. Only minor gaps remain.
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; 1 remain after this review.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 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.
Perf scan (head ef3f90b8f2f9): clean, no findings.
Trigger: a Slack bot turn's end (live fill) or boot recovery, once per ended turn, not per keystroke, status update or poll.
Added work: one nullable column written with each Slack admission and read with each row (no extra query). At most one owner lookup (a journal submission-body read) per conversation, for older-build DM rows,, only when a bot turn ends with the quiet marker. That set is fixed at upgrade time: new rows never reach it, so it goes to zero as older rows drain.
Schema: one more pragma_table_info check at journal open (constant, boot only).
Regression classes: none of the classes match (no store writes, selectors, timers, subprocesses, renderer code or fan-out). Idle wakeups: 0 before and after.
Six questions: 1, 2, 4 and 6 do not apply (no producer/subscriber, owner, growth or lifetime change). 3: the work runs on the existing journal writer/reader, same as before. 5: no host-specific code.
Regression audit (fresh, blinded) on head ef3f90b8f2f9: SAFE, no must-fix issues. It agrees the unrecorded-rule trade-off above is acceptable because it fails toward silence.
Perf scan (head 45c95d8e0d4b): clean, no findings.
Trigger: a Slack bot turn's end (live fill) or boot recovery, once per ended turn, not per keystroke, status update or poll.
Added work: one nullable column written with each Slack admission and read with each row (no extra query). At most one owner lookup (a journal submission-body read) per conversation, for older-build DM rows, only when a bot turn ends with the quiet marker. That set is fixed at upgrade time: new rows never reach it, so it goes to zero as older rows drain.
Schema: one more pragma_table_info check at journal open (constant, boot only).
Regression classes: none of the classes match (no store writes, selectors, timers, subprocesses, renderer code or fan-out). Idle wakeups: 0 before and after.
Six questions: 1, 2, 4 and 6 do not apply (no producer/subscriber, owner, growth or lifetime change). 3: the work runs on the existing journal writer/reader, same as before. 5: no host-specific code.
Regression audit (fresh, blinded) on head 45c95d8e0d4: SAFE, no must-fix issues. It agrees the trade-off in the description is acceptable because it fails toward silence.
Perf scan (head a456fa601144): clean, no findings.
Trigger: a Slack bot turn's end (live fill) or boot recovery, once per ended turn, not per keystroke, status update or poll.
Added work: one nullable column written with each Slack admission and read with each row (no extra query). At most one owner lookup (a journal submission-body read) per conversation, for older-build DM rows, only when a bot turn ends with the quiet marker. That set is fixed at upgrade time: new rows never reach it, so it goes to zero as older rows drain.
Schema: one more pragma_table_info check at journal open (constant, boot only).
Regression classes: none of the classes match (no store writes, selectors, timers, subprocesses, renderer code or fan-out). Idle wakeups: 0 before and after.
Six questions: 1, 2, 4 and 6 do not apply (no producer/subscriber, owner, growth or lifetime change). 3: the work runs on the existing journal writer/reader, same as before. 5: no host-specific code.
perf-surface-detect: []. The conversation rule is read from the turn's own rows, already loaded, with at most one owner lookup per conversation.
Problem: after #47896, a Slack bot's words before a trailing NO_REPLY get posted. A reply that was still waiting when Orca restarted for an upgrade could be posted by recovery under that new rule, although it was admitted under the older one (silent, except in the owner's own DM).
User-facing change: waiting replies keep the rule from when their request was admitted. New requests keep #47896's behavior.
Fixed during review:
All pending replies in one conversation share one rule, taken from the conversation's head row.
At most one owner lookup per conversation.
The PR description wording now says "admitted" and mentions the owner's-DM exception.
Accepted limit: hourly team builds cut from main between #47896 and this fix record no rule, so their waiting replies are filled quiet after upgrading, or after a downgrade-then-upgrade. Nothing on the row separates them from released builds. #47896 is in no release tag. The blinded audit flagged this. A fresh confirm reviewer, given the facts, agreed it is a bounded, dev-build-only limit, not a regression for released users, and that it fails toward the older quiet behavior.
Verified:
Restart test on a real journal file: fails without the fix (posts "Checked it."), passes with it.
Schema upgrade test: older rows read as the older rule, new rows record trailing.
Rule test for the reply outcome.
Remote check passes; CI is green.
Claude reviewer: no P0 or P1.
Codex: blinded audit plus confirm, as above.
Perf-scan: clean.
References: t3code and bb have no bot quiet marker or persisted reply outbox. The closest is CowAgent's [SILENT] verdict, which strips the token per run and has no stored state that crosses upgrades. No counterpart to adopt.
QA: tests only. No screen changes, and the restart and upgrade path runs end to end in the restart test over the real journal, recovery and fill.
Deferred: a code comment in the reply fill still says "turn began"; it should say "admitted". It's left as is because changing it would make the audit stale.
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 recent change (#47896) made a Slack bot post the words it writes before a trailing
NO_REPLY, instead of staying silent. A reply that was already waiting when someone upgraded Orca could then be posted under that new rule, although it was admitted under the old one (stay silent, except in the bot owner's own DM). Now each waiting reply remembers the rule from when its request was admitted, and the restart path follows it. New requests keep #47896's behavior.What Changed
Checked it. NO_REPLYstayed silent if it finished live. If Orca restarted to upgrade before the reply was filled, the new build's recovery applied the new rule and posted "Checked it." to Slack.quiet_rule, a column added the same way as the table's earlier additions; older builds ignore it). Recovery and the live fill honor it. A row with no record keeps the older rule: the marker silences the whole reply, except to the bot's owner in their own DM (read from the admitting message, as before fix(connectors): a bot's words before a trailing NO_REPLY post in every Slack conversation #47896). New turns keep fix(connectors): a bot's words before a trailing NO_REPLY post in every Slack conversation #47896's behavior. All pending replies to one conversation in a turn share one answer, so they follow the rule of the turn's earliest reply there.Why
The rule should be the one in effect when the request was admitted, not whichever build happens to finish it. Recording it on the pending row is the only place both the live fill and post-restart recovery read.
Linked Issue
N/A (maintainer).
Visual Proof
N/A: no UI change. The change decides whether a Slack reply is sent; it is covered by the restart test below with simulated messages.
Testing
Added an upgrade-restart case to
connector-reply-restart-matrix.test.tson a real journal file: a reply admitted under the older rule, a restart, then recovery. Without the fix it fillsansweredwith "Checked it."; with it,quiet. A row admitted by this build still posts the words.Performance
None, because the only added work is one owner lookup per older-build DM row, and only when a bot's turn ends with the quiet marker.
Risk
Saved data: one nullable column on the reply table; older builds never read it. Worst case if wrong: a reply from the older build stays quiet when its words would now be posted. Known trade-off: hourly team builds cut from main after #47896 and before this fix also leave the rule unrecorded. On upgrade from one of those builds, a pending "words +
NO_REPLY" reply stays quiet instead of posting its words. It fails toward the older silent behavior, never toward posting. Back out with a plain revert (the column stays, unused).Level: Low
AI Disclosure
Review
Agent skill upstream boundary
Notes
Ensure no issues in: Security, Cross-platform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)