Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #28 +/- ##
==========================================
+ Coverage 95.25% 97.08% +1.82%
==========================================
Files 6 6
Lines 274 274
==========================================
+ Hits 261 266 +5
+ Misses 8 4 -4
+ Partials 5 4 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
|
Overall Grade |
Security Reliability Complexity Hygiene |
Code Review Summary
| Analyzer | Status | Updated (UTC) | Details |
|---|---|---|---|
| Go | Jul 1, 2026 11:40a.m. | Review ↗ |
Important
AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.
- Update import path to resty.dev/v3 - Rename resp.IsError() → IsStatusFailure(), IsSuccess() → IsStatusSuccess() - Replace removed resp.Body() with resp.Bytes() - Add Close() error to Gateway interface and GatewayCommon - Add SetRetryAllowNonIdempotent(true) to preserve POST retry behaviour - Move Nokia SID cookie from client-level to per-request injection, since v3 has no ClearCookies() API; update tests accordingly - Update BaseURL field access to BaseURL() method call Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Reboot() called Login() before checking config.DryRun, so dry-run mode still performed a real authentication round-trip against the gateway in both ArcadyanGateway and NokiaGateway.
Status() wrapped a failed registration-status GET in ErrSignalFailed, copy-pasted from Signal(). A caller checking errors.Is(err, ErrSignalFailed) to detect a real Signal() failure got a false positive from Status().
NewGatewayCommon dereferenced cfg.Host with no nil check, so NewArcadyanGateway(nil)/NewNokiaGateway(nil) crashed with an opaque nil-pointer dereference instead of a clear, attributable error.
ArcadyanGateway.Reboot() and NokiaGateway.Reboot() duplicated the entire login/dry-run/POST/401-403-logout/success-logout control flow verbatim, letting bugs (like the DryRun-after-Login issue) drift between the two copies. Extract a shared performReboot() on GatewayCommon, driven by a small authSession interface that both vendors' existing logout() methods already satisfy, and have each vendor supply only its login call and reboot request. Unifies the previously divergent "reboot request failed" vs. "error sending reboot request" error text between vendors.
….go builders nokiaConfig(), nokiaTestGw(), and nokiaTestGwClosed() reimplemented testConfig()/testCommon() and the closed-server GatewayCommon builder already used by Arcadyan's tests. Extract newClosedServerCommon() in gateway_test.go and have both arcadyan_test.go and nokia_test.go call it, and have nokiaTestGw() reuse testCommon() instead of manually constructing a resty client.
Add cases for GatewayCommon.Close(), Arcadyan Status()'s network-error branch, and Request()'s invalid-JSON branch (all previously uncovered). Rename Test_LoginSuccess/Test_LoginFailure to TestNokiaLoginResp_HasCredentials as a table-driven test, since they exercised nokiaLoginResp.hasCredentials(), not a login flow.
|



since v3 has no ClearCookies() API; update tests accordingly
Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com