Repository navigation
fix(channels): dispatch replies in ACP-bound conversations - #149801
ZengWen-DT wants to merge 1 commit into
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs real behavior proof before merge. What this changesPreserves the configured channel agent for reply-runtime admission while Discord and Matrix text follow-ups execute in their bound Agent Client Protocol (ACP) harness session. Example: Send “continue” in Discord conversation C123 bound to agent:opencode:acp:bound-session.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Partial Merge readiness⛔ Blocked before merge - 2 items remain This PR addresses a source-confirmed defect still present on current main. No concrete introduced code defect was found, and the overlapping proposals do not provide a proven replacement. Priority: P1 Before merge
FindingsNone. Tests
Agent review detailsHow this fits togetherChannel routing selects an OpenClaw agent, and conversation bindings can redirect a message to an external ACP harness. Reply dispatch needs the configured agent’s published runtime while the bound harness retains execution, storage, and transcript identity. flowchart TD
A[Discord or Matrix message] --> B[Channel access and routing]
B --> C[Current conversation binding]
C --> D[Configured reply owner]
C --> E[Bound harness session]
D --> F[Published runtime admission]
F --> G[Revalidate binding and execute]
E --> G
G --> H[Channel reply]
Technical reviewBest possible solution: Keep configured runtime admission separate from harness execution and storage while preserving sender authorization and current-binding checks. Do we have a high-confidence way to reproduce the issue? Yes, from source: a bound channel route replaces the configured agent with the harness identity, which cannot load a configured-only published runtime. The linked report supplies live failures; this review did not execute target code. Is this the best way to solve the issue? Yes for text follow-ups: preserving the configured admission owner repairs the established contract without changing harness session identity. Native Discord slash commands remain outside this patch. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against a69dbd6385c9. Provenance checked
TestingProof path: unit tests only. SecurityNeeds attention: No concrete bypass or supply-chain regression was found; the changed cross-owner admission boundary still lacks final-effect proof. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +17, Tests +54. Total +71 across 17 files. Added test files: 0. View PR surface stats
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. LabelsLabel changes: No label changes. Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (6 earlier review cycles)
Reviewed October 9, 2026, 1:22 AM ET / 05:22 UTC (Revision 7). |
|
Related: #165517 carries the same #146365 dispatch-owner fix through the generic route spread (plus reply scope and fast-path init), which is what Telegram-bound harness turns need — this PR's Discord/Matrix monitor-level coverage doesn't reach them. Flagging the overlap on |
7f40532 to
eaabfe1
Compare
eaabfe1 to
a9c6c05
Compare
Related: #146365
What Problem This Solves
Fixes: text follow-ups in Discord and Matrix conversations bound to a spawned ACP session can fail with
prepared reply dispatch runtime owner was not publishedwhen the harness is not a configured Gateway agent.User Impact
Text follow-ups retain the configured channel agent for reply-runtime admission while ACP execution, session storage, and transcript identity keep the bound harness target. No configuration or stored-data migration is introduced.
Native Discord slash commands remain outside this change, so this PR does not close the broader issue.
Why This Change Was Made
Conversation bindings rewrite the routed agent and session to the ACP target. The optional reply-dispatch owner preserves the configured source agent across the Discord and Matrix inbound-context builders. The refreshed implementation retains current main's route-observation symbols, asynchronous binding activity checks, and revoked-binding revalidation. Callers that omit the field retain the previous source-session fallback.
AI-assisted: yes. The refreshed code and sanitized local evidence were independently reviewed.
Evidence
fd2fa6b904a2069bf9c2c150302475dffdc51e29to incorporate upstream fixes for both prior CI roots: restored script lint directives (392166d0) and the prepared-catalog import-cycle repair (80bfd0f5).onRuntimeLeaseassertion. Optional-owner fallback, binding observations/revalidation, and harness-scoped execution/storage remain covered.0159e2b0ee280f9f1102e4eb4c1be2f80e986767, 188 tests in ten files passed in 202.278 seconds total command wall, including cold worker preparation. These cover dispatch ownership/lifecycle, binding activity and revocation, shared context/routing, Discord preflight/context/binding, and Matrix routing/binding observation.447144510b899463ee89774b62d015631d3bd891is clean and preserves the exact main-relative ACP patch. Local runtime/type results belong to pinnedfd2fa6b9, not that later composition.Live proof remains outstanding: the dispatch regression mocks runtime publication, ACP execution and delivery; it does not establish real runtime-lease acquisition or configured-owner admission followed by real harness execution and receipt in Discord or Matrix. Before merge, provide current-candidate after-fix channel/harness evidence plus unauthorized-sender and removed/reassigned-binding rejection before ACP I/O. Existing local negative controls do not establish the full cross-owner channel path.
Publication and prior CI/review
a9c6c0551fcc68851d3bbf795af3aedb792b8c2a, one commit on testedfd2fa6b9, exact tree0159e2b0ee280f9f1102e4eb4c1be2f80e986767. Exact-head CI 37886818337 completed successfully: 55 successful jobs, 25 skipped, no failures. The requiredopenclaw/ci-gate, dependency review, and applicable security-review statuses are success. Hosted architecture and full lint both passed, clearing the two previous CI roots.eaabfe1finished with 52 successful and 25 skipped jobs, two root failures and the failed aggregate. Madge matched a failing main control; the script lint failure was attributed by source comparison to newer-main removal of the directives, without a matching failed-main runtime claim. The refreshed executed checks above now pass both failing scopes.a9c6c055found no concrete introduced bypass or actionable code defect, and removed the compatibility risk label. It lists two remaining checklist items: real channel/harness behavior proof and a medium security concern that cross-owner unauthorized-sender or removed/reassigned-binding denial lacks final-effect evidence before real ACP I/O. Both remain open; green CI does not satisfy this proof requirement.