mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-07 04:12:04 +00:00
The nightly measurements check reported its bloat factor, a ratio such as 1.3, as a job fact. A fact is a non-negative whole number, so the outcome validation refused it on every run, after the vacuum and the reindex had already done their work, and the run failed. It now reports bloat_percent (130), and the duration goes through the same rounding. A malformed fact no longer fails a run whose work is done: runJob drops it from the result and emits job.outcome.fact_invalid at error level with the queue and the key, where failing would have made pg-boss retry finished work. A failed outcome is unchanged. wholeFact and percentFact are the intended way to report a measured value or a ratio, and a guard reads every outcome producer and refuses a fact that is a division or names a ratio unless it is rounded on purpose. The other producers were checked: their numeric facts are counts and integer millisecond durations. Refs #1271