Repository navigation
fix: route agent command replies through reply hooks - #90300
sweetcornna wants to merge 1 commit into
Conversation
|
Codex review: needs changes before merge. Reviewed June 30, 2026, 11:19 AM ET / 15:19 UTC. Summary PR surface: Source +13, Tests +51. Total +64 across 2 files. Reproducibility: yes. at source level. Restart recovery calls Gateway Review metrics: 1 noteworthy metric.
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:
Proof path suggestion Risk before merge
Maintainer options:
Copy recommended automerge instructionNext step before merge
Security Review findings
Review detailsBest possible solution: Rebase the hook metadata onto current main's restart-abort-aware durable send block, keep the focused regression coverage, and land this as the canonical fix once checks and proof remain clean. Do we have a high-confidence way to reproduce the issue? Yes at source level. Restart recovery calls Gateway Is this the best way to solve the issue? Yes after rebase. Reusing the existing durable Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 6cb82eaab865. Label changesLabel justifications:
Evidence reviewedPR surface: Source +13, Tests +51. Total +64 across 2 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 (1 earlier review cycle)
|
|
@clawsweeper re-review PR body now includes local runtime delivery proof for |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
445bb4a to
7c28e8b
Compare
|
This pull request has been automatically marked as stale due to inactivity. |
|
Closing due to inactivity. |
|
The current-main successor is #115711. This PR was already closed and its contributor fork is not maintainer-editable, while the landed version must include the restart-recovery path and updated proof. The successor preserves @sweetcornna as co-author and links this PR for provenance. |
Summary
reply_payload_sendinghook metadata into the existing outbound send path.reply_payload_sendingobserve, rewrite, cancel, or fallback-deliver recovered agent replies instead of missing them.Linked context
Closes #90282.
Related #90282.
Real behavior proof
Behavior or issue addressed: restart-recovered agent-command final replies now pass replayable
reply_payload_sendinghook metadata into durable outbound delivery before the outbound adapter receives the payload.Real environment tested: Windows local OpenClaw checkout. Direct runtime proof was captured at PR head
445bb4a60with Node v26.1.0, isolated temporaryOPENCLAW_STATE_DIRandOPENCLAW_HOME. The branch was later rebased onto currentorigin/mainand reverified at PR head7c28e8b60f; the remaining source delta is the same delivery hook wiring plus conflict resolution in the touched test file.Exact steps or command run after this patch: original runtime proof ran
node_modules\.bin\tsx.cmd %TEMP%\openclaw-pr90300-proof-...\proof.mts, which registered areply_payload_sendinghook, delivered one agent-command reply toslack/#proof, and printed the payload received by the outbound adapter. Fresh verification at rebased head7c28e8b60fran:Evidence after fix:
Observed result after fix: delivery completed with
deliveryStatus=sent; the hook ran once for thefinalpayload with channel/session/run context; the outbound adapter receivedhooked: final answer, proving the delivered reply was the hook-mutated payload. The rebased head keeps the same delivery behavior and the focused regression still observes the durable delivery hook metadata.What was not tested: a live gateway restart with external Slack/Discord credentials was not run in this local environment.
Proof limitations or environment constraints: this is local runtime proof for the OpenClaw delivery/hook/outbound path plus fresh source-level verification at the rebased PR head. It does not prove third-party transport delivery after a full gateway process restart.
Before evidence: the added regression first failed before implementation because durable delivery args had
replyPayloadSendingHookasundefined.Tests and validation
node_modules\.bin\tsx.cmd %TEMP%\openclaw-pr90300-proof-...\proof.mtsnode scripts/run-vitest.mjs src/agents/command/delivery.test.tsnode_modules\.bin\oxfmt.cmd --check src\agents\command\delivery.ts src\agents\command\delivery.test.tsgit diff --check origin/main..HEADnode scripts/run-oxlint.mjs src/agents/command/delivery.ts src/agents/command/delivery.test.tsnode scripts/run-tsgo.mjs -p test/tsconfig/tsconfig.core.test.json --incremental --tsBuildInfoFile .artifacts/tsgo-cache/core-test.tsbuildinfopython .agents\skills\autoreview\scripts\autoreview --mode branch --base origin/mainRegression coverage added:
deliverAgentCommandResultcoverage asserting durable final delivery receives replayablereply_payload_sendinghook metadata.path.resolve(...)so the focused file passes on Windows too.Risk checklist
reply_payload_sendinghook path before delivery.Current review state
6868cde4d4and pushed as7c28e8b60f.