Follow-up from PR #3911 (issue #3767). Non-blocking simplification concern raised by the correctness reviewer; reviewer APPROVEd rather than requesting changes, so filing as backlog.
Concern
crates/app/src/app/mod.rs — the pre-abort threshold derivation (abort_threshold_secs * 3 / 4).max(1) (0.75x floored at 1, 0 when disabled) is duplicated in two places:
WatchdogSnapshot::pre_abort_threshold_secs() (method)
emit_watchdog_started_line() (free fn, boot-diagnostics line)
Both are documented as needing to stay in sync and both are test-pinned (the boot-line test asserts pre=90 for abort=120), so there is no current drift. Extracting a single shared const fn (e.g. derive_pre_abort_threshold(abort: u64) -> u64) called from both sites would remove the drift risk entirely.
Severity
Low / non-blocking — maintainability nit, no behavioral defect.
Follow-up from PR #3911 (issue #3767). Non-blocking simplification concern raised by the correctness reviewer; reviewer APPROVEd rather than requesting changes, so filing as backlog.
Concern
crates/app/src/app/mod.rs— the pre-abort threshold derivation(abort_threshold_secs * 3 / 4).max(1)(0.75x floored at 1, 0 when disabled) is duplicated in two places:WatchdogSnapshot::pre_abort_threshold_secs()(method)emit_watchdog_started_line()(free fn, boot-diagnostics line)Both are documented as needing to stay in sync and both are test-pinned (the boot-line test asserts pre=90 for abort=120), so there is no current drift. Extracting a single shared
const fn(e.g.derive_pre_abort_threshold(abort: u64) -> u64) called from both sites would remove the drift risk entirely.Severity
Low / non-blocking — maintainability nit, no behavioral defect.