Skip to content

fix: show the Gateway answer after reconnect - #2379

Merged
bkudiess merged 24 commits into
openclaw:mainfrom
bkudiess:bkudiess-question-expiry-investigation
Dec 2, 2026
Merged

bkudiess merged 24 commits into
openclaw:mainfrom
bkudiess:bkudiess-question-expiry-investigation

Conversation

@bkudiess

@bkudiess bkudiess commented Nov 25, 2026 •

Copy link
Copy Markdown
Collaborator

Agent assessment

Self-reported assessment, not an independent review.

Assessed revision: 4ce1a5346b49fb47f933b1b0ee8292ef38981f34

Dimension Assessment Rationale
Change confidence 9.5/10 ↑ Hosted CI on this head: every TRX file reports 0 failed (Shared 6,292, Tray 7,365, Tray UI 1,339, fixture UI 93, and the rest); CodeQL passed.
↑ The full-app reconnect test, the real-socket Gateway client test and the mounted WinUI test each passed 11/11 in hosted CI, including a 10-run soak.
↑ Local build.ps1, Shared (6,229 passed, 29 skipped) and Tray (7,251 passed) runs passed on this exact tree.
↑ Removing any one of the six answer-fence lines fails its named coordinator test.
↑ Round 16 of the dual-model review found nothing in either model.
↓ Not run against a live Gateway or provider.
↓ Local accessibility scan had 2 failures outside question code; hosted accessibility had 0 failed with 14 not run.
↑ Network recovery E2E passed 2 of 2 on the rerun; CI Gate passed and merge state is clean.
↓ The first network E2E attempt hit the 30-minute job limit with no log; the E2E project does not reference changed code, so this is attributed to the runner, but its cause is unproven.
Diagnosis confidence 9.5/10 ↑ The base build reproduces the reported screen in the full app: connected, answer accepted, "Question expired".
↑ The real-socket test on base shows question.get=0 after reconnect, and reverting the fix fails both cases.
↑ The old fixture listed answered questions, unlike the upstream Gateway, which explains why existing tests missed it.
Evidence fit 9.5/10 ↑ The reported screenshots show web chat with the answer recorded while Companion showed "Question expired", which is the screen the base build reproduces.
↑ Both possible triggers (a dropped connection, or a failed reply while connected) are covered and recover.
↓ No field log, so the exact trigger in the report is unknown.

What Problem This Solves

When the Gateway connection drops while an agent is asking a question, Companion can show "Question expired" after it reconnects, even though the Gateway already has an answer. This happens when the user answered just before the drop and the reply was lost, or when someone else answered in web chat while Companion was offline. The user is told their answer was lost when it was not, and the only way to see the real outcome is to open web chat.

User Impact

User impact: after a reconnect, Companion checks every question it marked expired on its own and shows the Gateway's real outcome. It does this without a manual Refresh and without sending the answer a second time. While it checks, the question shows "Checking question status."

Visible changes and limits:

  • When the Gateway reports the question answered, the question panel closes and the conversation continues. Companion does not keep answers, so it does not show the answer text.
  • Skipped, expired and unavailable outcomes show a summary card ("Header: outcome") like web chat. A question Companion expired on its own shows "This question is expired or disconnected." while offline, then "Checking question status." until the Gateway answers.
  • The "Refresh questions" button is removed. Recovery is automatic: after a failed check, Companion retries after 1, 2 and 4 seconds, then every 4 seconds while connected.
  • Question copy no longer tells people to press Refresh. The changed strings are updated in all six shipped languages.
  • A brief "Could not submit your answer. Try again." can appear before the status check replaces it. Free text typed in an attempt that was not sent is cleared.
  • If the local deadline passes while an answer is still being sent, Submit stays disabled and the question shows "Checking question status." until the Gateway reports the outcome, so Companion never sends that answer twice. If the reply is lost to a reconnect, or fails with an unknown result, the question shows "The answer was not confirmed. Checking its status." instead.
  • If the Gateway reports that the answer was not written (an invalid answer, or a request that was never sent), Submit comes back once a status check shows the question still pending.
  • If this PC's clock is ahead of the Gateway's, Companion keeps checking every 4 seconds until the Gateway reports a final status.
  • The Gateway keeps a resolved question for about 15 seconds. If Companion reconnects later than that, the Gateway reports the question as not found and Companion shows "Question no longer available". It never shows a false "Question expired".
  • If question.get keeps failing with an error other than "not found", the question stays on "Checking question status." and Companion keeps checking every 4 seconds while connected. There is no retry limit, so a later success still shows the real outcome.
  • Settled summaries stay bounded to the three newest. Questions still waiting for a check are kept until the Gateway answers.

