Skip to content

fix(chat): keep cancelled responses from ending newer turns - #1440

Merged
karkarl merged 6 commits into
mainfrom
bkudiess-chat-run-correlation
Oct 20, 2026
Merged

karkarl merged 6 commits into
mainfrom
bkudiess-chat-run-correlation

Conversation

@bkudiess

@bkudiess bkudiess commented Sep 17, 2026 •

Copy link
Copy Markdown
Collaborator

What Problem This Solves

Fixes: after you stop a response and send a new message, late text from the stopped response can show up in the new turn, end it early, and fire a "response complete" toast or TTS.

User Impact

User impact: stopping a response (or resetting the session) now reliably silences it. Its late text, completion, and notification can no longer interfere with the next response. Responses that finish normally, other sessions, and older gateways that omit runId behave as before.

Why This Change Was Made

Agent events were already suppressed by aborted run ID, but chat frames carried no run identity, and the aborted-run state was cleared as soon as the cancelled run's terminal arrived. So once Stop finished, nothing stopped that run's late chat/session.message final.

This change:

  • Keeps the payload runId on ChatMessageInfo.
  • Rejects assistant/tool chat frames whose run was cancelled by Stop or by a session reset. Cancelled runs stay fenced after their terminal through a small bounded set (64 run IDs) owned by ChatLifecycleState. Agent events of those retired runs and a replayed start of an aborted run are dropped. A rolled-back abort is not retired.
  • Adds a per-frame SuppressNotification() veto so rejected frames never reach notification history, toasts, or TTS. Duplicate-frame dedupe and a throwing chat consumer keep the existing notification behavior.

Ownership is unchanged: ChatConversationState coordinates under its lock, ChatLifecycleState owns abort and retirement state, ChatResetState owns reset admission, and the provider stays the IO/event facade. Notification ownership does not move into App.

Scope was deliberately reduced in this revision. The earlier version also fenced completed and mismatched runs, which required same-run retry exceptions and late tool-repair exceptions. Review found that it also dropped legitimate finals that upstream sends after lifecycle end (reply-dispatch and ACP runs) once the tray's queued-send drain started the next turn. Fencing only cancelled runs fixes the reported bug without those special cases. Runs that complete normally are not fenced.

Evidence

  • Upstream contract (checked against openclaw/openclaw@eb82ef8b src/gateway/server-chat.ts):
    • Agent events sent to clients are rewritten to runId = chatLink.clientRunId, the same ID used by chat events, so run correlation is consistent.
    • The lifecycle end agent event is broadcast before finalizeLifecycleEvent emits the chat final.
  • Regression proof: with ChatConversationState reverted to main, 13 of the new cancellation tests fail; with the change they pass. These are the provider-level stop → resend → late stale final/delta/terminal sequences, the parser-to-provider notification veto, reset fencing, and the aborted-start replay guard.
  • Code review: an independent code review of the final diff reported no issues.

Change Type

  • Bug fix
  • Feature
  • Refactor
  • Docs or instructions
  • Tests or validation
  • Security hardening
  • Chore or infrastructure

Scope

  • Tray or WinUI UX
  • Windows node capability
  • Local MCP or winnode
  • Gateway, connection, or pairing
  • Setup or onboarding
  • Permissions, privacy, or security
  • Tests, CI, or docs

Required proof pools

  • windows-winui-interactive: stop response A, send B, let A's late events arrive, and visibly confirm B stays active, ends only on its own final, and only B produces a toast/TTS.
  • windows-wsl-gateway-e2e: the same sequence through a paired product Gateway, to confirm real wire runId delivery and ordering.

Validation

Head 69cee2b4 (base main at 9e4999c6), native Windows. Every process had OPENCLAW_REPO_ROOT plus isolated OPENCLAW_TRAY_DATA_DIR, OPENCLAW_TRAY_APPDATA_DIR, and OPENCLAW_TRAY_LOCALAPPDATA_DIR set before start. Metadata manifests of the real %APPDATA%\OpenClawTray and %LOCALAPPDATA%\OpenClawTray were identical before and after.

Command Result
.\build.ps1 Passed (all builds succeeded)
dotnet test .\tests\OpenClaw.Shared.Tests\OpenClaw.Shared.Tests.csproj --no-restore 4,325 passed, 35 skipped, 0 failed
dotnet test .\tests\OpenClaw.Tray.Tests\OpenClaw.Tray.Tests.csproj --no-restore 4,097 passed, 0 failed
Focused: --filter ChatRunCorrelation, OpenClawChatDataProvider, ChatConversationState, ChatEventMapper, ChatTimelineReducer, ChatRuntimeOwnershipContract 575 passed

