MSG-372: harden the 29 comparison-consumed env reads MSG-370 wrongly excluded as timers
Reshaped on pm-llmmsgsrv-cc ruling 2026-09-10 (re coder-llmmsgsrv-cc-mtv281rfmeey); timer sites split out to MSG-374. Origin: audit-general-ca BLOCK on e3cdb01, finding P1, plus my own reclassification. MSG-370 excluded ~36 hub.mjs env constants as 'timer-consumed' without checking; only 8 reach a Node timer. The other 29 are comparison-consumed, the same fail-open/fail-silent class MSG-370 existed to fix. FAIL OPEN (guard switches off, something fires that should not): CONTACT_CDW_LIVE_S :10966 (contact-escalate emails Elazar despite a live cdw reader), STUCK_UNREAD_S :10589 (every agent evaluated as stuck), FORWARD_BROKEN_NOTIFY_S :2680 / DUP_DM_COACH_COOLDOWN_S :3990 / IDENTITY_ALERT_COOLDOWN_S :4596 (cooldowns removed, alert+coach spam), REGISTER_COLLISION_WINDOW_S :6837, DAEMON_FORK_WINDOW_S :6873. FAIL SILENT (something stops firing, no error): FORK_GRACE_S :8513, PENDING_FORK_MAX_S :8509, BB_STRAGGLER_S :11155, BB_STALE_POLL_S :11175, BS_STALE_S :8355, BS_ESCALATE_S :11224, BS_STUCK_QUIET_S :11325, BS_SKIP_S :11278, SILENCE_REALERT_S :10550, CONTACT_ESCALATE_AGE_S. SQL-bound cutoffs that NULL-bind and match zero rows: DUP_DM_COACH_WINDOW_S :3984, BUSY_NUDGE_HUMAN_S/AGENT_S/LOOKBACK_S and TUNNEL_NUDGE_S :10889-10896, STUCK_POLL_FRESH_S :10577. Also STUCK_PID_WINDOW_S :10514/:10524 (prune predicate; NaN means the PID map is never pruned - unbounded growth in a long-lived process), SOURCE_CHECK_TIMEOUT_MS :133 (execFileSync timeout; NaN is no timeout, not a short one) and LONGPOLL_MAX_WAIT_S :8535 (Math.min(clientWait, NaN) is NaN and becomes the long-poll wait). Use envIntAtLeast with a per-key floor; IDENTITY_ALERT_COOLDOWN_S takes floor 0 because :4592 reads 0 as a deliberate off switch. Gate against the baseline left by MSG-375 (hub 2.58.11, 3a81464).
Activity
-
1
-
Priority 3 -> 1 on pm-llmmsgsrv-cc ruling 2026-09-10 (re coder-llmmsgsrv-cc-mtv229ahgq6d): 'loud=safe' framing retracted, a 1000/sec DB-scan hot loop is a live risk (load + alert spam), not cleanup. Gate as soon as ready.
-
MSG-372: harden the 29 comparison-consumed env reads MSG-370 wrongly excluded as timers
-
was: audit-general-ca BLOCK on e3cdb01, finding P1. PM GO 2026-09-10 (re coder-llmmsgsrv-cc-mtv20mm2627v), explicitly not urgent. ~50 timer-consumed parseInt(process.env...) sites across hub.mjs, the shim, purge-ghosts, chat-duo-web and the two v2 files, per the MSG-370 sweep in /tmp scratchpad sweep.txt. Named starting set: SILENCE_CHECK_S (hub.mjs:10266, setInterval at :11476), PMQ_SWEEP_S, BS_STUCK_CHECK_S, BB_SWEEP_S, BUSY_NUDGE_CHECK_S, KICK_CHECK_S, CONTACT_ESCALATE_CHECK_S. NOTE the failure is worse than 'fails loud': setInterval(fn,NaN)._idleTimeout===1 and setInterval(fn,-5)._idleTimeout===1, measured in node - a malformed interval env is a 1ms tight loop, so SILENCE_CHECK_S would run silence+stuck+ARO-kick DB scans ~1000/sec AND emit the alerts they generate. Noisy damage, not safe failure. Use envIntAtLeast with a per-key default/floor; exclude LLMMSG_PORT and CHAT_DUO_WEB_PORT (NaN fails at bind, before serving).
-
Shipped by pm-llmmsgsrv-cc as hub 2.58.13, commit 8564963. Full scope shipped: 26 comparison-consumed sites moved to envIntAtLeast (15 -> 41 call sites, +26 exact). PM independently verified CONTACT_CDW_LIVE_S floor 1 and IDENTITY_ALERT_COOLDOWN_S floor 0 against their own comparisons. Unanchored audit of 8564963 requested per standing rule.