Conversation
spec coverage
standards conformancestandards check: not applicable — correctness issuesnone found. Verified specifically:
test coverage gapscoverage is adequate. The new tests assert exact refusal wording ( scope issuesnone. Files touched match the architect's manifest exactly ( verdictapprove rig verification requiredno |
codex qa — PR #439 at 1bb778dverdict: fail findings[severity: major] [confidence: high]
gateClaude QA workspace gate: inherited at current tip unaddressed open questionsnone scopenone |
|
Revision pushed at Design check: I revised against the architect decision updated 2026-09-03 04:06 UTC on #425. There is no architect or UX comment newer than the prior branch tip ( QA finding accepted. The existing corrupt-monitor protocol regression now follows the refusal with Verification:
No review point is disputed. |
mkovero
left a comment
There was a problem hiding this comment.
Re-review. Commit range reviewed: 1bb778db9525cfaab41200b1f136c88252f523fe..a611241d4fead17dbec5347770c58dce75508a73 (prior approval was at 1bb778db; new tip is a611241d, "fix: keep refused monitor inactive"). Prior full review stands for everything not discussed below — not re-litigated.
prior points — status
- All 4 spec-coverage criteria (refuse-on-corrupt, no uncalibrated substitution, no blank-overwrite, regression coverage across 5 families): still hold. Delta only touches
monitor_spectrum's internal ordering and adds one assertion block to the existing monitor test; none of the four criteria regress. - Monitor per-channel ordering (
channel_cals/channels_worker/in_ports_workerzip): unaffected by this delta — the reorder moves themonitor_paramswrite, not the channel/cal vectors. cargo test --workspace/clippy -D warnings/fmt --check: re-ran clean ata611241d(below).
delta review (1bb778db..a611241d)
Bug this commit fixes was real and outside what the prior pass checked: monitor_spectrum set state.monitor_params.active = true before resolving channels/ports and before the per-channel load_calibration_or_refuse loop. A corrupt-calibration refusal returned early with ok: false, but the daemon was left believing a monitor was active — set_monitor_params would then report success against a worker that was never spawned, and (per admin.rs:427) a second monitor request wouldn't be classified correctly either, since active was already true. This is exactly the kind of latent state corruption #425's fix was supposed to eliminate, just in the one handler that mutates shared state before its calibration guard.
Fix moves the monitor_params write (and monitor_params_shared clone) to after the channel_cals loop, so active is only ever set true once the worker is guaranteed to spawn. Read the reordered function in full (monitor/mod.rs:63-173) — confirmed monitor_params_shared has no other read/write site between the old and new position (only reads are inside the worker closure at lines 311 and 845, spawned after line 173), so the reorder has no other collateral effect within this function.
New test appended to corrupt_cal_refuses_monitor_and_preserves_store: after the refused monitor_spectrum call, it calls set_monitor_params and asserts ok: false / error: "no active monitor". This is reachable against the named defect — pre-fix, active would have been left true and this assertion would have failed (ok: true with echoed params). Traced "no active monitor" to its one production site (admin.rs:427) and to the pre-existing ZMQ.md:1332 doc line — unchanged by this PR, so no wire-schema delta here.
No files outside monitor/mod.rs and corrupt_cal.rs touched by this delta.
standards conformance
standards check: not applicable — delta is internal daemon state-ordering (active flag timing) and a protocol-level regression assertion, not a measurement value, output format, or display unit. Same routing as the first pass; nothing in this delta changes that.
correctness issues
none found.
test coverage gaps
coverage is adequate for the delta. One nit, not blocking: the new assertions live inside the corrupt-calibration test file, which is a reasonable place to prove the fix given the fix is one line away from the calibration-guard reorder, but the stale-active bug is reachable via other early-return paths in monitor_spectrum too (e.g. the interval/fft_n validation at lines 97-102 — those already run before the monitor_params write both before and after this delta, so they were never affected, but it's worth a developer note that this class of bug is "any early return after the write" rather than "this one guard" if more pre-spawn checks are added later). Not requesting a test for it now — no such guard exists after the write today.
suggested test additions
none — existing addition is sufficient for the defect it names.
scope issues
none.
verdict
approve
Delta fixes a genuine stale-active-flag bug left over from the ordering the first pass didn't check (the write predated calibration resolution), the new assertion is reachable against the defect and would have failed pre-fix, and the full workspace gate (cargo test --workspace, cargo clippy --workspace -- -D warnings, cargo fmt --check) is clean at a611241d.
sent back to
no
rig verification required
no
|
Claude QA approval predates commit |
codex qa — PR #439 at a611241verdict: pass gateClaude QA workspace gate: inherited at current tip unaddressed open questionsnone scopenone |
# Conflicts: # ac-rs/crates/ac-daemon/src/handlers/audio/monitor/mod.rs # ac-rs/crates/ac-daemon/src/handlers/audio/plot.rs # ac-rs/crates/ac-daemon/src/handlers/test_dut.rs # ac-rs/crates/ac-daemon/src/handlers/test_hw.rs # ac-rs/crates/ac-daemon/src/handlers/transfer/plan.rs
qa — PR #439 at 14d5e44Re-review. Commit range read for this pass: Note on the range boundary: my prior spec coverage
standards conformancestandards check: not applicable — correctness issuesnone found in the delta. Verified specifically:
test coverage gapscoverage is adequate for the delta. scope issuesnone against #425 itself. The 44-file / 852-line-removed delta is dominated by a merge of verdictapprove rig verification requiredno |
closes #425
what changed
Calibration reads now happen synchronously before workers spawn, and a shared formatter returns the operator-facing refusal without converting read failures into missing calibration. Monitor receives preloaded per-channel calibration, transfer propagates the same failure across all requested pairs, and save-only preservation rationale remains attached to writes.
Regression coverage drives every affected command family against corrupt calibration data, covers all three plot entry points plus an unreadable regular file, and verifies the original store bytes remain unchanged.
files touched
ac-rs/crates/ac-core/src/shared/calibration/store.rs— separate read error context from the save-specific preservation refusalac-rs/crates/ac-daemon/src/handlers/mod.rs— add the shared calibration load/refusal formatter and handler guardac-rs/crates/ac-daemon/src/handlers/audio/plot.rs— hoist plot, plot-level, and plot-IR calibration reads before worker creationac-rs/crates/ac-daemon/src/handlers/audio/monitor/mod.rs— preload every monitored channel calibration before worker creationac-rs/crates/ac-daemon/src/handlers/audio/monitor/channel.rs— accept preloaded calibration when constructing channel stateac-rs/crates/ac-daemon/src/handlers/test_dut.rs— refuse corrupt calibration before the DUT worker startsac-rs/crates/ac-daemon/src/handlers/test_hw.rs— use one pre-spawn calibration read for both normal and DMM testsac-rs/crates/ac-daemon/src/handlers/transfer/plan.rs— propagate calibration read failures while resolving the synchronous session planac-rs/crates/ac-daemon/tests/it_protocol/main.rs— register corrupt-calibration protocol regressionsac-rs/crates/ac-daemon/tests/it_protocol/corrupt_cal.rs— cover plot, monitor, transfer, DUT, hardware, unreadable input, and byte preservationac-rs/ZMQ.md— document synchronous calibration-store refusal behaviortest output
ZMQ schema changed
no
new dependencies
none
related
none
open questions for reviewer
none