main has since moved 6 commits (setup and wizard-log changes). None touch files in this PR.

Real Behavior Proof

  • Environment tested: native Windows, headless, compiled production parser, provider and state owners with a fake gateway bridge.
  • PR head or commit tested: 69cee2b4.
  • Exact steps or command run: ChatMessageReceived_CancelledRunLateFinal_CannotEndANewerActiveRun and ChatMessageReceived_RejectedWireFinalCannotEmitNotification. These send A, stop A, send and start B, inject A's late delta, final and terminal (before and after A's cleanup), then finish B. The second test drives raw chat and session.message JSON through OpenClawGatewayClient into the provider.
  • Evidence after fix: B stays active through A's late events, A's text never reaches the timeline, B completes exactly once, and only B's final emits a notification. These tests fail against main's gate.
  • Observed result: as above, synthetic transport only.
  • Screenshot or artifact links verified? N/A
  • Not verified or blocked: interactive WinUI stop and resend, real toast/TTS playback, and real paired Gateway delivery.

Security Impact

  • New permissions or capabilities? (Yes/No) No
  • Secrets or tokens handling changed? (Yes/No) No
  • New or changed network calls? (Yes/No) No
  • Command or tool execution surface changed? (Yes/No) No
  • Data access scope changed? (Yes/No) No
  • If any answer is Yes, explain the risk and mitigation: N/A

Compatibility and Migration

  • Backward compatible? (Yes/No) Yes. Frames without runId keep the existing thread-level handling.
  • Config or environment changes? (Yes/No) No
  • Migration needed? (Yes/No) No
  • If yes, list the exact upgrade steps: N/A

Review Conversations

  • I replied to or resolved every bot review conversation addressed by this PR.
  • I left unresolved only conversations that still need maintainer judgment.

There are no inline review threads.

@clawsweeper

clawsweeper Bot commented Sep 17, 2026 •

Copy link
Copy Markdown

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@clawsweeper clawsweeper Bot added P2 Normal priority bug or improvement with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 17, 2026
@clawsweeper

clawsweeper Bot commented Sep 17, 2026 •

Copy link
Copy Markdown

Codex review: blocked before merge. Reviewed September 30, 2026, 3:36 PM ET / 19:36 UTC (Revision 6).

ClawSweeper review

What this changes

The branch carries Gateway response run IDs into native chat, fences late output and completion notifications from older turns, and adds regression tests and routing documentation.

Merge readiness

⛔ Blocked before merge - 2 items remain

Keep open. Current main does not solve the cancelled-response problem, and the prior exact-head human-test requirement remains unmet despite extensive compiled coverage.

Priority: P2
Reviewed head: 896d323601866c74014d83ec8c70d9fa1fd1e4f7

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The focused patch and compiled coverage are substantial, but the required native Gateway and UI behavior remains unproven.
Proof confidence 🦐 gold shrimp (3/6) Not applicable: Real behavior proof is not required for maintainer- or bot-authored pull requests.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: Real behavior proof is not required for maintainer- or bot-authored pull requests.
Evidence reviewed 10 items Current main lacks the proposed gate: At the fetched main revision, chat message data has no live run ID and incoming chat reaches reset admission without the branch's run-aware lifecycle check.
Introduced run admission: The PR checks assistant and tool chat frames against active, aborted, and completed run state before reset and timeline handling.
Parser-to-notification path: The parser retains the payload run ID and consults the synchronous chat consumer's per-frame veto before emitting a final-response notification.
Findings None None.
Security None None.

How this fits together

Windows Companion receives chat and agent events from a paired Gateway. Its chat state decides which response owns each event before updating the conversation and allowing completion notifications that can reach toast and speech.

flowchart LR
 A[Gateway chat events] --> B[Event parser]
 B --> C[Session and run identity]
 C --> D[Chat admission decision]
 D --> E[Conversation timeline]
 D --> F[Completion notifications]
Loading

Before merge

  • Resolve merge risk (P1) - The declared paired-Gateway and interactive WinUI proof pools remain unverified, so real event ordering could still suppress a valid newer response or allow stale text, toast, or speech after cancellation.
  • Complete next step (P2) - Complete the declared paired-Gateway and interactive WinUI cancel/restart proof, including stale-output suppression and a successful newer-response notification control, before merge.
