mirror of
https://github.com/mikecarper/MeshCore.git
synced 2026-09-26 15:17:54 +00:00
Codex review of the previous commit found two real problems. The routes go live in startLanMode()/startSetupMode(), one tick before probeBoardCommands() first runs, so a status request can land in between. That made _board_cmds a genuine cross-task race despite the comment claiming otherwise, and — worse — let /api/status answer "no board commands" before the board had been asked. The page reads status once, so a browser that loaded in that window hid working FEM controls for the whole session. The probe result is now published and read under _mux, and /api/status OMITS board_cmds until the probe has run, which is not the same as reporting an empty list. The page treats the absent field as "not known yet" and re-polls with backoff; the audit waits for it the same way, rather than auditing a board it only half knows. Probing from the start path instead would close the window, but Callbacks::execCommand is documented as loop-task-only and `start webconfig` is itself mid-handleCommand, so that trades a race for re-entrancy. The audit never executed fan.lo or fan.hi, which have no getter and so no round-trip: they were only ever matched as strings. They now run for real, including the four rejection paths, and the mock grew --probe-delay so the retry path is exercised rather than assumed.