[Repo Assist] test(connection): add missing DeriveOverall edge-case coverage#595
Conversation
Add 6 new [InlineData] entries to the existing DeriveOverall_ReturnsCorrectState theory in ConnectionStateMachineTests.cs that were not previously covered: - Connected + Error/PairingRejected/RateLimited + nodeEnabled=false → Ready (node errors are suppressed when node mode is disabled; was only tested for nodeEnabled=true) - Connected + Connecting + nodeEnabled=false → Ready (node-connecting state is ignored when node is disabled) - Connected + Idle + nodeEnabled=true → Connected (fallthrough case: operator is connected, node not yet started — real startup state, reached the last "if (op == Connected) return Connected" branch) - Connected + PairingRequired + nodeEnabled=false → PairingRequired (node pairing requirement surfaces regardless of nodeEnabled) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Codex review: needs maintainer review before merge. Reviewed May 29, 2026, 9:37 PM ET / 01:37 UTC. Summary Reproducibility: not applicable. as a bug reproduction. Source inspection shows the current DeriveOverall branches are reachable, and the PR adds targeted theory rows for cases missing from current main. Review metrics: 2 noteworthy metrics.
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 test coverage after required repo validation confirms the PR head has no new failures. Do we have a high-confidence way to reproduce the issue? Not applicable as a bug reproduction. Source inspection shows the current DeriveOverall branches are reachable, and the PR adds targeted theory rows for cases missing from current main. Is this the best way to solve the issue? Yes. Extending the existing theory with the missing rows is the narrowest maintainable way to cover these edge cases without changing runtime behavior. AGENTS.md: found and applied where relevant. Codex review notes: model gpt-5.5, reasoning high; reviewed against f52b829a6f3c. Label changesLabel 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
|
🤖 This is an automated PR from Repo Assist.
Summary
Adds 6 missing
[InlineData]cases to theDeriveOverall_ReturnsCorrectStatetheory inConnectionStateMachineTests.cs. These cases exercise branches inGatewayConnectionSnapshot.DeriveOverallthat are reachable in production but were not previously covered.Missing cases filled
falsefalsefalsefalsetruefalsenodeEnabledThe most significant gap was
Connected + Idle + nodeEnabled=true → Connected— this is the real state during startup (operator handshake done, node not yet initiated) and hit the last fallthrough branch without test coverage.Test Status
All 268 Connection tests pass:
(8 pre-existing Windows-specific failures in
OpenClaw.Shared.Tests— unrelated to this change, reproducible on main before this PR.)