Agent review details

Security

None.

Review metrics

Metric Value Why it matters
Production and test delta production +304/-31 lines; tests +736 lines; docs +31 lines The production state-machine growth has focused correlation, retry, parser, and notification coverage, while product-path proof remains outstanding.

Merge-risk options

Maintainer options:

  1. Complete native product proof (recommended)
    Through a paired Gateway and isolated WinUI app, cancel response A, start B, deliver delayed A frames, and capture B's completion plus positive and negative toast and speech controls.

Technical review

Best possible solution:

Keep run ownership in the existing chat state boundary, preserve no-run-ID compatibility and known late tool repair, and verify the resulting timeline and notification behavior in the native product path.

Do we have a high-confidence way to reproduce the issue?

Yes, at source level: current main omits payload run identity from incoming chat admission, and the submitted old-run/new-run regression sequence targets that path. This read-only review did not execute a live reproduction.

Is this the best way to solve the issue?

Yes, the branch uses the existing conversation and lifecycle owners and retains legacy no-ID handling. Native Gateway and WinUI evidence is still needed to establish merge readiness.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 04a880fe9488.

Labels

Label changes:

No label changes.

Label justifications:

  • P2: Cancelled responses can disrupt a newer native chat turn, with impact limited to this chat workflow.
  • merge-risk: 🚨 message-delivery: The new admission gate decides whether incoming assistant and tool frames reach the visible conversation.
  • merge-risk: 🚨 session-state: Run completion and cancellation fences can change which response owns an active native chat turn.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: Real behavior proof is not required for maintainer- or bot-authored pull requests.

Evidence

What I checked:

Likely related people:

  • Barbara Kudiess: Raw commit f8a8825 adds src/OpenClaw.Tray.WinUI/Chat/ChatLifecycleState.cs:77 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: f8a8825ccbb4; files: src/OpenClaw.Tray.WinUI/Chat/ChatLifecycleState.cs)
  • Scott Hanselman: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Caleb Eden: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Capture the cancel A, start B, delayed A sequence through a paired Gateway and isolated WinUI app, including timeline and positive and negative notification results with private details redacted.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (5 earlier review cycles)
  • reviewed 2026-09-17T23:09:54.869Z sha 896d323 :: blocked before merge. :: none
  • reviewed 2026-09-17T23:18:47.987Z sha 896d323 :: blocked before merge. :: none
  • reviewed 2026-09-25T23:15:44.078Z sha 896d323 :: blocked before merge. :: none
  • reviewed 2026-09-25T23:42:27.065Z sha 896d323 :: blocked before merge. :: none
  • reviewed 2026-09-30T19:04:29.412Z sha 896d323 :: blocked before merge. :: none

@karkarl

karkarl commented Sep 22, 2026

Copy link
Copy Markdown
Collaborator

Global repo triage reviewed exact head 896d323601866c74014d83ec8c70d9fa1fd1e4f7.

Decision: NEEDS_HUMAN_TEST. Take confidence: 82%. Recommendation confidence: 98%. Risk: High.

Independent source review found no blocking defect. Chat state/provider ownership matches docs/ARCHITECTURE.md, regression coverage is extensive, and exact-head CI is fully green. The remaining gate is the declared native behavior proof.

Complete windows-winui-interactive and windows-wsl-gateway-e2e: cancel run A, start run B, inject delayed A text/final/tool events, and verify B remains active while stale notifications, toast, and TTS are suppressed. Then obtain maintainer review.

@karkarl karkarl added the status: 🚢 actively landing A maintainer or agent is actively driving this item through implementation, validation, or merge. label Sep 25, 2026
@clawsweeper clawsweeper Bot added merge-risk: 🚨 message-delivery 🚨 Merging this PR could drop, duplicate, misroute, suppress, or wrongly target messages. merge-risk: 🚨 session-state 🚨 Merging this PR could lose, corrupt, stale, or mis-associate session or agent state. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels Sep 25, 2026
@karkarl karkarl removed the status: 🚢 actively landing A maintainer or agent is actively driving this item through implementation, validation, or merge. label Sep 25, 2026
@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. labels Sep 25, 2026
@shanselman shanselman added status: 🚢 actively landing A maintainer or agent is actively driving this item through implementation, validation, or merge. and removed status: 🚢 actively landing A maintainer or agent is actively driving this item through implementation, validation, or merge. labels Sep 30, 2026
@github-actions

Copy link
Copy Markdown
Contributor

