Spinen/msteams multi account#97340
Conversation
|
Codex review: needs changes before merge. Reviewed July 11, 2026, 8:10 AM ET / 12:10 UTC. Summary PR surface: Source +1560, Tests +2547, Docs +186, Generated 0, Other +21. Total +4314 across 77 files. Reproducibility: not applicable. for the requested feature: this adds a new Teams capability rather than fixing an established behavior contract. The current-head compile failure is directly reproducible through the extension package-boundary check. Review metrics: 2 noteworthy metrics.
Stored data model Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Copy recommended automerge instructionNext step before merge
Maintainer decision needed
Security Review findings
Review detailsBest possible solution: Pass the resolved account identity through every inbound handler construction, format the reported files, prove the exact head with focused package-boundary and Teams checks, then explicitly accept or revise the accounts-and-per-port-listener contract before shipping it. Do we have a high-confidence way to reproduce the issue? Not applicable for the requested feature: this adds a new Teams capability rather than fixing an established behavior contract. The current-head compile failure is directly reproducible through the extension package-boundary check. Is this the best way to solve the issue? No, the current head is not yet the best complete solution because one inbound dependency construction drops required account context. The broader accounts-and-bindings approach matches established channel patterns and has strong live proof once that omission is repaired and the listener contract is accepted. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 1285fd6db457. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +1560, Tests +2547, Docs +186, Generated 0, Other +21. Total +4314 across 77 files. View PR surface stats
Acceptance criteria:
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
Review history (15 earlier review cycles; latest 8 shown)
|
…i-account # Conflicts: # src/config/bundled-channel-config-metadata.generated.ts # src/routing/resolve-route.test.ts
…i-account # Conflicts: # src/config/bundled-channel-config-metadata.generated.ts
…i-account # Conflicts: # extensions/msteams/src/conversation-store-state.test.ts # extensions/msteams/src/send-context.test.ts # src/config/bundled-channel-config-metadata.generated.ts
|
Maintainer note: these existing PRs were opened from the Spinen organization fork, and I learned that GitHub's normal "allow edits from maintainers" flow may not work reliably for org-owned forks. For future OpenClaw PRs, I'll open from my personal fork so maintainer edits work normally. For this existing batch, I want to make collaboration as easy as possible. I've invited @steipete as a temporary Write collaborator on My goal is to make these branches easy to finish, not to create extra process. |
…i-account # Conflicts: # extensions/msteams/src/channel.actions.test.ts # extensions/msteams/src/channel.ts # extensions/msteams/src/graph-group-management.test.ts # extensions/msteams/src/graph-group-management.ts # extensions/msteams/src/graph-members.ts # extensions/msteams/src/graph-messages.actions.test.ts # extensions/msteams/src/graph-messages.ts # extensions/msteams/src/monitor.ts
|
ClawSweeper status: review started. I am starting a fresh review of this pull request: Spinen/msteams multi account This is item 1/1 in the current shard. Shard 0/1. This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking. Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted. |
Related: #71058
What Problem This Solves
Resolves a problem where Microsoft Teams could only be configured as one bot identity per OpenClaw gateway. That made it difficult to run multiple Teams-visible agents, each with its own Teams app/bot registration, from the same OpenClaw instance in the same way operators can use account-specific routing with other channel integrations.
Why This Change Was Made
This adds first-class account support to the Microsoft Teams channel while preserving the legacy single-bot configuration path.
channels.msteams.accounts.<id>now defines Teams bot accounts,channels.msteams.defaultAccountselects the implicit account when one is not provided, and existing root-levelappId/appPassword/tenantId/webhookconfig continues to work as the default account.The implementation keeps account identity fields explicit per named account: named accounts must provide their own
appId, credential, and webhook port, while shared settings such astenantId, webhook path, policies, Graph/SSO/delegated-auth settings, streaming behavior, and delivery settings can be inherited from the root and overridden per account. Inbound handling, proactive sends, replies, Graph-backed actions, SSO/delegated token storage, polls, sent-message cache, conversation state, probes, setup flows, and routing all carry the account context.User Impact
Users can now configure multiple Microsoft Teams bot accounts in one OpenClaw gateway and bind each account to the agent that should answer:
Existing single-bot configs remain valid and do not require bindings:
Evidence
pnpm test:extension msteamspnpm test:contracts:channels(45 files, 305 tests)pnpm buildpnpm checkgit diff --checkcodex review --base upstream/main: no actionable correctness issues found.AI-assisted: yes. I used Codex to help implement, audit, test, and review this change, and I reviewed the behavior and code paths before opening the PR.
If this gets merged, then I will focus on enhancements next.