Repository navigation
refactor: simplify outbound message execution context - #139107
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: blocked before merge. Reviewed September 5, 2026, 11:17 AM ET / 15:17 UTC. ClawSweeper reviewWhat this changesReuses resolved delivery context across message actions and consolidates core sending while preserving existing delivery interfaces. Merge readiness⛔ Blocked before merge - 1 item remains This remains useful work absent from current main. No blocking correctness or security finding was identified; the maintainer-owned PR should remain open. Priority: P3 Review scores
Verification
How this fits togetherOutbound message execution turns CLI and agent actions into plugin or Gateway deliveries. It also coordinates delivery receipts, session routes, and transcript mirrors. flowchart TD
A[CLI and agent actions] --> B[Resolved delivery context]
B --> C[Delivery ownership decision]
C --> D[Plugin or Gateway action]
C --> E[Core send and durable queue]
D --> F[Delivery result]
E --> F
F --> G[Session route and transcript mirror]
Before merge
Agent review detailsSecurityNone. PR surfaceSource -205, Tests -63. Total -268 across 8 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep one internal execution context and one core-send path, with explicit plugin/RPC projections and unchanged delivery ordering. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR proposes a behavior-preserving refactor rather than a reported bug fix; no tests were executed during this read-only review. Is this the best way to solve the issue? Yes: reusing the existing resolved context removes synchronization work while keeping external projections explicit; another parallel context abstraction would retain the duplication. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 31903060a5d4. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
e469bd8 to
ecad930
Compare
|
Maintainer verification of the remaining ClawSweeper proof-access item: I directly inspected the downloaded Gateway report, per-scenario evidence, source identities, and cleanup record. The recorded run passed both scenarios with no failures or skips; the Testbox is stopped. The three changed production-file hashes still match that tested candidate after the mechanical rebase. The captured observations were: {"scenario":"a2a-message-tool-mirror-dedupe","status":"pass","visibleMessageToolReplies":1,"sourceReplyDelivered":true,"terminalReplyDisposition":"empty","duplicateWindowMs":8000}
{"scenario":"thread-reply-current-source-delivery","status":"pass","observedReply":"QA-THREAD-RECEIPT-OK"}The full tracked-tree digest before and after installation/build/QA was The renewed independent P2 review is clean, and CI run 33979945202 passed on |
|
Native prepare gates passed for |
|
Merged via squash.
|
* commit '3e4becea5e2ce38ede69e8ecf5302805ecbfc09c': refactor: simplify outbound message execution context (openclaw#139107) fix(models): keep ordinary chat selections session-scoped (openclaw#139232) docs: slim root agent instructions and clarify testing scope (openclaw#139236) test(agents): give the sibling-drain completion wait a tolerance on slow runners (openclaw#139176) refactor(workboard): use canonical queries for card-tree writes (openclaw#139106) fix(canvas): recognize versioned macOS nodes (openclaw#138958) fix: load GitHub connections without a default agent (openclaw#139222) fix(memory): explain unsafe legacy host-event path recovery (openclaw#139195) refactor(talk): centralize typed voice session queries (openclaw#139103) fix(cli): preserve command dispatch and structured errors (openclaw#139067) refactor(agents): consolidate reply failure summaries (openclaw#139175) fix(auth): keep an unset default model unchanged during login (openclaw#139218) perf(media): reuse validated attachment read handles (openclaw#139168) refactor(channels): simplify account configuration updates (openclaw#139096) refactor(android): remove unused updater export root (openclaw#139198) fix(gateway): stop admitting post-ready producers during close (openclaw#139092) fix(gateway): expose agent hook completion outcomes (openclaw#139155) fix(config): return the saved configuration after plugin install commits (openclaw#139203) fix(android): reduce repeated retries to unreachable gateways (openclaw#138732)
Additional instructions
MUST: Keep Allow edits from maintainers enabled for this PR so maintainers can help update the branch when needed.
What Problem This Solves
Outbound message handling repeatedly copied the same resolved delivery context into separate private shapes. Send, poll, plugin dispatch, and source-delivery annotation had to keep these projections synchronized, while core send maintained two equivalent execution paths.
Why This Change Was Made
Carry the resolved action context through internal execution and use one core-send path. Keep the explicit plugin and Gateway request projections at their existing boundaries. Native and core acceptance share the same route-commit callback, preserving route-before-receipt and mirror ordering.
Production changes are +223/-428 = -205 lines; tests and support are -63 lines. The public message-action input, plugin SDK, protocol, config, and storage formats are unchanged. Poll deliberately retains its narrower requester and media context. Retry ownership, required queue persistence, scoped media reads, cancellation, dry runs, and mirror destinations retain their existing policies.
User Impact
No intended behavior change. Operators can send messages, create polls, and invoke plugin actions through the same interfaces.
Evidence
Built Gateway QA completed on an isolated Linux Testbox with Node 24.19.0, a mock OpenAI provider, and the QA channel. Both
a2a-message-tool-mirror-dedupeandthread-reply-current-source-deliverypassed. All 38,074 tracked source files matched the frozen local candidate before and after the run. Gateway proof run.{"verdict":"PASS","processDifferentialCases":14,"gatewayScenarios":["a2a-message-tool-mirror-dedupe","thread-reply-current-source-delivery"],"sourceIdentityUnchanged":true}CI refresh: rebased onto current main after the prebuilt UI admission import was repaired in #139123. All three production owner hashes still match the live proof. An unchanged Gateway event-loop recovery assertion failed once in CI and passed on the focused rerun; no assertion or timeout was changed.