[Repo Assist] test(connection): add OperatorScopeHelper and ChatNavigationReadiness tests#530
Conversation
… tests 17 new tests covering: - OperatorScopeHelper.CanApproveDevices: empty list, operator.admin/operator.pairing (case-insensitive), non-approval scopes, mixed scope lists - ChatNavigationReadiness.IsOperatorHandshakeReady: null manager, connected, not-connected - ChatNavigationReadiness.WaitForOperatorHandshakeAsync: already connected, null manager, timeout, state-event-driven success, cancellation token These helpers are used in GatewayConnectionManager and ConnectionPage for pairing-approval gating but had no dedicated unit tests. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Codex review: needs changes before merge. Latest ClawSweeper review: 2026-05-24 01:41 UTC / May 23, 2026, 9:41 PM ET. Workflow note: Future ClawSweeper reviews update this same comment in place. How this review workflow works
Summary Reproducibility: yes. for the patch defect by source inspection: the added private PR rating Rank-up moves:
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. Real behavior proof Risk before merge
Maintainer options:
Next step before merge Security Review findings
Review detailsBest possible solution: Keep the added coverage, remove the unused stub state, then validate the focused connection tests and the repository-required build/shared/tray checks. Do we have a high-confidence way to reproduce the issue? Yes for the patch defect by source inspection: the added private Is this the best way to solve the issue? No as submitted; the coverage target is appropriate, but the stub should avoid unused state before the PR can merge cleanly. Label changes:
Label justifications:
Full review comments:
Overall correctness: patch is incorrect Acceptance criteria:
What I checked:
Likely related people:
Codex review notes: model gpt-5.5, reasoning high; reviewed against ef6ac8acbab2. |
|
ClawSweeper PR egg 🔥 Warming up: real-behavior proof passed; findings, security review, or rank-up moves are still in progress. Hatch commandComment Hatchability rules:
What is this egg doing here?
|
🤖 This is an automated PR from Repo Assist.
What
Adds 17 unit tests in
OpenClaw.Connection.Testsfor two untested helpers:OperatorScopeHelper.CanApproveDevicesfalseoperator.adminandoperator.pairingaccepted (both spellings, all cases)operator.read,admin,pairing, etc.)truefalseChatNavigationReadiness.IsOperatorHandshakeReady+WaitForOperatorHandshakeAsynctrue(opt-out semantics)Connectedstate → ready; all other states → not readyWaitForresolves immediatelyfalsetrueOperationCanceledExceptionWhy
OperatorScopeHelper.CanApproveDevicesgates device-pairing approval inGatewayConnectionManagerandConnectionPagebut had no dedicated tests. The case-insensitive scope matching is security-relevant (a scope string comparison error could allow or block pairing unexpectedly).ChatNavigationReadinessis similarly used before routing to chat and had no test coverage for edge cases like cancellation.Test Status