feat(joke-bot): sandbox:false (HTTP writeback, no Daytona box) + channel guard#84
Conversation
joke-bot replied to an @mention in #epic-relayfile-migration — a channel it should not answer in. Its slack `message.created` trigger wakes across channels (the broad slack scope feeds the wake-path match), and the trigger-level `match: '@mention'` gate is not enforced cloud-side yet (AgentWorkforce/cloud#2411 merged; pending deploy). So any @mention in any channel woke it and it replied. Add a handler-level channel guard in handleSlackMention: resolve SLACK_CHANNEL, normalize the event channel `id__name` → `id`, and skip unless they match. Now joke-bot only ever replies in the configured channel, regardless of where the wake fires. Once #2411 deploys, the trigger `match` will also stop the wake. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
Warning Review limit reached
More reviews will be available in 55 minutes and 34 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (3)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9890c40985
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| // would answer @mentions in ANY channel. Normalize `id__name` → `id`. | ||
| const want = input(ctx, 'SLACK_CHANNEL'); | ||
| const chanId = channel.split('__')[0]; | ||
| if (want && chanId !== want) { |
There was a problem hiding this comment.
Require configured channel before allowing replies
When SLACK_CHANNEL cannot be resolved, this guard is bypassed because it only returns on want && chanId !== want; the handler then continues and replies in the event's channel. Since the Slack trigger can still wake across channels, a missing or miswired channel input leaves the original cross-channel reply behavior intact instead of failing closed like the relay and cron paths do.
Useful? React with 👍 / 👎.
|
pr-reviewer could not complete review for #84 in AgentWorkforce/agents. |
…0.4.1) joke-bot no longer needs a Daytona box. Reply generation is ctx.llm.complete (one inference call) and the Slack writeback now goes over the relayfile HTTP API instead of the FS mount — so a box/mount is unnecessary. - persona: sandbox: false (handler runs in the persona runner, ms; no cold start). - bump @relayfile/relay-helpers 0.3.42 → ^0.4.1, which resolves @relayfile/adapter-core 0.4.2 (relayfile-adapters#221): writeJsonFile routes to RelayFileClient (HTTP, over the injected RELAYFILE_TOKEN/URL) when no FS mount is configured, and to the FS mount when one is (unchanged for harness agents). cloud already injects RELAYFILE_TOKEN/URL on the sandbox:false path (cloud#2412). Repo-wide dep bump: other agents pick up relay-helpers 0.4.1 on their next deploy (API-compatible; joke-bot typechecks clean). Channel guard from the prior commit on this branch is retained. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Pairs with the relay-helpers 0.4.1 bump on this branch — joke-bot runs in the persona runner with no Daytona box; the Slack writeback goes over the relayfile HTTP API. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Addresses Codex P2 on the slack mention path: the channel guard only returned on `want && chanId !== want`, so a missing/miswired SLACK_CHANNEL fell through and replied in the event's channel. Now returns when `want` is unset, matching the relay and cron paths. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
ℹ️ pr-reviewer: review only — no file changes were applied to the PR (nothing to commit after review). The notes below are advisory and were not pushed. PR #84 Review —
|
|
ℹ️ pr-reviewer: review only — no file changes were applied to the PR (nothing to commit after review). The notes below are advisory and were not pushed. Working tree is clean — I made no edits (none were needed). The Review SummaryPR #84 (
Verification: Addressed comments
Advisory Notes
The PR is internally consistent, typechecks, and its tests pass in a clean environment. No mechanical or semantic fixes were required, so the working tree is unchanged. The remaining items (the |
|
ℹ️ pr-reviewer: review only — no file changes were applied to the PR (nothing to commit after review). The notes below are advisory and were not pushed. Review: PR #84 —
|
joke-bot, the linear-slack @mention gate, and the relay-helpers ^0.4.1 bump already landed on main via #83/#84. Resolve the add/add conflicts in favor of this branch (identical content for all except joke-bot/agent.ts, where this branch additionally carries the PR #85 review fixes: channel id normalization + leading-only mention strip). Net-new here remains inbox-buddy + those fixes.
Makes joke-bot a true lightweight reply bot — no Daytona sandbox — and fixes it replying outside its configured channel.
What changed
sandbox: false(persona). The handler answers with onectx.llm.completecall and runs in the persona runner — no Daytona box, no cold start (ms instead of minutes).@relayfile/relay-helpers0.3.42 → ^0.4.1(resolves@relayfile/adapter-core0.4.2, relayfile-adapters#221):writeJsonFileroutes toRelayFileClient(HTTP, via the injectedRELAYFILE_TOKEN/RELAYFILE_URL) when there's no FS mount, and to the FS mount when there is one (unchanged for harness/sandbox agents). cloud injects those vars on thesandbox:falsepath (cloud#2412).agent.ts). The slack trigger wakes across channels (broad slack scope feeds the wake-path match; triggermatchisn't enforced cloud-side yet), so the handler now drops any@mentionwhose channel ≠SLACK_CHANNEL. Fixes joke-bot answering in#epic-relayfile-migration.Scope note
The relay-helpers bump is repo-wide — other agents pick up
0.4.1on their next deploy (API-compatible; joke-bot typechecks clean). Nothing else is redeployed by this PR.Why sandbox:false is safe here
joke-bot reads no provider data / VFS and never calls
ctx.harness.run. Agents that need the FS mount or a harness CLI must staysandbox: true.🤖 Generated with Claude Code