Why This Change Was Made

Root cause. When the local deadline passed, Companion marked the question expired and stopped tracking it. The Gateway's question.list returns pending questions only, so an answered question drops out of the list. Nothing then read the question directly with question.get, so the local "expired" stayed on screen. This came in with #1757.

Fix. A local expiry is now treated as unconfirmed, not final. ChatQuestionCoordinator keeps such questions in recovery, reads each one with question.get after reconnect and on the retry schedule above, and replaces the local status with the Gateway's. Recovery only reads. It never resends an answer, and a submission whose result is unknown stays blocked from a second submit until the Gateway reports a status. This includes an answer still being sent when the local deadline passes, whether the once-a-second expiry check or a status read notices the deadline first.

Test fixture fidelity. The synthetic Gateway's question list used to include answered questions, which hid this bug from the existing tests. It now returns pending questions only, matching the upstream Gateway. The fixture also gains InterceptNextRequest, so a test can take a request before the Gateway applies it and model a commit whose reply was lost. An interception never replies, so the fixture refuses one for a request whose response is held (a response gate or a held chat.abort). It checks and takes the interception under one lock, so a concurrent registration cannot slip past that check.

Scope: questions only. The setup-mascot crash fix that briefly shared this branch landed separately in #2425.

Evidence

The reported screen, reproduced in the full app and fixed. The new UI test GatewayFixtureUiTests.InteractiveQuestionAnsweredDuringOutageShowsGatewayOutcomeAfterReconnect drives the real Companion app, with an isolated profile, against the fixture Gateway over a real WebSocket:

  1. An agent asks a question. The test picks an option and presses Submit.
  2. The Gateway takes the answer, then the connection drops before the reply or the resolved event reaches the app. The Gateway applies the answer while the app is offline.
  3. The app's local deadline passes while it is still offline.
  4. The connection comes back.

It passes only when, after reconnect, the app has read the question with question.get, the question panel is gone, the composer is back, and the answer was sent exactly once.

Build Result
Head 7b740dbf with the question code reverted to base 9f802c64 (local) Fails after 105 s: "Timed out waiting for Gateway answer replaced the local expiry after reconnect"
Head 7b740dbf (local) Passes in 45 s
Head 1f052401 (local) Passes in 46 s
Head 4ce1a534 (current), hosted CI Passes 11 of 11: the full fixture UI run plus the 10-run soak of new and changed tests, in CI 46775158923

The test itself is unchanged since 7b740dbf; later commits change only ChatQuestionCoordinator.cs and its unit tests.

Base (local run), after reconnect: connected, and the agent reply says the answer was accepted, but the panel above the composer still says "Question expired". This is the reported screen.

Base build after reconnect: the agent reply says the answer was accepted, but the panel above the composer says Question expired

This PR (hosted CI on head 4ce1a534), offline after the local deadline: the question is shown as not confirmed, not as expired.

This PR while disconnected after the local deadline: the question card says This question is expired or disconnected

This PR (hosted CI on head 4ce1a534), after reconnect: the app read the Gateway's answer, closed the question and shows the reply.

This PR after reconnect: the agent reply is shown and no question panel remains

Question before the outage, and run identity

This PR before the outage: the question card with Inspect selected and Submit enabled

The three screenshots of this PR come from hosted CI 46775158923, attempt 1. It tested head 4ce1a5346b49fb47f933b1b0ee8292ef38981f34 merged into main (merge commit 206fe35fc6ea247d2755715d12688c392f7d0895). The test captured them from the app's own window with PrintWindow (artifact test-results-gateway-fixture, fixture run 58430fc1). The fixture Gateway recorded connect, question.list, question.resolve, connect, question.list, question.get: one answer, then a status read after reconnect.

