Repository navigation
fix: keep explicit runtime resumes strict across reconnects - #925
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: needs maintainer review before merge. What this changesThe runtime retains explicit session-resume constraints across record reuse and later prompt or control reconnects. Example: Attach with resumeSessionId="authority-session", then encounter a cold-load error -32603.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Regression provenanceRegression provenance — verified: source commit Merge readiness✅ Ready for maintainer review This PR fixes a current-main session-continuity bug with no actionable findings; the previous draft-state concern is resolved and the reviewed head has maintainer approval. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe embedded runtime manager receives session attachments, prompts, and controls, coordinates stored records and live owners, and sends ACP requests through the shared reconnect path. flowchart TD
A[Embedding caller] --> B[Runtime manager]
B --> C[Session record store]
B --> D[Record resume constraint]
D --> E[Shared reconnect path]
E --> F[ACP adapter]
E --> G[Resume failure]
Technical reviewBest possible solution: Land the focused manager-owned constraint through the shared reconnect path while preserving ordinary recovery and explicit lifecycle reset. Do we have a high-confidence way to reproduce the issue? The supplied baseline traces reproduce replacement after an explicit compatible attachment, and current-main source retains the same causal path. Is this the best way to solve the issue? The fix preserves the existing recovery contract using the current manager and reconnect owners, without adding public parameters or persisted fields. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 23b0906f7174. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
LabelsLabel changes:
Label justifications:
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 HistoryReviewed October 31, 2026, 3:57 AM ET / 07:57 UTC (Revision 3). |
vincentkoc
left a comment
There was a problem hiding this comment.
Reviewed head 12fcca9 with no actionable P0–P2 findings. The runtime keeps the explicit native-session constraint across compatible record aliases and both prompt/control reconnects, rejects adding it during unfinished untargeted work, and preserves saved model/effort on reuse. The focused regressions and public-runtime witnesses cover the original replacement-session failure. All repository CI checks now pass on this head: https://github.com/openclaw/acpx/actions/runs/41171242678.
Leaving the PR in draft as submitted. Please mark it ready when it is intended for landing.
|
Published the requested reproducible behavior evidence in the PR body: #925 (comment) It includes the exact baseline and patched revisions, complete model-free built-public-runtime witness, commands, actual per-process stdout, saved settings and request counts. Baseline cold control/prompt loads create a replacement; patched refusal sends zero replacements and zero downstream work; successful continuation keeps the saved identity and omitted model/effort. Production code and draft state remain unchanged, and the later human approval is preserved. @clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
vincentkoc
left a comment
There was a problem hiding this comment.
Approved integrated head e3d35cc. All seven introduced file patches are identical to the previously reviewed and approved 12fcca9. The reconnect conflict preserves the strict-resume decision and main's intentional removal of the subsumed helper from #950. No retired path was restored.
The explicit target remains strict across compatible record aliases and prompt/control reconnects; saved model/effort and existing history are preserved. Existing independent review and public-runtime red/green witnesses remain applicable. The author has marked the PR ready, no substantive findings remain, and all 12 exact-head integration CI jobs passed: https://github.com/openclaw/acpx/actions/runs/41211913884. No contributor code was executed locally for this integration.
|
Landed as 37e343e. Explicit runtime resume targets now remain strict across matching record aliases and later prompt/control reconnects, preserving saved configuration and history. Integrated main while keeping all seven reviewed feature patches identical and preserving the removed-helper cleanup from PR 950. Reviewed head e3d35cc; all 12 integration CI jobs passed: https://github.com/openclaw/acpx/actions/runs/41211913884. Thanks @taras! |
An explicit
resumeSessionIdcan reuse an unprompted local record that originated withsession/new. If a later cold load fails with-32603, the runtime currently creates a replacement and sends the requested prompt or control. This change retains the explicit constraint in the existing runtime manager and enforces it through both reconnect paths before replacement creation. Reusing the existing projection preserves saved model and effort when later callers omit them.Same-record aliases and normal close preserve strictness. First adding the constraint during active untargeted work returns the existing unfinished-work error; explicit lifecycle preparation remains separate. Another runtime instance must receive the target again. No public parameter or persisted field is added.
Validation on Node 26.5.1 with pinned pnpm 11.27.1:
pnpm run checkpasses: formatting, typecheck, lint, builds, full tests and coverage gates. The full corpus reports 3,083 passed, 19 skipped and zero failures; the separate coverage selection reports 220 passed.pnpm run check:docsandpnpm exec markdownlint-cli2 CHANGELOG.mdpass.Prepared with AI assistance.
Executed reconnect evidence
Baseline production:
6ce38c34f4e5aef16bf28ca8b1fb1e6650695c60. Patched production:12fcca9ffc1417838b20b26e35518f38c8292a0c. Nodev26.5.1, pnpm11.27.1, ACP SDK1.9.0, macOS. The same checked-in SDK subprocess mock from the patched commit supplies the controlled-32603failure in both builds. Baselinesrc/is byte-checked against its Git commit; no production fix is present there.These are actual separate-process executions of
dist/runtime.jswithcreateFileSessionStore, a saved origin-new record and omitted settings on reattachment. They reuse the original witness, with paths parameterized and request telemetry added. Each world owns its state/home. No model service is contacted. The mock deliberately returns the fixed synthetic locatorauthority-session:session/newtranscripts, rather than locator equality, expose replacement. This demonstrates the runtime bug/fix; it is not a live model-history claim.The seed issues two configuration requests (
gpt-5.6-luna,xhigh) and no prompt. Counts below exclude those seed requests. The two control requests during successful continuation are the runtime replaying those saved selections. The refusal phases issue neither a replacement nor downstream prompt/control work. Baseline exit1 is the expected failure of the strict-refusal assertion, with the forbidden requests still printed infinally.Actual stdout and process exit codes
Baseline assertion diagnostics are
Missing expected rejectionfor control andactual completed / expected failedfor prompt. Original complete stderr/receipts remain retained privately; private stack paths are omitted here. The JSON above is unedited stdout and includes the saved projection plus request transcript.createdAtUnchangedandeventLogAssociationUnchangedcompare against the saved seed, including after successful continuation.Reproduce against both exact revisions
Use the pinned pnpm version. The fixture is identical in both trees; copying it adds the controlled load-failure/effort support, while baseline production stays unchanged. Place the witness below at the indicated path before its invocations. The original execution used isolated prepared dependencies; the normal fresh-checkout preparation is shown here.
Complete model-free built-public-runtime witness
Repository CI also passed on the reviewed pre-integration head
12fcca9ffc1417838b20b26e35518f38c8292a0c: https://github.com/openclaw/acpx/actions/runs/41171242678 (attempt2). The later human approval is retained: #925 (review). That evidence update left implementation and the then-draft state unchanged; the author has since marked the PR ready for review.Maintainer integration validation
Integrated main
ba09c499a4c5547981e65c087d8a0902af217fddat heade3d35cc7a26e3582b1c45c0b46d97ab43d19312e. The only manual conflict was in reconnect.ts: retain the strict-resume decision while preserving the intentional removal of subsumed error classification from #950. The complete introduced patch across all seven files is identical to reviewed head12fcca9ffc1417838b20b26e35518f38c8292a0c; no retired helper was restored.git diff --checkand the outgoing personal-data scan pass.Fresh exact-head integration CI passed all 12 jobs, including Node 22/24/26, coverage, mutation, docs, formatting, types, lint, builds, conformance, and Slophammer: https://github.com/openclaw/acpx/actions/runs/41211913884. This checkout is code-only; no contributor code or dependency-backed tests were executed locally for this integration. The existing independent review and public-runtime red/green evidence remain applicable.