Skip to content

fix(unit_timings): monitoring tiers only rows the both-gates policy calls drift - #349

Merged
Jammy2211 merged 1 commit into
mainfrom
claude/pyautolabs-health-review-oja0ir
Nov 15, 2026
Merged

Jammy2211 merged 1 commit into
mainfrom
claude/pyautolabs-health-review-oja0ir

Conversation

@Jammy2211

Copy link
Copy Markdown
Contributor

Summary

legacy_summaries() sorted unit-test rows into red/yellow by ratio alone (3× / 1.5×), ignoring the configured both-gates policy (thresholds.unit_timings: slow_factor: 2.0 AND min_delta_s: 2) that each row's own state already applies. On 2026-11-15 that made monitoring RED for PyAutoNerves test_config (0.015 s → 0.043 s; measured locally CI-style at 15 ms before PyAutoNerves#212 and 5 ms after it and on main) and yellow for PyAutoArray JAX tests whose raw CI times sit inside their historical bimodal range. Every one of those rows' own state was ok.

Human ruling: option A in PyAutoMind draft/bug/pyautoheart/unit_timing_monitoring_ignores_min_delta.md.

API Changes

  • heart/checks/unit_timings.legacy_summaries: a row whose state is not warn is green, whatever its ratio. The LEGACY_RED_FACTOR (3×) still splits warn rows into red; other warn rows are yellow.
  • No threshold, factor, weight or config change. The section wording "(>3× baseline)" / "(>1.5×)" stays true (a warn row is ≥ 2×).
  • Not addressed here (separate decision in the same prompt): the single median run_speed_factor still normalises compile-bound JAX tests with numpy/numba ones.

Test Plan

  • 3 new tests in tests/test_unit_timings.py (3.3× under the 2 s floor → green; 1.55× / +5.6 s → green; both gates passed → red). All three fail on the old code.
  • Full suite: 1466 passed
  • After merge: the next Heart Health publish drops unit_test_timing:coverage RED and the 2026-11-15 per-test red/yellow findings (their rows are all ok)
Full API Changes (for automation & release notes)

Changed

  • heart.checks.unit_timings.legacy_summaries — red/yellow tiers now require the row's own both-gates state == "warn"

Generated by the PyAutoLabs agent workflow.


Generated by Claude Code

…alls drift

legacy_summaries() sorted unit-test rows into red/yellow by ratio alone
(3x / 1.5x), ignoring the configured both-gates policy
(thresholds.unit_timings: slow_factor 2.0 AND min_delta_s 2) that each
row's own `state` already applies. On 2026-11-15 that made monitoring
RED for PyAutoNerves test_config, 0.015 s -> 0.043 s (measured locally
at 5 ms on main), and yellow for PyAutoArray JAX tests whose raw CI
times sat inside their historical range; every one of those rows said
`ok`.

A row the policy calls `ok` is now green, whatever its ratio; the 3x /
1.5x factors only tier rows already in `warn`. No threshold, factor or
weight changes; the human ruling (option A) is recorded in
PyAutoMind draft/bug/pyautoheart/unit_timing_monitoring_ignores_min_delta.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016nhQ8RkwYK9RzapmsQRGCj
@Jammy2211
Jammy2211 merged commit 58575f0 into main Nov 15, 2026
2 checks passed
@Jammy2211
Jammy2211 deleted the claude/pyautolabs-health-review-oja0ir branch November 15, 2026 23:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants