test(reactions): lock down agent-runtime path + clawdbot follow-up#380
Open
samxu01 wants to merge 1 commit into
Open
test(reactions): lock down agent-runtime path + clawdbot follow-up#380samxu01 wants to merge 1 commit into
samxu01 wants to merge 1 commit into
Conversation
The reaction endpoint already accepted cm_agent_* tokens through dualAuth + the req.agentUser branch in reactionController, but there was no test asserting the agent path works — a refactor of dualAuth or agentRuntimeAuth could silently regress it. Adds 6 unit tests covering: - agent caller with active AgentInstallation → reacts + socket emits - agent caller without installation but in Pod.members → still works - agent caller in neither → 403 - human caller takes the pg pod_members path (no AgentInstallation lookup) - unauthenticated → 401 - bad emoji shape → 400 Documents the dual-auth invariant in CLAUDE.md so future social-presence primitives (typing, read-receipts, ...) take the same shape. Note: the openclaw/clawdbot extension does not yet expose commonly_react_to_message as a tool, so moltbot agents (theo/nova/...) can't react autonomously yet — that work lives in the openclaw fork. The MCP server already exposes the tool, so MCP-driven agents (Cody, Cursor, Claude Code with @commonlyai/mcp) can react today.
samxu01
added a commit
that referenced
this pull request
May 16, 2026
#380) The reaction endpoint already accepted cm_agent_* tokens through dualAuth + the req.agentUser branch in reactionController, but there was no test asserting the agent path works. Adds 6 unit tests covering: - agent caller with active AgentInstallation → reacts + socket emits - agent caller without installation but in Pod.members → still works - agent caller in neither → 403 - human caller takes the pg pod_members path (no AgentInstallation lookup) - unauthenticated → 401 - bad emoji shape → 400 Documents the dual-auth invariant in CLAUDE.md so future social-presence primitives (typing, read-receipts, ...) take the same shape. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
samxu01
added a commit
that referenced
this pull request
May 16, 2026
…MCP servers Verified empirically 2026-05-15 after merging #388: codex CLI 0.125.0 recognizes [mcp_servers.commonly] in config.toml (`codex mcp list` shows it enabled), but `codex exec` does NOT actually connect to or expose tools from configured MCP servers. The model's tool list stays limited to codex's built-in tools (web, image_gen, exec_command, apply_patch, ...). list_mcp_resources returns empty regardless. Per docs/MCP_INTEGRATION.md, the supported codex pattern is to wrap codex AS an MCP server (codex-as-mcp), not to have codex consume MCP servers. So #388 adds noise without effect. For Cody to actually call commonly_react_to_message autonomously, the real options are: - Switch her adapter from codex → claude-code or another MCP- consuming host (architectural decision). - Add the reaction tool to the openclaw extension's commonly_* block (separate Team-Commonly/openclaw PR; out of the "make-collab-bulletproof" goal's "no openclaw-coupled fixes" constraint). Keeping the four ship-PRs (#379/#380/#381/#382 + #383/#384/#385/#386 follow-ups) in place — they're all correct. Just removing #388. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Gap 4 (autonomous agent reactions) inventory + regression coverage:
POST /api/messages/:messageId/reactionsalready accepts `cm_agent_*` tokens via `dualAuth` and gates agent callers correctly (`AgentInstallation` → `Pod.members` fallback). Same `messageReaction` socket emit fires for both paths. Shipped.This PR adds:
Test plan
Follow-up
🤖 Generated with Claude Code