Some checks failed
Build and Test / build (debug, clang) (push) Has been cancelled
Build and Test / build (debug, gcc) (push) Has been cancelled
Build and Test / build (release, clang) (push) Has been cancelled
Build and Test / build (release, gcc) (push) Has been cancelled
Build and Test / macos (push) Has been cancelled
Build and Test / docker (push) Has been cancelled
The shadow scorer's rarity model started empty at every daemon start, so each restart cost an hour of warm-up with no decisions. The daemon now saves it to model_dir/rarity.state (checksummed, atomic write, hourly and at stop) and restores it at start. A restored state younger than the 7-day half-life skips the warm-up; decay catches up on the first event. A file made with other rarity settings, a bad checksum, or a negative or non-finite count is refused with a reason (status model.rarity_state, doctor model.rarity_state) and the model starts empty. The file must be owned by the daemon user and not group/world writable, like model files. Also fixes status model.warmup_windows, which was never filled in. Tests: R1/R2 in test_learn (round trip, decay clock, refusals), S8 in test_shadow (warm-up skipped only when recent), daemon restart restores the saved state, doctor warning; new fuzz_rarity_state target. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
516 B
516 B