Repository navigation
fix(exec): surface ambiguous node outcomes without retrying - #117276
Conversation
|
Codex review: needs maintainer review before merge. Reviewed August 1, 2026, 5:05 PM ET / 21:05 UTC. ClawSweeper reviewWhat this changesThis PR makes node-host exec report timeout, disconnect, malformed, and missing-provenance failures as potentially executed, allowing retry only for an explicitly pre-dispatch Merge readinessKeep this PR open for maintainer review. Current Priority: P1 Review scores
Verification
How this fits togetherNode-host exec turns an agent command into a Gateway flowchart LR
A[Agent exec request] --> B[Node-host execution]
B --> C[Gateway node invoke]
C --> D[Dispatch provenance]
D --> E[Proven not dispatched]
D --> F[Outcome unknown]
E --> G[Safe retry guidance]
F --> H[Do not retry guidance]
G --> I[Tool result or approval follow-up]
H --> I
Decision needed
Why: This is an intentional compatibility tradeoff across two open stacked PRs, not a mechanical defect that review automation can safely resolve without confirming the permanent Gateway-to-agent contract. Before merge
Agent review detailsSecurityNone. PR surfaceSource +295, Tests +571. Total +866 across 14 files. View PR surface stats
Review metricsNone. Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Land or consolidate the Gateway provenance layer first, then retarget/rebase this consumer onto current main and confirm the combined runtime still preserves the explicit pre-dispatch-only retry contract. Do we have a high-confidence way to reproduce the issue? Yes, source-reproducible: current main directly treats the node invoke as a normal result path, and the branch’s focused tests model timeout, disconnect, missing-provenance, and pre-dispatch failures. The reported paired-node execution was not rerun in this read-only review. Is this the best way to solve the issue? Unclear: centralizing the classification before direct, inline-approved, and detached follow-up projections is the right owner boundary, but the required Gateway producer contract could not be fully inspected locally and the mixed-version tradeoff needs maintainer confirmation. AGENTS.md: unclear because the file could not be read completely. Codex review notes: model internal, reasoning high; reviewed against b8655a72a75e. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (8 earlier review cycles)
|
986d75a to
aa41fdc
Compare
aa41fdc to
f54f03d
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
f54f03d to
72e1616
Compare
Co-authored-by: Copilot App <[email protected]> Copilot-Session: aeb0d377-8525-47eb-a494-a1721ff44d87
72e1616 to
d1f786f
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Maintainer decision: accepted. For this stack, retry safety requires a proven pre-dispatch failure: Land the native stack bottom-to-top after its lower layers are ready. This comment records the compatibility decision only and does not request automation. |
…#117276) Co-authored-by: Copilot App <[email protected]> Co-authored-by: Omar Shahine <[email protected]> Copilot-Session: aeb0d377-8525-47eb-a494-a1721ff44d87
What Problem This Solves
Node-host exec could project timeout, disconnect, or malformed post-invoke failures as denial or non-dispatch even when the Gateway could not prove whether
system.runexecuted. That could prompt an unsafe automatic retry and duplicate side effects.This PR is Layer 3 of the native PR stack. It is stacked on #117139 at exact base SHA
8fbbb9cbe13d08894794712455a45e1aca553c9cand depends on that PR landing first. The Layer 3 diff is exactly 14 intended files; it inherits but does not modify Layer 2's regenerated browser runtime.Why This Change Was Made
Consume the Gateway dispatch provenance added by #117139 at a single node-invoke boundary. Only
NOT_CONNECTEDwith explicitnodeCommandDispatched:falseis classified as retry-safenot-dispatched; every timeout, disconnect, post-dispatch, missing-provenance, or malformed result is classified asoutcome-unknown.The current-main approval continuation contract is preserved: canonical
buildExecApprovalContinuationPrompt(...).message, authenticated untrusted-output delimiters, bounded output, redaction, runtime/session handoff, and normal continuation fallback. Distinct outcome-unknown and not-dispatched guidance is selected before that canonical handoff. Detached invocation classification is completed before follow-up delivery so a delivery failure cannot become a false denial.Compatibility decision
The conservative mixed-version contract is intentional. An updated agent talking to a stale Gateway that omits explicit dispatch provenance receives
outcome-unknownand does not retry automatically. OnlyNOT_CONNECTEDwith explicitnodeCommandDispatched:falseis retry-safenot-dispatched. At-most-once side-effect safety intentionally wins over automatic stale-Gateway recovery.User Impact
Users and models now see that an ambiguous node command may have executed and must not be rerun automatically. Direct, inline-approved, detached-approved, embedded tool events, and Gateway agent-event projections retain typed failure details. Existing success and denial behavior is unchanged.
Evidence
build:ci-artifacts: passed and left the Layer 3 worktree clean.git diff --check: passed.0.96.blacksmithexecutable is missing; trusted-source local fallback completed the heavy gates.Exact-head immutable paired-node proof
d1f786f1567b78493bb06a830a53f812b684b414.8fbbb9cbe13d08894794712455a45e1aca553c9c.openclaw-d1f786f1567b78493bb06a830a53f812b684b414.tar.c2c771e8fee6f9a10a1f8fe254959d3dfe65f61c01f99fece89b3507d51418a5.29789, mock Responses port29790, proof-owned state, a fresh signed node identity, normal pairing, explicit command-surface approval, and node approvalssecurity:"full",ask:"off",askFallback:"full".Redacted observed outcomes:
UNAVAILABLE;details.code:"NOT_CONNECTED", nestednodeError.code:"NOT_CONNECTED",nodeCommandDispatched:falseisError:true,reason:"outcome-unknown",failureCode:"TIMEOUT",nodeCommandDispatched:true; caller says it may have executed and must not be rerun automaticallyisError:true,reason:"outcome-unknown",failureCode:"DISCONNECTED",nodeCommandDispatched:true; caller says it may have executed and must not be rerun automaticallyoutcome-unknown, may have executed, and do not rerun automatically; canonical untrusted-output delimiters retainedAll proof-owned node, Gateway, and mock-provider processes were stopped. Ports
29789and29790were verified closed.