Repository navigation
fix(unit_timings): monitoring tiers only rows the both-gates policy calls drift - #349
Merged
Merged
Conversation
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.0ANDmin_delta_s: 2) that each row's ownstatealready applies. On 2026-11-15 that made monitoring RED for PyAutoNervestest_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' ownstatewasok.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 whosestateis notwarnis green, whatever its ratio. TheLEGACY_RED_FACTOR(3×) still splitswarnrows into red; otherwarnrows are yellow.warnrow is ≥ 2×).run_speed_factorstill normalises compile-bound JAX tests with numpy/numba ones.Test Plan
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.unit_test_timing:coverageRED and the 2026-11-15 per-test red/yellow findings (their rows are allok)Full API Changes (for automation & release notes)
Changed
heart.checks.unit_timings.legacy_summaries— red/yellow tiers now require the row's own both-gatesstate == "warn"Generated by the PyAutoLabs agent workflow.
Generated by Claude Code