Skip to content

fix(chief): create specialists from channels - #554

Merged
milind-soni merged 1 commit into
mainfrom
codex/chief-channel-create-bot
Aug 28, 2026
Merged

fix(chief): create specialists from channels#554
milind-soni merged 1 commit into
mainfrom
codex/chief-channel-create-bot

Conversation

@milind-soni

@milind-soni milind-soni commented Aug 28, 2026

Copy link
Copy Markdown
Owner

Summary

  • let a section Chief use create_bot from channel conversations and channel task threads
  • reuse the existing conversation ownership check so direct tasks keep working
  • require fresh channel membership and preserve the Chief-only permission gate

Why

The agents MCP is mounted for channel turns, but the internal creation route only accepted the Chief’s private task threads. That made the advertised tool fail with 403 source thread does not belong to sender whenever it was called from a channel.

Validation

  • pnpm vitest run server/index.test.ts — 107 passed
  • pnpm typecheck
  • git diff --check
  • regression coverage includes direct tasks, historical and active channel tasks, non-member Chiefs, and non-Chief channel members

Summary by CodeRabbit

  • New Features

    • Chief of Staff bots can now create operator bots from direct messages, channel conversations, and nested channel tasks they own.
  • Bug Fixes

    • Improved access validation to allow valid channel-based bot creation while rejecting unauthorized bots and channels.
    • Prevented bot records from being created when authorization checks fail.

@vercel

vercel Bot commented Aug 28, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
openmausbot-docs Ready Ready Preview Aug 28, 2026 10:32pm

Request Review

@coderabbitai

coderabbitai Bot commented Aug 28, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: cd1db1da-cc25-46d1-89b6-0881e30008d9

📥 Commits

Reviewing files that changed from the base of the PR and between 3b6c7a8 and 2d2ad65.

📒 Files selected for processing (2)
  • server/index.test.ts
  • server/index.ts

Included review availability: Your plan provides up to 4 included reviews per hour; 2 remain after this review.


📝 Walkthrough

Walkthrough

The create-bot endpoint now accepts Chief-owned channel threads in addition to direct task threads. An HTTP test verifies successful operator creation and 403 responses for unauthorized senders and channels.

Changes

Chief operator creation

Layer / File(s) Summary
Thread ownership validation and API coverage
server/index.ts, server/index.test.ts
The endpoint validates source threads with connectorThread. The test verifies creation from direct, channel-root, and nested channel threads, and rejects non-Chief and outsider-channel requests with 403 responses.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: 🔵 Low · up to 2d2ad

Chiefs can now create bots from authorized channel conversations while current membership and Chief-only checks remain enforced. The change is mergeable with owner awareness that the service endpoint should eventually bind caller credentials to bot identity to reduce potential identity-substitution risk.

Suggested reviewers: aivsomkar, willsigmon

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description check ✅ Passed The description explains what changed, why it changed, and how it was verified. It also lists regression coverage and validation commands. It omits the repository checklist and uses equivalent heading…
Title check ✅ Passed The title clearly and concisely describes the main change: enabling Chiefs to create specialist bots from channel conversations.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2…
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: Description check

Explanation

The description explains what changed, why it changed, and how it was verified. It also lists regression coverage and validation commands. It omits the repository checklist and uses equivalent headings instead of the template headings, but the required change context is complete.

Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2 files.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/chief-channel-create-bot

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

Comment @coderabbitai help to get the list of available commands.

@milind-soni
milind-soni merged commit 8a60550 into main Aug 28, 2026
9 checks passed
@milind-soni
milind-soni deleted the codex/chief-channel-create-bot branch August 28, 2026 22:39
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