fix(chat): reset keyless diagnostic on reconnect#646
Conversation
Reset the one-shot keyless chat/agent event diagnostic when the chat provider reconnects, so a still-broken gateway produces a visible warning again after reconnect instead of going silent. Add a regression test covering disconnect + reconnect notification behavior without exposing dropped payload content. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Codex review: needs maintainer review before merge. Reviewed June 2, 2026, 7:16 PM ET / 23:16 UTC. Summary Reproducibility: yes. from source: current master keeps the one-shot diagnostic flag set after the first keyless event, and the reconnect path does not reset it. A later keyless event after reconnect would therefore not raise the visible warning again. Review metrics: 1 noteworthy metric.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land the focused reconnect reset with its regression test after maintainer review, preserving the existing safety behavior of dropping keyless events instead of routing them into a synthetic timeline. Do we have a high-confidence way to reproduce the issue? Yes from source: current master keeps the one-shot diagnostic flag set after the first keyless event, and the reconnect path does not reset it. A later keyless event after reconnect would therefore not raise the visible warning again. Is this the best way to solve the issue? Yes; resetting the flag inside the existing justReconnected cleanup path is the narrow maintainable fix and keeps the current drop-rather-than-route safety property intact. AGENTS.md: found and applied where relevant. Codex review notes: model gpt-5.5, reasoning high; reviewed against bfeb3b5c90be. Label changesLabel changes:
Label justifications:
Evidence reviewedAcceptance criteria:
What I checked:
Likely related people:
What the crustacean ranks mean
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. How this review workflow works
|
Summary
maintimeline.Triage
Fix size: small, confidence >=95%. The scoped gap was that
_keylessEventDiagnosticRaisedsurvived reconnects, so users could lose the visible warning if a still-broken gateway emitted keyless events after reconnect.Validation
With
OPENCLAW_REPO_ROOTset to this worktree via short pathC:\ocw458:./build.ps1dotnet build ./tests/OpenClaw.Shared.Tests/OpenClaw.Shared.Tests.csprojdotnet build ./tests/OpenClaw.Tray.Tests/OpenClaw.Tray.Tests.csprojdotnet test ./tests/OpenClaw.Shared.Tests/OpenClaw.Shared.Tests.csproj --no-restoredotnet test ./tests/OpenClaw.Tray.Tests/OpenClaw.Tray.Tests.csproj --no-restoreNote: initial full build from the generated long worktree path failed in WinAppSDK PRI generation (
CommunityToolkit.WinUI.Controls.SettingsControls.pri.xmlmissing). Rerunning from a short junction path avoided that environment/path issue and passed.