Skip to content

fix(bots): a helper answering a bot's question is no longer told to post in the asker's thread - #48630

Merged
brennanb2025 merged 1 commit into
mainfrom
brennanb2025/bot-question-keeps-thread-origin
Nov 25, 2026
Merged

brennanb2025 merged 1 commit into
mainfrom
brennanb2025/bot-question-keeps-thread-origin

Conversation

@brennanb2025

@brennanb2025 brennanb2025 commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

ELI5

When a bot working on a Slack thread asks another bot a question, the answer is supposed to come back to the bot that asked. But the helper bot was also being told "post what you find in that Slack thread". Now only a bot that was handed the whole job is told to post in the thread; a bot that was asked a question, or just told something, is not.

What Changed

  • A request's thread, issue or pull request now becomes the receiving turn's origin only when the request is a handoff. A question or status request no longer passes it on, so an item the helper adds for it gets no startedIn, and its worker's report no longer says to post there.
  • Status mail is no job, so status mail taken beside a handoff no longer hides the handoff's origin.
  • A question taken in the same turn as a handoff makes the turn's origin unclear, so it names none (same rule as two requests from different places).
  • The question's own request view still shows where it started, as context. Requests the helper sends on carry no origin, since the job stays with the asking bot.

Why

A request's record keeps the place its chain started in for every purpose, and the reader that turns a request into the receiving turn's origin used it for every purpose too. So a helper answering a question added an item that linked the asker's thread, and its worker's report said "post what this result settles there". That contradicts the question's own instructions, which say to answer by mail and that the job stays with the asker. Wrong delivery was not observed; the guidance conflicted.

Handoffs keep their thread, so the fix in #47789 (a handed-off job's result goes back to the thread it started in) still holds.

Linked Issue

Fixes STA-18016.

Visual Proof

N/A, no app screen changes. The only text change is guidance an agent reads: a question's or status's helper no longer gets the posting line.

Worker report guidance for a helper's item, before and after

Before, for a question:

This worker was started for item 7, "Check p95" (In progress). If this result changes the item, update it with orca bot item <cancel|comment|done|set> 7. Its work started in https://example.slack.com/archives/C1/p1795415167287389: post what this result settles there.

After, for a question or status:

This worker was started for item 7, "Check p95" (In progress). If this result changes the item, update it with orca bot item <cancel|comment|done|set> 7.

A handoff's is unchanged.

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

bot-request-origin-place.test.ts reads real request records through the real record reader into a turn: a handoff keeps its thread; a question or status gives none; status beside a handoff keeps it; a question, a handoff with no place, or a handoff from another thread beside it gives none. It fails with the change reverted.

A throwaway script also ran the generated path (request record → helper turn → item startedIn → worker report line) for each purpose before and after, with no post to a real thread; no app run. A closed item's report already shows no item line.

Performance

None. The same records are read; one field is checked.

Risk

Only external chains (Slack, GitHub, Linear) carry an origin, so Orca-only chats are unchanged. On external chains, items a helper adds while answering a question or reading status mail no longer link the asker's thread automatically. A turn that takes a handoff and a question together names no origin, so that handoff's item has no startedIn; the handoff's own request view still names its thread and post command. Items added before this change keep the origin they stored. No stored data changes, so a plain revert backs it out.

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

No platform-specific code, no wire or storage format change (paired computers and SSH hosts read the same records), no new reads.

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)

…ger owes the asker's thread a post

Only a handoff passes its thread, issue or pull request on to the receiving turn. A question's answer and status mail go back by mail, so an item the helper adds no longer links that place and its worker's report no longer says to post there. Status mail beside a handoff no longer hides the handoff's place.

Fixes STA-18016
@brennanb2025
brennanb2025 marked this pull request as ready for review November 25, 2026 02:09
@coderabbitai

coderabbitai Bot commented Nov 25, 2026

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Request records now mark status-purpose requests with wantsNothing and include originPlace only for handoffs. Origin-place aggregation excludes records marked wantsNothing. Tests cover how handoff, question, and status records affect the resolved origin place.

Merge Risk: Minimal · up to 39bf6

This change stops helpers answering questions or status mail from being told to post in the asker's thread, and keeps the handoff behavior unchanged. No merge-blocking risk was found.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: a helper answering a bot's question should no longer be told to post in the asker's thread. The title matches the handoff-only origin rule in the raw summary and the o…
Description check Passed The description follows the template. It has ELI5, What Changed, Why, Linked Issue (Fixes STA-18016), Visual Proof (N/A with reason), Testing, Performance, Risk with level, AI Disclosure section, Revi…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: a helper answering a bot's question should no longer be told to post in the asker's thread. The title matches the handoff-only origin rule in the raw summary and the objectives. It uses the fix(bots) form and is specific.

Full details: Description check

Explanation

The description follows the template. It has ELI5, What Changed, Why, Linked Issue (Fixes STA-18016), Visual Proof (N/A with reason), Testing, Performance, Risk with level, AI Disclosure section, Review, upstream boundary, Notes, and Checklist. The AI Disclosure and Review sections are empty. The template marks AI Disclosure as optional for internal contributors, and Review has no required content, so these gaps are minor. The Linked Issue uses an internal ticket ID, not a GitHub issue number, so it may not meet the outside-contributor rule. The Testing section marks the manual testing box unchecked, but the automated test box is checked, which is acceptable.

  • 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.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: a81d57ae-7cfe-4ae9-b257-2947848a80a4
Commits

Reviewing files that changed from the base of the PR and between 315dacd and 39bf611.

Files selected for processing: 3

  • src/main/bots/bot-request-asker.ts
  • src/main/bots/bot-request-origin-place.test.ts
  • src/main/runtime/rpc/methods/orchestration/messaging/bot-request-record.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 4 remain after this review.

@brennanb2025
brennanb2025 marked this pull request as draft November 25, 2026 02:14
@brennanb2025
brennanb2025 marked this pull request as ready for review November 25, 2026 02:24
@brennanb2025

Copy link
Copy Markdown
Contributor Author

Ready for review. A request's thread, issue or pull request now carries over to the receiving bot's work only for handoffs. A bot answering a question, or reading status mail, no longer gets an item linked to the asker's thread or an instruction to post there; handoffs keep their thread as before. Checked with the origin test (it fails with the fix reverted) and the full CI run on this head.

@brennanb2025
brennanb2025 merged commit fc630c5 into main Nov 25, 2026
147 checks passed
saltyfireball pushed a commit to saltyfireball/orca that referenced this pull request Nov 25, 2026
…ger owes the asker's thread a post (stablyai#48630)

Only a handoff passes its thread, issue or pull request on to the receiving turn. A question's answer and status mail go back by mail, so an item the helper adds no longer links that place and its worker's report no longer says to post there. Status mail beside a handoff no longer hides the handoff's place.

Fixes STA-18016

(cherry picked from commit fc630c5)
(cherry picked from commit 4dc40fc8902fc6d9707a6946e1fd0e8b42206341)
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