Skip to content

fix: use robust comparable-run unit timing baselines #304

Closed

Description

@Jammy2211

Overview

fix: use robust comparable-run unit timing baselines

Plan

Read the committed timing record and comparable run/cache/Python cohorts. Replace single-observation test baselines with a rolling median and normalize with a robust suite run-speed factor when enough shared tests exist. Preserve raw measurements, unchanged 1.5x/3x thresholds, and expose sample counts/factor. Replay recorded PyAutoFit data and synthetic isolated 4x/common-mode slowdowns.

Tier: glance — merge mode: human /prm; stop at PR review.

Detailed implementation and validation

Primary repo PyAutoHeart, clean main at 2919e9e; no other-session active claim or open PR. Branch feature/unit-timing-robust-baseline. One task per PR; this four-task request is coordinated sequentially in isolated worktrees by the same session. Heart published 2026-10-17T09:00:24Z: STALE, release validation stale: source moved since rehearsal (PyAutoFit, PyAutoGalaxy, PyAutoLens). Run focused tests and applicable Heart suite. No release or merge is authorized.

Authorization

User requested four linked dashboard tasks on 2026-10-17.

Original prompt

Heart unit-timing regression detector: rolling-median baseline and run-speed normalisation (false 3× NSS / EP flags)

Type: bug
Target: pyautoheart
Repos:

  • PyAutoHeart
    Difficulty: medium
    Autonomy: supervised
    Priority: medium
    Status: formalised
    Consequence: glance
    Witness: Replaying timings/unit/PyAutoFit.jsonl through the detector no longer flags test_nss_fit_with_assertions_runs_under_jit (5.45 s vs its ~6 s median) nor the 10-16 3.12 graphical/EP set, while a synthetic 4× slowdown of one test in an otherwise-normal run is still flagged red. Thresholds (1.5× / 3×) unchanged.
    Filed: 2026-10-16

Finding (health session 2026-10-16, read-only diagnosis)

The 3.56× "regression" compares against a single fast-runner sample: the NSS test (added 10-08, aeadaae48) ran 7.29/6.24/6.97/6.15/5.65/6.37/4.86 s; the 1.532 s baseline appears once (10-15 3.13, 9c78451e). Locally it takes 5.7–6.1 s. Graphical/EP tests move together ~2.1× with the runner (10-15 vs 10-16 3.12; same jax 0.11.2/blackjax 1.7.1/numpy 2.5.4, same runner image) — runner noise, no code or dependency change.

Proposed fix

Baseline = rolling median over the last N comparable runs (not latest/fastest single run), and normalise each test by a run-speed factor (e.g. median ratio across the suite, or a fixed reference test) before applying the unchanged 1.5×/3× thresholds. This is a detector correctness fix, not a threshold change.

Activity

  1. Jammy2211 commented on Oct 17, 2026

    @Jammy2211
    ContributorAuthor

    Implementation ready for review: #308

    Validation, exact changes and limitations are in the PR. Mind active.md records the branch/head and next step. Stop at human /prm; no merge or release performed.

  2. Jammy2211 commented on Oct 17, 2026

    @Jammy2211
    ContributorAuthor

    Shipped

    PR #308 merged on 2026-10-17 following the user's /prm. Both Python 3.12 and 3.13 Heart Tests jobs passed on the exact shipped head, with no skipped test legs. Git ancestry confirms the head is in main. Scope and validation details are in the PR. Mind completion and dashboard close-out are being recorded. This is a development merge, not a release-readiness claim.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions