Skip to content

fix(nodes): workspace setup fails during a pairing change - #173393

Merged
steipete merged 1 commit into
mainfrom
ci/fix7-native-pairing-followup
Oct 15, 2026
Merged

steipete merged 1 commit into
mainfrom
ci/fix7-native-pairing-followup

Conversation

@steipete

@steipete steipete commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Related: #173209.

What Problem This Solves

Remote workspace setup loses the pairing-change error when a start-frame send races invocation settlement, preventing the existing read recovery from recognizing it.

User Impact

Workspace discovery retains the original invocation failure during this remaining setup window. Existing read-recovery limits and live-authority rules remain unchanged. No configuration or migration is needed.

Why This Change Was Made

The registry removes settled invocations before their response reaches the duplex caller. A concurrent send then raises a generic missing-invocation error, which closes framing before the structured rejection arrives. Distinguish definitely retired input and join its original invocation result before framing handles the error. Join the raw result rather than the public closure that also drains output listeners, avoiding a send/drain dependency cycle. Other input and transport failures keep their immediate failure path.

Evidence

  • The new concurrent-send case fails on unchanged production under both Node and Bun: it receives node invoke is not pending instead of the original retryable PAIRING_CHANGED. It passes with the repair; all existing cases remain.
  • 228 focused tests pass under Node across service node invocation, service retention, node registry and policy, duplex framing, and remote workspace discovery. The service-node file has 22 passing cases (36.08 seconds Vitest, including cold transform).
  • The genuine runtime build passes (3m15s), the full architecture command passes, and independent P2 autoreview is clean. Core and plugin-test types, targeted type-aware lint, boundary lint, format, and line-cap checks pass.
  • The committed fix passes the unchanged native same-session E2E under Node: all four pairs/eight turns,170.34 seconds Vitest /607.49 seconds including build/setup. The unchanged-main Bun replay also passes. These local runs do not reproduce the intermittent hourly failure. The fifth sighting still reports Remote workspace skill discovery failed, but its captured Gateway tail omits the nested cause. This proves a second metadata-loss defect, not that the hourly took this exact branch.

The additional full-tree unused-export scan is red on four unchanged, unrelated exports: classifyAttachedCiRun, scrollState, expectInvalidSlug, and mountLoginGate. None is in this patch or has a consumer removed here. The new error export has a production consumer. These findings are recorded, not counted as passing proof.

Simplification pass: registry and invocation remain the existing decision/result owners; no new state, cache, timer or retry loop. Production grows by19 lines and the existing test table by15 lines to distinguish retired input and prove the previously untested ordering.

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.
@clawsweeper

clawsweeper Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review in progress

ClawSweeper is reviewing this revision. This supersedes any previous blocked status.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime size: S labels Oct 15, 2026
@steipete
steipete marked this pull request as ready for review October 15, 2026 18:44
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-15T18:47:37.581569Z ab108ef Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@steipete
steipete enabled auto-merge (squash) October 15, 2026 19:00
@steipete
steipete merged commit 281a6bb into main Oct 15, 2026
212 of 213 checks passed
@steipete
steipete deleted the ci/fix7-native-pairing-followup branch October 15, 2026 19:09
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash auto-merge.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 16, 2026
…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.
ben-milanko added a commit to ben-milanko/openclaw that referenced this pull request Oct 23, 2026
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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gateway Gateway runtime size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant