Repository navigation
fix(nodes): preserve pairing errors during workspace setup - #173209
Conversation
Keep the invocation rejection as the terminal channel reason so listener and start-send setup preserve typed pairing failures. Existing bounded workspace read recovery can then classify the original rejection; channels remain terminal and authority fences remain intact. Add deterministic service-owned dispatch regressions for both setup operations. The original rejection already survived on closed, but setup previously received generic closure errors.
|
🦞👀 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 SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex review: needs maintainer review before merge. What this changesThis PR preserves the original node invocation error during duplex listener setup and failed sends. Example: A workspace.skills invocation rejects after readiness with UNAVAILABLE, retryable: true, and details.code: PAIRING_CHANGED.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this PR open: it repairs a concrete metadata-loss defect still present on current main, preserves terminal channel behavior, and introduces no identified correctness or security defect. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe Gateway duplex owner connects plugin and service callers to canonical node invocation, translating binary messages into transport frames and returning results or terminal errors. flowchart LR
A[Workspace Skills read] --> B[File transfer adapter]
B --> C[Service node invoker]
C --> D[Shared duplex owner]
D --> E[Canonical node invocation]
E --> F[Paired node]
E --> D
D --> B
Technical reviewBest possible solution: Preserve the original rejection in the shared duplex owner while retaining terminal closure, existing authority fences, and adapter-owned read retries. Do we have a high-confidence way to reproduce the issue? Source establishes the post-readiness rejection path and generic error replacement, and the body records both added cases failing before the repair and passing afterward; this read-only review executed no target code. Is this the best way to solve the issue? The repair belongs in the shared owner that loses the metadata, serves both plugin and service callers, and requires no duplicate recovery policy or new API. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 2e250667fa20. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +12, Tests +26. Total +38 across 2 files. Added test files: 0. View PR surface stats
LabelsLabel 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 Reviewed October 15, 2026, 10:59 AM ET / 14:59 UTC. |
|
Merged via squash auto-merge.
|
A settled node invoke can disappear before its pairing-change response reaches the duplex caller. A concurrent start-frame send then replaces that response with a generic missing-invocation error, preventing existing read recovery from classifying the failure. Mark definitely retired input and join the original invocation result before framing handles the send failure. Join the raw promise, avoiding a dependency on output-listener draining. Live transport failures retain their immediate path; no retry, timeout or authority policy changes. Follow up #173209. The new ordering case fails on original production under Node and Bun and passes after the fix. All 228 focused owner, retention, registry, policy, framing and workspace tests pass on Node. The fifth hourly still lacks its nested cause, so exact CI attribution remains unproven; the unchanged native E2E passes locally.
) Keep the invocation rejection as the terminal channel reason so listener and start-send setup preserve typed pairing failures. Existing bounded workspace read recovery can then classify the original rejection; channels remain terminal and authority fences remain intact. Add deterministic service-owned dispatch regressions for both setup operations. The original rejection already survived on closed, but setup previously received generic closure errors.
…aw#173393) A settled node invoke can disappear before its pairing-change response reaches the duplex caller. A concurrent start-frame send then replaces that response with a generic missing-invocation error, preventing existing read recovery from classifying the failure. Mark definitely retired input and join the original invocation result before framing handles the send failure. Join the raw promise, avoiding a dependency on output-listener draining. Live transport failures retain their immediate path; no retry, timeout or authority policy changes. Follow up openclaw#173209. The new ordering case fails on original production under Node and Bun and passes after the fix. All 228 focused owner, retention, registry, policy, framing and workspace tests pass on Node. The fifth hourly still lacks its nested cause, so exact CI attribution remains unproven; the unchanged native E2E passes locally.
) Keep the invocation rejection as the terminal channel reason so listener and start-send setup preserve typed pairing failures. Existing bounded workspace read recovery can then classify the original rejection; channels remain terminal and authority fences remain intact. Add deterministic service-owned dispatch regressions for both setup operations. The original rejection already survived on closed, but setup previously received generic closure errors. (cherry picked from commit ebccf57) Co-authored-by: RomneyDa <[email protected]>
Backport upstream openclaw#173209 (ebccf57) and openclaw#173393 (281a6bb). Retain typed invocation failures through listener and start-send setup, including a send concurrent with retired input. The existing bounded workspace read recovery can then classify pairing changes. Preserve live authority checks, retry limits, timeouts and framing bounds. Three final file blobs match the upstream follow-up. Formatting and scoped P2 independent review pass. The local baseline never reached assertions before the unchanged no-output import guard stopped it; targeted lint lacks an installed eslint-plugin-solid prerequisite. Repair-head CI remains required. The original native CI log omitted its nested cause, so this is not claimed as exact sighting attribution. Co-authored-by: ben-milanko <[email protected]>
Adapt 21 audited fixes to release-native ownership and recovery. Retain strict temporary environment isolation and provider-only cooldowns. Original-source provenance and contributor credit: #179144 5a97c90 — Peter Steinberger <[email protected]> #180280 442c2f7 — Jason (Json) <[email protected]> #178596 63f386b — Braden Guliano <[email protected]> #181804 d75915e — Peter Steinberger <[email protected]> #181140 b4031b2 — Peter Steinberger <[email protected]> #182207 b8fae65 — Peter Steinberger <[email protected]> #180792 d2c70dd — Peter Steinberger <[email protected]> #179205 c08aa6d — Peter Steinberger <[email protected]> #179997 f178dd9 — mali <[email protected]> #181270 e204484 — Peter Steinberger <[email protected]> #179031 855b0aa — Peter Steinberger <[email protected]> #179726 3d51d00 — Peter Steinberger <[email protected]> #179249 b617d97 — Josh Avant <[email protected]> #182385 bb13bcd — Peter Steinberger <[email protected]> #182615 411bac2 — Peter Steinberger <[email protected]> #181300 765c2f1 — Peter Steinberger <[email protected]> #179549 09ba994 — Peter Steinberger <[email protected]> #179445 ac5587b — Peter Steinberger <[email protected]> #181127 25dde25 — Josh Lehman <[email protected]> #173209 ebccf57 — Peter Steinberger <[email protected]> #175289 e579f09 — Peter Steinberger <[email protected]> Proof: targeted owner/regression tests; Qwen15 and catalog pool13 pass. Final integrated lint/type/format pass remains pending under user direction. Co-authored-by: RomneyDa <[email protected]>
Related: #171208, #126961.
What Problem This Solves
When a paired node rejects an invocation just after duplex readiness, remote workspace setup can receive a generic closed-channel error instead of the retryable pairing-change error. The existing read recovery then cannot classify the failure, so a first agent turn can fail before inference.
User Impact
Workspace reads retain the invocation's original failure metadata during listener and start-message setup. Existing bounded recovery can recognize a pairing change. Closed channels stay closed; revoked authority, non-retryable failures and writes retain their existing behavior. No configuration or migration is needed.
Why This Change Was Made
The shared duplex owner already exposes the original rejection on
closed, but final cleanup replaced its lifetime reason with a generic closure. Preserve that rejection before cleanup, and surface the current lifetime reason when a send fails. All live authority checks remain, including the per-frame effect fence. No retry limit, timeout, framing limit, SDK surface or invocation owner changes.The generic finalizer dates to d17bbfc (#126961). This preserves its terminal/no-resume contract while allowing #171208's existing read-only recovery to see the error it already handles.
Evidence
UNAVAILABLE/ retryablePAIRING_CHANGEDarrives after framed readiness and before caller setup. Both cases fail on unchanged production: listener setup seesNode duplex command has closed., and send seesnode duplex channel is closed. The same two cases pass after the repair, retaining the error fields and proving no input was sent after rejection.--maxWorkers=1(34.74s wrapper). The service-node file has 21 tests, 5.20s Vitest / about 1.2s test execution.The four hourly sightings share first-turn
Remote workspace skill discovery failed, preceded by pairing churn and capability approval. Their wrapped errors omit the nested discovery cause. This regression proves the production metadata-loss defect, but does not establish that every hourly failure took this exact branch. Passing replays alone are not claimed as flake attribution. No leases were acquired.