The base screenshot comes from a local run on head 7b740dbfb19580d57189dd376fb55ff3a712d640 that reverted only ChatQuestionCoordinator.cs, ReactorQuestionPanel.cs and the six Resources.resw files to base. The local fixed runs used clean trees.

Run Source OpenClaw.Tray.WinUI.dll SHA256 Real profile change
Base, local 7b740dbf, question code at base EE9A44B763F31B0F0CE0795A104855E9B22A0300BECD6069073CDD858C4AA2F2 none
Fixed, local 7b740dbf C048F520A569CA3A8C90AF20B2E4CDCF1AB875A73961FFA56CB784E6820FA8B1 none
Fixed, local 1f052401 E357F97EDED45E5DD4BF9298C0612C52FAA671A089337D6FAEFD35D7DBE37185 none
Fixed, hosted CI merge 206fe35f 028A518BB68C9919DA4F15B09071EF8766754F333E91E96B533EAEBDAB08D50F isolated runner profile

Bug reproduced, then fixed, at the Gateway client. InteractiveGatewayChatTests.QuestionResolvedDuringOutageAndExpiredLocally_ShowsGatewayAnswerAfterReconnect runs the real Companion Gateway client against the fixture Gateway in two cases:

  • answeredHere: true: the user submits an answer. The Gateway takes it, the connection drops before any reply or event, then the Gateway applies it. This is the reported scenario.
  • answeredHere: false: another operator answers while Companion is offline.

In both cases the question shows "expired" while offline. After reconnect it must show "answered" with no error. The test also checks that a successful question.get ran after reconnect and that Companion sent question.resolve at most once (no resend).

Check Result
This test and fixture against base 9f802c64 production code Both cases fail. After reconnect: connected=True status=expired question.list=1 question.get=0, so Companion never read the question
Production fix reverted to base logic (both coordinator lines) Both cases fail: 30 s timeout waiting for "answered"
Old fixture list (answered questions included) with base logic Old reconnect test passed, so the fixture had masked the bug
Current head, focused theory repeated 10 times 20/20 cases passed, about 4 s each
Hosted CI on 4ce1a534: Tray suite plus the 10-run soak Both cases passed 11/11

Coordinator regressions. ChatQuestionCoordinatorTests cover each recovery route: reconnect, a connected reply failure, retries running out, and clock skew. LocallyExpiredQuestion_ReadsGatewayOutcomeWhileConnected covers both Gateway answers to a status check while connected: "answered", and "not found" after the grace window, which shows "Question no longer available". Each makes exactly one read. Removing NeedsRefresh = true or the recovery arm from Expire fails both cases. Earlier review rounds mutation-checked the other new tests against the production lines they guard. FailedRefresh_RetriesAtOneTwoFourSeconds_ThenEveryFourUntilRecovered pins the automatic retry schedule that replaces the Refresh button.

The no-second-answer fence has its own tests. On 4ce1a534, removing each production line below fails the named coordinator test:

Removed line Failing test
Expire keeps an in-flight answer awaiting the Gateway LocallyExpiredInFlightSubmission_PendingReadCannotSendSecondAnswer, plus 2 more
A read that notices the deadline keeps the in-flight fence (Store) InFlightSubmission_ReadPastDeadlineKeepsAnswerFence
A reconnect keeps the not-confirmed notice (OnStatus) LocallyExpiredInFlightSubmission_ReconnectKeepsUnconfirmedNotice
An unknown failure after local expiry shows the not-confirmed notice LocallyExpiredInFlightSubmission_FailedReplyRecoversGatewayAnswerWhileConnected
"Invalid answer" clears the fence LocallyExpiredUnwrittenAnswer_CanBeSubmittedAfterPendingRead(invalidAnswer: True)
"Request not sent" clears the fence LocallyExpiredUnwrittenAnswer_CanBeSubmittedAfterPendingRead(invalidAnswer: False)

Mounted WinUI. ReactorQuestionProofTests.LocallyExpiredQuestion_StaysUnconfirmedUntilReconnectReadsOutcome renders a locally expired question in the real native panel. It shows the unconfirmed state with no Refresh control, then the Gateway outcome after reconnect, for both "answered" and "expired". Both cases passed 11/11 in hosted CI on 4ce1a534. The new and changed ChatQuestionCoordinatorTests cases that CI selected for its soak, including the six fence tests above, each passed 10/10.

Review. Sixteen rounds of the Hanselman dual-model review (claude-opus-5.5, and gpt-6-astra with long context, both at high reasoning effort). Each verified finding was fixed with a regression test. The last three rounds:

Round Reviewed Finding Outcome
14 7b740dbf An answer in flight when the local deadline passed lost its fence, so a later clock correction could allow a second answer (Astra, medium) Fixed in 1f052401
15 7b740dbf..1f052401 A status read that noticed the deadline first dropped the same fence (Opus, medium). A reconnect lost the not-confirmed notice (Opus, low) Fixed in 4ce1a534
16 1f052401..4ce1a534 None from either model Clean

Left as is, by decision: when question.list fails and Companion knows no question, it retries every 4 seconds without a panel error, which matches web chat. After a local expiry and a "request not sent" reply, "Could not submit your answer. Try again." can show for up to 4 seconds while Submit stays disabled, until the next status read. A reconnect while an answer is in flight, before the local deadline, re-enables Submit once a status read shows the question still pending; this is unchanged from base.

Validation commands and counts

Local runs on 4ce1a5346b49fb47f933b1b0ee8292ef38981f34 (the validated tree, committed unchanged):

  • .\build.ps1: all builds succeeded.
  • dotnet test .\tests\OpenClaw.Shared.Tests\OpenClaw.Shared.Tests.csproj --no-restore --blame-hang-timeout 10m: 6,229 passed, 29 skipped, 0 failed. The hang guard is there because an earlier run hung in InstalledFileWorkerResolverTests.CancellationBeforeVerificationResumesPreservesItsTokenAndOnlyUnprovenObjects(obstacle: "published-ea"), a FileWorker test this PR does not touch. A dump showed its oplock request failed at once, and its cleanup then waits forever in GetOverlappedResult. It did not hang on this run.
  • dotnet test .\tests\OpenClaw.Tray.Tests\OpenClaw.Tray.Tests.csproj --no-restore: 7,251 passed, 0 failed.
  • .\scripts\validate-test-timing-patterns.ps1: passed.
  • git diff --check against base: clean.

Earlier, on 740a013b: the Shared Interactive_ fixture filter passed 46. Interactive_DisposeCancelsUnusedInterception fails at its 20 s deadline when the dispose cancellation is removed. Interactive_InterceptionCannotBypassHeldResponse fails for a held chat.abort when the guard ignores the abort gate, and fails in both cases when the guard is removed. The ReactorQuestionProofTests.cs timing baseline went down from 26 to 23. These fixture tests are part of the full Shared run above, so they also pass on the current head.

Hosted CI 46775158923, attempt 1, on head 4ce1a534 (merge commit 206fe35f). Counts come from the downloaded TRX files. Every file reports 0 failed.

Suite Passed
Shared 6,292
Connection 1,851
SetupEngine 2,642
Tray 7,365
Tray integration 83
Tray DevSettings 31
WinNode CLI 141
FileWorker 75
Tray UI (main job and shard) 1,339 of 1,346, and 262 of 281 (the rest skipped)
Fixture UI (main job and shard) 93, and 45
Fixture app profile, released profile, Gateway release, reader release 57, 1, 2, 2
Functional UI, animations off and on, automations resources, hardware profiles 19, 1 and 7, 31, 12
Accessibility 29 of 43 (14 not run)
Soak of new and changed tests, 10 runs Every run passed: Shared 4, Tray 51, Tray UI 6, fixture UI 1

CodeQL: success. Network recovery E2E (WSL Latest): attempt 1 was cancelled at the 30-minute job limit without a log or artifact. OpenClaw.E2ETests references only SetupEngine, Shared and Connection, which this PR does not change. Attempt 2 of the same run passed 2 of 2 tests in about 13 minutes, and CI Gate passed.

Earlier local runs on head 2d9d98bbc9ec4ff900facaa046c1668ef8a3b948 hit two unrelated first-run failures, each passing on rerun: GatewayFileTransportTests.RejectedFrameInWindowStopsTransferAndLeavesGatewayResponsive(rejected: 0) (HttpListenerException, its listener port was in use) and InteractiveGatewayChatTests.SidebarForkPreservesCompletedHistory(active: True) (the fixture recorded a non-WebSocket INVALID_UPGRADE connection the test never sends). Neither touches question code.

Required proof pools

  • windows-winui-interactive: Partly verified on head 4ce1a534.
    • Changed path in the isolated app: verified by the automated full-app run and screenshots above (base fails locally, this PR passes 11/11 in hosted CI on 4ce1a534). This is UI Automation, not a computer-use session.
    • Accessibility scan (run-accessibility-scan): ran locally on a clean tree, 41 of 43 passed. The evidence validator records the run as blocked because of 2 failures outside question code. MainSearch_OpenPopupEmptyResultsAndAccessibleInputStatusPassAccessibility failed because Windows kept another desktop app in the foreground. SessionsRows_ArrowNavigationEntersLaterRowActions is a stale test: it expects "Open in chat", but the row has said "Open {title} in chat" since 3f47e8388. Neither ran in hosted CI, where accessibility had 29 passed, 14 not run and 0 failed.

Real Behavior Proof

The reported sequence runs end to end in the real app (Companion UI, production Gateway client and a real WebSocket) against the fixture Gateway, on base and on this head, as shown above. The base build reproduces the reported screen: connected, the answer accepted, and "Question expired".

Limits: this is not a live Gateway or provider run. No field trace from the original report was available, so its exact trigger (a dropped connection, or a failed reply while connected) is unknown. Both triggers are covered by tests. The original report's screenshots are not attached because they contain private chat. They showed web chat with the answer recorded while Companion showed "Question expired".

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@clawsweeper

clawsweeper Bot commented Nov 25, 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. impact:session-state This issue is about session, memory, transcript, context, or agent state drift. impact:ux-friction User-facing flow adds avoidable confusion or support burden without fully blocking progress. clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 25, 2026
@clawsweeper

clawsweeper Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

Codex review: passed.

What this changes

This PR automatically retrieves the Gateway’s authoritative question outcome after local expiry or reconnect without resending the answer.

Example: The user selects Inspect, submits it, and loses the connection before the acknowledgement arrives.

  • Before: After reconnect, Companion can show Question expired even though the Gateway accepted Inspect.
  • After: Companion reads the question’s status, removes the answered question panel, and restores the composer without submitting again.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A worthwhile, focused repair with application-boundary evidence and distinct regression coverage; no merge-blocking defect was identified.
Proof confidence 🐚 platinum hermit (4/6) ✨ media proof bonus Sufficient (linked_artifact): The isolated full Companion app exercises ChatQuestionCoordinator through the production Gateway client and real WebSocket, loses an answer acknowledgement, expires locally, then recovers through question.get without replay. Inspected screenshots show the base failure and current-head recovery; the successful hosted run and supplied request sequence address the earlier review’s proof request. Live Gateway/provider behavior remains unverified.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Companion can falsely display Question expired after reconnect even when the Gateway accepted an answer.
Reason: The maintainer-authored direction restores authoritative recovery and explicitly accepts automatic polling, removal of manual Refresh, and the Gateway’s limited resolved-question retention.

Merge readiness

✅ Ready for maintainer review

Keep this PR open: current main still has the recovery defect, the maintainer-authored repair is useful, and no definite introduced bug was found.

Reviewed head: 4ce1a5346b49fb47f933b1b0ee8292ef38981f34

Before merge

None.

Findings

None.

Agent review details

How this fits together

ChatQuestionCoordinator receives question events, connection changes and status responses through the existing authenticated Gateway bridge, then supplies transient state to ReactorQuestionPanel.

flowchart LR
  A[Gateway question service] --> B[Authenticated Gateway client]
  B --> C[ChatQuestionCoordinator]
  D[Local expiry timer] --> C
  C --> E[Automatic status recovery]
  E --> B
  C --> F[Native question panel]
Loading

Technical review

Best possible solution:

Retain authoritative outcome recovery in the existing coordinator, preserve uncertain-answer submission safeguards, and dismiss questions only when their Gateway outcome is known.

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

Current-main source establishes the failure path, and supplied base-app evidence shows the accepted answer alongside stale expiry; this review did not execute a reproduction.

Is this the best way to solve the issue?

The repair addresses the cause in the established state owner, uses supported status reads, preserves generation and revision safeguards, and corrects the fixture behavior that masked the defect.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against d0a9f21b8cee.

Provenance checked

  • Local expiry, terminal retention and answer recovery keeps the original intent (814e732: The original interactive-question feature separated transient questions from transcript runs, required acknowledged answers, and explicitly distinguished local expiry from an authoritative terminal tombstone.)
  • Bounded retries and manual Refresh changes intended behavior with a stated reason (814e732: The original implementation bounded automatic recovery and left manual recovery available; this maintainer-authored PR explains replacing that policy with continued read-only polling to recover missed outcomes automatically.)
  • Synthetic question listing changes intended behavior with a stated reason (5ca1513: The interactive fixture enabled deterministic chat and question testing without a live Gateway; returning resolved questions from its list masked the production recovery failure.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Karen: Raw commit 814e732 adds src/OpenClaw.Tray.WinUI/Chat/ChatQuestionCoordinator.cs:351 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 814e732e2e90; files: src/OpenClaw.Tray.WinUI/Chat/ChatQuestionCoordinator.cs)
  • Barbara Kudiess: Raw commit 8ffe470 adds src/OpenClaw.Tray.WinUI/Chat/ReactorQuestionPanel.cs:64 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 8ffe470e7d50; files: src/OpenClaw.Tray.WinUI/Chat/ReactorQuestionPanel.cs)

Preflight source

Source 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

Metric Value Why it matters
Production and regression scope Production C# +159/-64; localized resources +60/-48; tests and fixture support +1138/-45 Production changes remain in two existing owners; the larger test delta covers distinct state, real-socket, mounted-control and full-application failure boundaries.

Labels

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • remove rating: 🧂 unranked krab: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.

Label justifications:

  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall readiness starts with the lower of the proof and patch scores. It is capped at 3/6 if the fix is partial, the change offers little benefit, a product decision is still open, or the PR reverses an earlier decision without saying why. ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (1 earlier review cycle)
  • reviewed 2026-11-25T20:52:38.895Z sha 9ee65dd :: needs maintainer review before merge. :: none

Reviewed December 1, 2026, 7:59 PM ET / December 2, 2026, 00:59 UTC (Revision 2).

bkudiess and others added 6 commits November 30, 2026 12:25
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@bkudiess
bkudiess marked this pull request as ready for review November 30, 2026 23:15
bkudiess and others added 3 commits November 30, 2026 17:24
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Closing the AnimationController returned by
CompositionPathGeometry.TryGetAnimationController("Path") leaves the
native controller linked in the DirectComposition device rebuild list.
The next commit then hits dcompi!purecall in
CRebuildableObjectList::Rebuild and fail-fasts the process (0xC0000409),
which crashed the hosted Tray UI testhost.

Keep the controller unowned. Dispose already stops its Progress binding
and the geometry's Path animation before removing the visual tree.

This replaces the duplicate-playback change from 12c5b32, which did not
address the crash, and restores OnboardingMascot.cs to its base state.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Reject equivalent ways of closing the controller (using, Own, _owned) and require Dispose to stop bindings before clearing visuals.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
bkudiess and others added 5 commits November 30, 2026 23:06
When the transport confirms the question.resolve request was not written, restore the prompt to its pre-submit state with a send-failed error instead of locking it until a status refresh. Uncertain outcomes (timeout, lost connection) keep the existing lock.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…s mascot fix

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…wers

