test(firmware): guard the canceled-settle case against a persisted network config - #451
Conversation
|
/agentic_review |
PR Summary by QodoFix WiFi firmware update tests for prep power-on and recovery bridge-exit
AI Description
Diagram
High-Level Assessment
Files changed (1)
|
Code Review by Qodo🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)
Great, no issues found!Qodo reviewed your code and found no material issues that require reviewTo customize comments, go to the Qodo configuration screen, or learn more in the docs. |
|
Ready for review — not merging. Verified on the exact head Full suite green net9 + net10 — 2703 passed / 2 skipped each, plus 23 Mcp, 0 warnings. Test-only diff (28 insertions, 2 deletions, one file); no production code touched. Flagging priority again since it is easy to miss in a queue: main is red right now, and #443's failing build is inherited from it rather than caused by anything in #443. Once this lands, #443 should go green on a rerun without needing a change of its own. |
…twork config UpdateWifiModuleAsync_WhenCanceledDuringTransparentModeExitSettle_LeavesLanRestoreUnsent pins the whole recovery sequence with one Assert.Equal, which implies that LAN:ENAbled 1 and LAN:SAVE never go out — but only implies it. That expected list is the assertion in this file most likely to be rewritten: every change to the recovery sequence edits it, and whoever edits it is thinking about the commands being added, not the two that must never appear. State the guarantee separately so it survives those edits. A cancel that starts persisting a network configuration now fails on a line that says exactly that, instead of looking like one more expected-list update to wave through. Assertions only; no production change. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
b711eca to
6516912
Compare
Rescoped
This PR originally reconciled the WiFi prep/recovery expectations that #444 and #445 left crossed, which had
mainred. #456 landed that same reconciliation first, somainis green and that part of this PR became redundant — and conflicting.Rebased onto
mainand narrowed to the one thing #456 did not carry.What's left
UpdateWifiModuleAsync_WhenCanceledDuringTransparentModeExitSettle_LeavesLanRestoreUnsentpins the entire recovery sequence with a singleAssert.Equal. That already impliesLAN:ENAbled 1andLAN:SAVEnever go out — but only implies it.That expected list is the assertion in this file most likely to be rewritten: every change to the recovery sequence edits it, and whoever edits it is thinking about the commands they're adding, not the two that must never appear. The invariant — a canceled flash must never persist a network configuration — is load-bearing enough to say out loud:
Now a cancel that starts persisting config fails on a line that says exactly that, rather than looking like one more expected-list update to wave through.
Notes
ScpiMessageProducer.EnableNetworkLan/SaveNetworkLanemit, and match how the success-path tests in this same file spell them — so the guards are not vacuous.UpdateWifiModuleAsynctests green on net9.0 (24 passed).If you'd rather not carry the extra guard, closing this is reasonable — #456 already delivered the fix that made
maingreen.🤖 Generated with Claude Code