Repository navigation
fix(session): let replay admission cross mirrored command exchanges - #194336
xiaopan-xydt wants to merge 1785 commits into
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 real behavior proof before merge. What this changesThe PR lets persisted-turn replay cross transcript messages whose keys identify command inputs or replies. Example: A delivered
Review scores
ProductKind: Bug fix · Worth it: Needs a maintainer decision · Fix scope: Complete Merge readiness⛔ Blocked before merge - 4 items remain Keep open: this PR addresses a concrete unanswered-message bug, but introduces a type error and broadens replay eligibility beyond the reported Stop race. Priority: P1 Decision needed
Before merge
Findings
Provenance
Tests
Agent review detailsHow this fits togetherThe embedded runner reads persisted session history, selects the current user anchor, and validates it before allowing model execution. flowchart LR
A[Queued user input] --> B[Persisted session transcript]
C[Delivered command exchange] --> B
B --> D[Current turn traversal]
D --> E[Anchor and ownership validation]
E --> F[Model execution]
Technical reviewBest possible solution: Repair the delayed Stop exchange through the existing dispatch and session owners while preserving ordinary command and newer-user replay barriers. Do we have a high-confidence way to reproduce the issue? The reporter supplies failures on an official release and a focused reproduction; current source confirms delivery can append Stop history after persistence and that replay then encounters a barrier, but this read-only review executed no target code. Is this the best way to solve the issue? Extending the existing predicate is small, but exempting every command prefix exceeds the demonstrated Stop case and bypasses an intentional command classification. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against e29577b7d7df. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +10, Tests +161. Total +171 across 3 files. Added test files: 1. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. Review metrics
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 Reviewed November 6, 2026, 4:59 PM ET / 21:59 UTC. |
) Signed-off-by: Vincent Koc <[email protected]>
…recation warnings (openclaw#195489) * fix(cli): agents list no longer blames the Matrix plugin for core deprecation warnings * test(cli): cover agents list deprecation warnings at the command boundary * fix(cli): await saved-auth discovery across channel inventories * test(health): support async inventory in deletion coverage * test(cli): preserve real inventory module exports --------- Co-authored-by: Vincent Koc <[email protected]>
Signed-off-by: Vincent Koc <[email protected]>
…talls (openclaw#197431) * test(cli): report state-worker timing in SIGUSR2 proof Co-authored-by: obviyus <[email protected]> Co-authored-by: steipete <[email protected]> * fix(ci): report state-worker timing when the SIGUSR2 shutdown proof stalls Worked on by: - @obviyus - @steipete Co-authored-by: obviyus <[email protected]> Co-authored-by: steipete <[email protected]> OpenClaw-Publication: f8a38544-9f90-8363-84dc-0dcc1729c300 --------- Co-authored-by: obviyus <[email protected]> Co-authored-by: steipete <[email protected]>
* fix: make incoming audio recordings playable inline * fix: fit inline audio controls within UI budgets * Merge commit '24819901d92ee379b5b36a957276d3b3657d7b79' into fix/incoming-audio-preview-20261110 Co-authored-by: Vincent Koc <[email protected]>
## What Problem This Solves An agent cannot collect an already-finished background process when unrelated Code Mode continuations fill all 64 suspended-run slots. The fresh observer fails before reaching `process`, even with outer `awaitResults: true`. ## User Impact and Solution Required-completion cells keep their owner until settlement and cannot publish suspended continuations, so they no longer reserve a suspension slot at inline dispatch or checkpoint settlement. Agents can collect the original process result without relaunching work. Capacity errors and troubleshooting guidance explain this recovery path. Default suspension admission, existing-run reservation transfer, process retention, authority checks, and cancellation are unchanged. This complements openclaw#196435's rejected-cell settlement fix; it addresses fresh-observer admission rather than process-output loss. It intentionally permits actively owned required-completion cells at the suspension cap, not a new total-live-cell resource limit. ## Evidence - One real native background process and 64 genuine parked VM continuations: default observation fails without dispatch; required observation retrieves the original terminal output. Assertions retain one launch, one poll, the 64-slot cap, active-resume reservation, cancellation, and capacity recovery. - Regression fails on base `5e8ed5f5b437e3a8438a036eb42c4d98009d0d86`, passes with the fix. - Seven focused suites: **169 tests passed**, including agent-loop recovery, Node/QuickJS failure origins, required wait/cancellation, shell terminal draining, bridge behavior, and prompt-prefix stability. - Core and changed-test TypeScript, targeted type-aware lint, formatting, MDX, and diff checks passed. - Exact **59-line** allocation records the native-process setup and assertions added to the existing capacity test; shared scalar unchanged. Local test-line ratchet passes with 17 lines slack, and the previous head's complete baseline-ratchet CI passed. Saturation test takes about 2 seconds locally. - No new queue, quota, recovery manager, or persistent state. Production delta: 9 added / 3 removed lines. ## CI repairs Earlier heads exposed two inherited worker containment expectation failures in `checks-node-changed-11`. Source inspection and base reproduction established stale expectations after openclaw#194473's root-aware recovery and openclaw#196756's compact JSON serialization. Current main `18adeb3f1768b3c1371b3c294f06397d5cb352ea` still had those expectations; no competing fix was found. The follow-up updates only `src/worker/worker-runtime-permissions.suite.ts`: independent per-policy literal expectations and exact compact JSON output. Rejection status, tool name, escaped path, operator-only hint separation/logging, unchanged outside-file contents, and file-mode assertions remain intact. No permission behavior, ignores, retries, or gates were weakened. - `node scripts/run-vitest.mjs src/worker/worker.runtime.test.ts --maxWorkers=1`: **69 passed**, 40.79 seconds suite / 47.24 seconds wrapper. The existing suite's real background-process cleanup tests dominate duration; the two repaired cases take 29/24 ms. - Changed-test TypeScript graph (`gateway-other`), type-aware lint, formatting, diff check, and test-line ratchet passed. - New-head CI is being evaluated separately; previous-head results are not claimed as current-head CI proof. ## Review and limitations Independent native-subagent reviews of the implementation, exact allocation, and worker repair found no actionable defects. Local reviewer CLIs and bound autoreview tool were unavailable; no review tools were installed. These were narrative independent reviews, not helper-enforced isolation or structured helper validation. Hosted review of `1269cc403ec7243b847eb4cbec0ff0b5a8d08f6e` also reported no findings. The new saturation case executes Node. QuickJS support is backed by shared owner-path inspection and existing parity/failure tests, not a separate saturation run. No shipped Gateway/live-model saturation capture or guarantee of model recovery choices is claimed; proof exercises the actual Code Mode/native-process integration boundary. ## Main integration (November 11, 2026) Merged main into the published PR branch without rewriting history (head `33a9fa55f09e6cbb41300cc0aa67ee9ef2edf94b`). Verified tree equivalence with the reviewed rebase plus the disjoint main update. The equivalent rebased code passed the native-process capacity regression and 69 worker tests, targeted type-aware lint, and formatting. The final merge passed diff checks and the test-line ratchet with 10 lines slack; no shared budget increase. Updated-head CI verified on November 11, 2026: 71 checks passed, 59 skipped, no failures or pending checks on `33a9fa55f09e6cbb41300cc0aa67ee9ef2edf94b`. The PR remains open; no merge was performed. ## Main conflict resolution (November 12, 2026) Merged main `4947e40db109` normally into the PR without force-pushing. New head: `225c5b5bcf06f45ef6018580425bc94349c1b9c2`. The only conflict was in the worker containment test: main now has the same corrected messages and compact JSON expectation. Kept the already-reviewed independent per-policy literal expectations; no new production behavior. The database-worker test inventory auto-merged both additions. Scoped proof on the integrated tree: native-process saturation regression passed; all 69 worker runtime tests passed; worker test typecheck, type-aware lint, formatting, and diff check passed. Existing implementation review remains applicable to this mechanical integration. The initial worker invocation hit unresolved conflict markers after a failed editing command; the corrected complete worker suite passed. Current-head CI is pending and is required before merge; previous-head green checks are not claimed as current proof. <!-- openclaw-publication:496957c8-5491-47fa-9565-7ecf6d229daa -->
Restrict service-worker cache policy reads to unauthenticated immutable or versioned public assets. Keep private requests in the existing foreground delivery and owning-client recovery flow. Exercise the actual request getter and no-store behavior across complete cache generations. Grant exactly 47 net regression-test lines without changing the shared ceiling.
Signed-off-by: Vincent Koc <[email protected]>
…ation (openclaw#195782) Fixes openclaw#195759 ## What Problem This Solves Fixes: Android session catalog rows remain disabled after the Activity is finished while opening a catalog session. ## User Impact User impact: Reopening the app after a cancelled catalog continuation allows session selection and retry instead of leaving the catalog stuck busy. No migration or configuration change is required. ## Why This Change Was Made Move busy-state cleanup into the continuation's existing guarded `finally` path so success, failure, and caller cancellation all release it. Cancellation still propagates, and gateway-generation and request-sequence checks preserve newer selections. Add regressions for cancellation followed by retry and ordinary failure without changing the selected session. This is mechanical publication of the contributor's frozen code from [saariuslystoned/openclaw](https://github.com/saariuslystoned/openclaw), branch `fix/android-catalog-continue-cancel-busy-state-20261108`, commit [7f2cefe](saariuslystoned@7f2cefe). The code was implemented by the contributor; the publishing session performed the cherry-pick and bounded static verification without rewriting or expanding the diff. ## Evidence - **Contributor-supplied original validation:** focused Play tests, ktlint, Play debug assembly and physical Pixel 10 Pro XL verification were reported passing for frozen source `7f2cefe931408376d0d79b3ed1733f2df1bc9a2b`. These executions were not independently rerun. - **Publishing-session checks:** conflict-free cherry-pick onto `37365600bf67cab28ef5e180c5dfbfb400d88f83`, identical stable patch-id `acc40e7eb19e076155491dc82871a0b16793dfc4`, two-file scope and byte-identical changed files were recorded at publication. `git diff --check` passes. - **Independent review, November 12:** fresh Codex P0–P3 review of the complete range `37365600bf67cab28ef5e180c5dfbfb400d88f83` → `1be4e94d2437c41db67c14ec4afd68fae4c0aa2c`, with full runtime, regression, caller/lifetime, sidebar, catalog, transport and teardown context. No actionable findings; verdict “patch is correct.” Source-only assessment. The tests cover cancellation with explicit retry, duplicate rejection and malformed-response failure; existing tests retain newer-selection protection. - **Reused exact-head hosted CI:** Android Play/third-party tests, ktlint, native accessibility and the current CI/dependency/security status contexts pass. At landing preparation the check inventory was 19 successful and 92 skipped, with no failed/cancelled check. No CI rerun was requested. - **Inspected supplied device evidence:** [the exact-head report](openclaw#195782 (comment)) describes Pixel 10 Pro XL / Android 17 debug builds against an isolated test Gateway without a model provider, comparing base `37365600bf67` and this head. Both screenshots and accessibility excerpts matched the published SHA-256 manifest and were inspected. Base retains the continuation spinner and its selected node is reported disabled; head has no continuation spinner and its selected node is reported enabled. The contributor also reports successful reselection. Numbered overlays are the supplied phone-driving tap targets. A separate load-more error is visible in the after image; this comparison demonstrates cancellation recovery, not general catalog health. - **Limits:** device execution, installed APK/source binding, actual node enablement and successful reselection remain contributor-reported. The accessibility files are short excerpts, not complete native hierarchy captures. No new Android tests, build, Activity/device, Gateway/model or Crabbox run was performed for this landing, and no independent automated baseline-red execution is claimed. | Before — after cancellation and reopening | After — reviewed head | | --- | --- | |  |  | Contributor credit: Bobby Bones (@saariuslystoned) implemented and locally verified this fix. Published on their behalf. ☁️ Co-Authored-By: Bobby Bones [email protected] ## Work sessions Linked for team reference; these sessions aren’t public. - [Original discussion](https://team.openclaw.ai/chat/roboclaw/~key/dashboard/bc1a39a0-b786-49d0-b93c-262a0c05104d) - [Implementation and verification](https://team.openclaw.ai/chat/roboclaw/~key/subagent/6af2a4a8-9a03-4420-9908-e12d26c86dbe) — contributor code cherry-pick and static verification; original implementation by @saariuslystoned. ## Worked on by - @saariuslystoned <!-- openclaw-publication:489d90f3-a198-4654-8168-a3dbf546c222 --> Co-authored-by: saariuslystoned <[email protected]> Co-authored-by: Solvely-Colin <[email protected]>
…openclaw#197458) Use automatic macOS font smoothing for chat prose in every typeface. Keep app chrome rendering unchanged and remove the serif-only runtime helper. Co-authored-by: vyctorbrzezowski <[email protected]>
…197457) Forward typed restart interruption through active request custody so yielded exec commands begin their existing graceful cancellation while other accepted work drains. Keep physical process settlement, finalizer writes, database sealing, and restart recovery ordered.
|
Follow-up: the replay admission check now reads |
|
Thanks for the work here. We're closing this: it doesn't show a real user-facing problem (no report from an affected user and no natural reproduction), and it follows a pattern of small, speculative or duplicate changes split across many PRs. Please open an issue with a reproduction of real harm first; a fix can follow once the problem is confirmed. |
Fixes #194303
What Problem This Solves
A
/stopsent while a queued follow-up turn was replaying could invalidate that turn: the stop's mirrored command exchange landed in the transcript between the follow-up's persisted user row and its replay admission, and admission refused the turn with "Persisted user turn changed before replay admission" — the queued message was persisted but never answered and nothing retried it. In plain terms: a stop command that arrived while a waiting message was starting should not make that waiting message fail; the stop is bookkeeping, not a new conversation turn.Why This Change Was Made
Replay admission walks the transcript back from the turn tail and only crosses entries that cannot start foreground work (context metadata, compaction, operational notices per #181473). Mirrored command exchanges (
command-input:/command-reply:rows written byrecordDeliveredCommandExchange) are operational history in the same sense — they never carry agent turn input — but the walk treated them as turn changes. This change lets the interrupted-turn walk cross them; the turn's identity is still pinned by the exact idempotency-key/user-row match, so a genuinely newer conversation user row still invalidates admission as before.User Impact
A queued follow-up survives a
/stopthat raced its admission and gets answered instead of failing with a generic error. The transcript still records the stop exchange; no cleanup or retry machinery changes.Evidence
attempt-session-replay.stop-exchange.test.ts(registered invitest.database-worker-core-paths.mjsnext toattempt-session-replay.test.ts). With the stop exchange appended after replay selection and before admission, the follow-up now makes 1 model call and answers ("FOLLOWUP_ANSWERED"); the persisted user turn is written once and the stop exchange once. Red check: reverting the walk change makes the same scenario fail withPersisted user turn changed before replay admissionand 0 model calls (6/6 pre-fix assertions green, post-fix 6/6 green).node scripts/run-tsgo.mjs -p tsconfig.core.jsonclean; oxfmt/oxlint clean on changed files.AI Assistance
This PR is AI-assisted. Used source inspection and the repository test harness to analyze issue #194303, adapt the issue's repro into a regression test, and extend the existing interrupted-turn walk predicate in pre-persisted-user-turn.ts. The implementer understands the code: command exchange rows are operational mirrors whose identity checks stay keyed to the exact idempotency match. All evidence above is from real local runtime execution.