This pull request has been automatically marked as stale due to inactivity.
Please update it or it will be closed.

@github-actions github-actions Bot added the stale label Oct 15, 2026
After Stop completed, a cancelled run's late chat frames could still render
into the next turn, end it, and fire a completion toast/TTS, because chat
frames carried no run identity and the aborted-run state was cleared when
the cancelled run's terminal arrived.

- Parse the chat payload runId into ChatMessageInfo.RunId.
- Fence assistant/tool chat frames from runs cancelled by Stop or session
  reset, before and after their terminal, via a bounded (64) retired set in
  ChatLifecycleState. Drop agent events of retired runs and replayed starts
  of aborted runs. Rolled-back aborts are not retired.
- Add a per-frame SuppressNotification() veto so rejected frames do not
  reach notification history, toasts or TTS. Duplicate-frame dedupe and
  throwing consumers keep the existing notification behavior.
- Frames without a runId keep legacy thread-level handling. Runs that
  completed normally are not fenced.

Co-authored-by: Copilot App <[email protected]>
@bkudiess
bkudiess force-pushed the bkudiess-chat-run-correlation branch from 896d323 to 69cee2b Compare October 15, 2026 06:02
@karkarl

karkarl commented Oct 15, 2026

Copy link
Copy Markdown
Collaborator

Global repo triage adversarial review

Decision: HOLD_FOR_AUTHOR
Take confidence: 75%
Recommendation confidence: 98%

Both independent reviewers completed against exact head 69cee2b4eb0b7876f3b8c4c7472ddbf08df1df19. Focused suites and exact-head CI pass, but two reproduced P2 ordering regressions and missing runtime proof block landing.

Severity Finding Location Fix confidence
MEDIUM If lifecycle terminal arrives before a pending abort RPC fails, rollback leaves the run retired. Its valid trailing final and notification remain suppressed. A compiled production-state reproduction fails with a passing reverse-order control. ChatLifecycleState.cs:136-139 90%
MEDIUM (single-reviewer) The blanket retired-run filter drops identity-matched approval resolved/expired control events, leaving an obsolete pending permission. A compiled production-state reproduction fails with a passing normal-completion control. ChatConversationState.cs:1953-1957 90%

Required next action: repair failed-abort retirement without clearing an independent reset fence; allow matched terminal approval cleanup without admitting new requests or output; add ordering coverage; rerun exact-head validation; then provide windows-winui-interactive and windows-wsl-gateway-e2e proof for cancel/resend, delayed old-run events, and positive/negative toast and TTS controls.

No code changes or remote branch updates were made by this review.

…cellation

Address triage review on 69cee2b:

- If a cancelled run's terminal arrives before the abort RPC fails, the
  rollback now releases the abort retirement so the uncancelled run's
  trailing final and notification are admitted again. Retirement reasons are
  tracked separately, so a failed abort cannot clear an independent reset
  fence.
- A retired run may still deliver the terminal approval event (resolved,
  expired, etc.) that matches the currently pending permission, so the
  obsolete permission banner is cleared. New approval requests and output
  from the retired run stay blocked.

Co-authored-by: Copilot App <[email protected]>
@bkudiess

Copy link
Copy Markdown
Collaborator Author

Thanks for the review. I've addressed both findings in a462cfd4.

Finding Fix Regression coverage
Lifecycle terminal before a failed abort RPC left the run retired, so its trailing final and notification stayed suppressed ChatLifecycleState now records why a run was retired (abort or reset). RollbackAbort releases only the abort reason, so a failed abort re-admits the uncancelled run's trailing final. An independent reset fence stays in place. Gate_FailedAbortRestoresTrailingFinalRegardlessOfTerminalOrder covers both orders; the reverse order is the control. Lifecycle_FailedAbortAfterTerminalReleasesAbortRetirement covers the lifecycle state directly, and Lifecycle_FailedAbortDoesNotClearIndependentResetFence covers the reset fence.
Blanket retired-run filter dropped matched approval resolved/expired events, leaving an obsolete pending permission The retired-run gate now admits only a terminal approval event whose approval ID matches the currently pending permission. Unmatched terminals, new approval requests and output from the retired run are still dropped. Gate_RetiredRunCanCloseOnlyItsPendingApproval (resolved and expired). It also asserts that an unmatched terminal, a new request and a late assistant delta are rejected.

With either fix reverted, 4 of these tests fail and the controls pass.