A question that expires locally while disconnected now shows "expired or
disconnected", then "Checking question status." after reconnect, instead
of a premature "Expired". The Gateway's recovered status decides the final
state. Local expiry drops a submit error that no longer applies, and a
question that can no longer be recovered now counts toward the terminal
history limit.

Adds a mounted UI proof for both reconnect outcomes (answered and expired)
and coordinator tests for the error and retention rules.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
- Keep a pending read past its local deadline unconfirmed until the Gateway expires it.
- Replace the endless checking notice with a read error after repeated failed reads.
- Keep the unsupported-read error through local expiry and trim that history.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
An unsupported list now marks a locally expired question with the read error instead of a final expiry. A pending read keeps the answer-not-confirmed notice, and the read-failure notice only marks questions that were not read in the failing refresh.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
bkudiess and others added 9 commits December 1, 2026 01:19
A local expiry bumps a question's revision without reading it, so the revision guard skipped it and delayed the read-error notice by one retry. Track the IDs each refresh actually read instead.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…s the local deadline

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
The Gateway's question.list returns pending questions only. The fixture
listed every question, which let the old coordinator recover an answered
question from the list and masked the stale local expiry.

- Make the fixture list pending questions only, like the Gateway, and
  add an external-resolve helper for answers made on another client.
- Add a real-socket regression: answer elsewhere while offline, expire
  locally, reconnect, and expect the Gateway answer via question.get.
- Tighten the connected failed-reply test and lower the timing baseline
  for the delays this PR removed.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…lost

Turn the reconnect repro into a theory. One case has another operator answer
while this client is offline. The other intercepts this client's own
question.resolve, disconnects before any reply or event, then lets the Gateway
apply it. Both expire locally and must show the Gateway answer after reconnect
without resending. Scope the question.get assertion to reconnect traffic and
wait on a single prompt.

Add FixtureGatewayServer.InterceptNextRequest so a test can take a request
before the scenario applies it.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
- Wait for the fixture to record the successful question.get, not only the client state, so the reconnect proof cannot race the fixture's completion record.
- Cancel unused interceptions on fixture disposal, and fail the connection when an interception would bypass a response gate.
- Cover the Gateway grace window: a locally expired question reads the Gateway outcome once, whether it is answered or no longer available.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…aborts

An interception never replies, so it could silently skip a held response.
The guard checked the gate in one lock section and removed the interception
in a later one, so a concurrent registration could bypass it, and held
chat.abort outcomes were not guarded at all. Check and take the interception
in the same lock section and include the abort gate.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…nnect

Add a full-app GatewayFixture test: the answer is accepted while the app
loses its reply and the resolved event, the local deadline passes during
the outage, and after reconnect the panel shows the Gateway outcome. The
test fails on the base build with "Question expired" still showing.

Record fixture gate conflicts as unexpected requests and dispose the
fixture server when interception test setup fails.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
A submission that is still in flight when the local clock expires the
question now stays awaiting resolution, so a later pending read cannot
re-enable Submit and send a second answer. Replies that prove nothing
was written clear that fence, and other reply failures keep the
unconfirmed notice.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
A refresh that reads a past-deadline pending request while an answer is
in flight now keeps the answer fenced until the Gateway resolves it.
A reconnect that drops an in-flight answer which expired locally now
shows the not-confirmed notice instead of an indefinite status check.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@bkudiess

bkudiess commented Dec 2, 2026

Copy link
Copy Markdown
Collaborator Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Dec 2, 2026 •

Copy link
Copy Markdown

🦞👀

Re-review progress:

@clawsweeper clawsweeper Bot added proof: sufficient Contributor real behavior proof is sufficient. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. labels Dec 2, 2026
@bkudiess
bkudiess merged commit 639db10 into openclaw:main Dec 2, 2026
59 of 61 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

impact:session-state This issue is about session, memory, transcript, context, or agent state drift. impact:ux-friction User-facing flow adds avoidable confusion or support burden without fully blocking progress. P2 Normal priority bug or improvement with limited blast radius. proof: sufficient Contributor real behavior proof is sufficient. 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant