Files
portal/tools
Дмитрий 25de9b8b26 fix(night-budget): stale-measure reason no longer prints the same calendar day twice
budgetState's "замер устарел" reason compared measurement time and
budget-renewal time at day-only precision (dayOfSafe). For five_hour
windows this made the two dates print identically even though the
underlying instants differ, producing a nonsensical owner-facing
message ("measured on 2026-08-03, renewed on 2026-08-03").

Fix: moskovskoeVremya now also returns minute (same Intl call, single
source of Moscow time, no second implementation). New slovoMomenta()
prints hour:minute only when the two compared moments fall on the same
calendar day (data-driven rule, not a per-window-kind special case) —
seven_day* windows stay day-only since their days normally differ.

Added a class-wide sensor: budget.test.mjs now scans every
budgetState reason an owner actually sees (gates.mjs / cli.mjs consume
it directly) for two named quantities colliding verbatim, across all
five rate-limit kinds and day-boundary edge cases. Verified red before
the fix (both dates rendered "2026-08-03"), green after.

tools/night/budget.mjs tools/night/budget.test.mjs
2026-08-03 11:37:00 +03:00
..
2026-06-17 08:03:35 +03:00
2026-06-17 08:03:35 +03:00