Validation on a462cfd4. Every run had all three OPENCLAW_TRAY_* roots isolated before process start.

  • .\build.ps1: passed.
  • Shared.Tests: 4,325 passed, 35 skipped.
  • Tray.Tests: 4,103 passed.
  • No chat cache files changed in the real profile. The only real-profile writes came from an independently running normal Companion instance and its WSL Gateway, not from these runs.

The windows-winui-interactive and windows-wsl-gateway-e2e runtime proof is still outstanding.

@github-actions github-actions Bot removed the stale label Oct 16, 2026
karkarl and others added 2 commits October 16, 2026 19:18
Keep restored older-run finals separate from active streaming turns and reject terminal-run replay. Add deferred-abort regressions and five isolated native cancellation scenarios.

Co-authored-by: Copilot App <[email protected]>
Copilot-Session: af5ac91e-d8cc-4635-82b8-9db6695a73ee
Preserve held chat-abort responses alongside interactive fixture acknowledgements, and keep interactive/cron scenario identities with chat-send version 2.

Co-authored-by: Copilot App <[email protected]>
Copilot-Session: af5ac91e-d8cc-4635-82b8-9db6695a73ee
@karkarl

karkarl commented Oct 17, 2026

Copy link
Copy Markdown
Collaborator

Exact-head adversarial review

PR #1440 (fix(chat): keep cancelled responses from ending newer turns).

Decision: HOLD_FOR_AUTHOR. Take confidence: 70%. Recommendation confidence: 98%.

Head: da0f9802d5c15c52e6e49cb9e11e9c1b8221900f
Base and merge base: c2ce4f50eb6313121ffb385e086cf4c4ba7b982b
Previous reviewed head: a462cfd4fd18865b6f1a21f4a6614ae77fad549e

Both independent background rubber-duck reviewers completed with the same prompt, full current patch, author repair delta, prior findings and affected callers/tests. The original pair was reused: claude-opus-5.5, high/default context, agent 27a34f92-bbad-4cee-be73-adaca3cd7803; gpt-6-astra, high/long_context, agent 368fec40-e5dd-4b61-beac-29d1680fcf75. No model replacement or agent adaptation. Prompt SHA-256: 6E7923F86B52E4EE50073B6C2185B97BF36124CF561ED0FE3F15F3A572843EE0.

HIGH consensus: independent overlap

Issue Opus 5.5 GPT-6 Astra Fix Confidence
An admitted A background final copies its media onto streaming B MEDIUM-LOW, non-blocking MEDIUM/P2 92%

The new background event inserts A before B. The metadata merge then updates the last assistant, B. The renderer consumes that media. Coordinator reproduction assigned A's image to both rows; the no-streaming-B control stayed correct. Narrowed to admitted finals, such as after failed-abort cleanup, not successfully cancelled A still fenced. Coordinator rates this MEDIUM and requests repair despite the models' blocking-status disagreement. Assign background metadata only to A and cover independent media on B.

LOW consensus: one reviewer

Issue Opus 5.5 GPT-6 Astra Fix Confidence
Non-cancelled A's matched late tool completion is rejected once B starts not flagged MEDIUM/P2 90%
Repeated A background finals without message ID/sequence append duplicate rows not flagged MEDIUM/P2 80%
Normally completed A's background final loses toast/TTS while B owns the turn LOW, needs-info not flagged 60%

The expanded agent gate rejects terminal A's tool completion even though existing coverage establishes late correlated recovery. Coordinator verified the rejection predicate and recovery-if-admitted with B still active. Permit only retained, identity-matched terminal tool updates for non-cancelled runs, not arbitrary old output.

The background reducer always inserts. With B active and no message identity, the actual classifier returned Render twice and produced two A rows. Preserve retransmission dedupe without collapsing distinct equal-text messages. Both single-reviewer MEDIUM findings are conditionally verified source defects; real-Gateway frequency is unmeasured.

Disputed and resolved items

The deferred terminal-before-abort-failure defect is fixed, including preservation of B and independent Reset fences. Direct rollback and matched terminal approval cleanup remain repaired. The approval exemption exists in the agent gate, not the non-final chat gate as one reviewer stated.

The notification-policy concern is not a separate blocker. Do not restore ordinary completion during B's pre-start gap, which could end B. The prior already-discarded-final replay question remains disputed and non-blocking, not new independent overlap. Direct abort failure does publish an error, so the broader no-notification claim is narrowed. aborted:false and user-echo identity remain unverified. Legacy/reset veto objections remain withdrawn. Partial-plus-final duplication is not verified as new and is distinct from repeated-final duplication. Double Stop and direct rollback affecting B remain baseline concerns.

Validation and remaining proof

CI run 39007373133 succeeded. CI commit 4d78c7c442f92c9f43ddc15aa440d2fb94d72d3b has the same complete tree as reviewed head. Downloaded TRX passed/total: Shared 4403/4404, Tray 4130/4130, Connection 1658/1659, SetupEngine 2351/2352, CLI 129/129, DevSettings 10/10, Integration 51/53. Zero failures in those files; named deferred-abort and background-final regressions passed.

CancelledRunLateFinalCannotEndNewerNativeTurn and DeferredAbortFailureAfterTerminalRestoresNativeFinal were NotExecuted. Current-head windows-winui-interactive and windows-wsl-gateway-e2e remain open, including delayed-A/newer-B behavior and positive/negative toast/TTS controls. In-memory probes are not full provider or native proof. No local current-head project build, test suite, UI or Gateway run was performed.

Repair the three MEDIUM issues, add the missing cross-run regressions, rerun exact-head validation, then supply both native proof pools. This review made no source or GitHub changes.

Keep background media entry-scoped, repair only retained terminal tool outcomes, and deduplicate identityless background finals by run and content. Preserve upstream fixture gates and add transport, provider, and native regression coverage.

Co-authored-by: Copilot App <[email protected]>
Copilot-Session: af5ac91e-d8cc-4635-82b8-9db6695a73ee

@karkarl karkarl left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approve at c6960a8. Take confidence: 90%.

The three verified cross-run defects are repaired: background-final media stays with its own entry, retained late tool outcomes repair only the matching older run, and identityless background-final retransmissions do not duplicate rows or disturb the newer turn. Independent P0-P3 review found no significant remaining issues.

Validation: full repository build passed; Shared tests 4,501 passed with 35 existing opt-in skips; Tray tests 4,341 passed without skips; all six isolated native UI cases passed. Inspected native captures show separate media, correct tool ownership, and continued newer-turn streaming. Owned runtime cleanup was independently verified.

Build and Test: https://github.com/openclaw/openclaw-windows-node/actions/runs/39453789707 (passed).
CodeQL: https://github.com/openclaw/openclaw-windows-node/actions/runs/39453789785 (passed).

Native proof used the real Companion with a synthetic loopback Gateway, not a live AI provider. The remaining uncertainty is production event ordering. The frozen binaries were built from the source tree later committed as c6960a8, with source/patch equality verified; assembly metadata retains the precommit revision da0f980.

Main has advanced and merge conflicts remain at submission time. This approval records the verified head above, not a claim that the subsequent conflict resolution is already validated.

Preserve cancellation fixture versioning alongside fractional voice history and session creation scenarios.

Co-authored-by: Copilot App <[email protected]>

Copilot-Session: af5ac91e-d8cc-4635-82b8-9db6695a73ee

@karkarl karkarl left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

90% take confidence at 0222c798. Recommendation: take.

The merge conflicts are resolved, the PR is clean and mergeable, and there is no new blocking code finding. The conflict resolution preserves the cancellation fixture behavior alongside the incoming fractional-voice history and session-creation behavior.

Current-head hosted evidence:

  • Build and Test and CodeQL passed, including CI Gate and all selected E2E lanes.
  • The actual reports show 4,652 Shared tests passed with 8 skips, and 4,444 Tray tests passed with no skips.
  • All 17 selected chat/voice regression cases passed.

Remaining proof gap: the required local rerun and seven-case native replay on this merged head are still pending, blocked by the shared test-controller issue and execution hold. The earlier six-case native pass was on pre-merge c6960a87 and exercised real Companion against a synthetic loopback Gateway, not live production Gateway/provider ordering. The selected native replay methods were skipped in hosted CI.

This approval is a positive code verdict, not a claim that the pending local/native proof closeout has completed. I would retain 90% confidence rather than raise it solely because hosted CI is green.

@karkarl
karkarl merged commit 067c58f into main Oct 20, 2026
24 checks passed
@karkarl
karkarl deleted the bkudiess-chat-run-correlation branch October 20, 2026 20:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-risk: 🚨 message-delivery 🚨 Merging this PR could drop, duplicate, misroute, suppress, or wrongly target messages. merge-risk: 🚨 session-state 🚨 Merging this PR could lose, corrupt, stale, or mis-associate session or agent state. P2 Normal priority bug or improvement with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants