Skip to content

feat: clarify import, unit and CI timing cards #249

Closed

Description

@Jammy2211

Overview

Complete approved dashboard clarity PR C after #248. Make import, unit-suite and CI wall-clock information readable on mobile without hiding unavailable measurements or changing readiness or Brain's performance contract.

Plan

  • Make current durations prominent and label baselines, changes and coverage.
  • Separate baseline-building, unavailable measurements and measured regressions.
  • Show suite legs separately with their three slowest tests; disclose remaining details.
  • Give CI gates labelled median/max/count/window summaries and accessible charts.
  • Validate timing fixtures, existing consumers and responsive browser rendering.
Detailed implementation plan

Affected Repositories

  • PyAutoHeart (primary, organ using library workflow)

Branch Survey

PyAutoHeart: clean main at 7c59414; no outstanding worktree claim. PR B #248 merged, all commits proven ancestors of origin/main.

Suggested branch: feature/heart-dashboard-timings

Implementation Steps

  1. In heart/dashboard.py, replace dense timing detail HTML with structured duration/coverage cards and native disclosures; retain complete plain-text detail for CLI/JSON consumers.
  2. Correct import summary classification with explicit no-baseline/unavailable counts. Read existing import_time and unit_timings fields, never infer measurements from prose or missing values.
  3. Present each unit suite Python leg independently, with wall-clock and counts, three slowest tests by measured seconds and disclosed remaining tests. Label slow absolute duration separately from observed baseline regressions.
  4. Render CI distribution statistics and window before a labelled inline SVG derived from actual history; missing samples are gaps, never zero. Provide equivalent text. Preserve performance schema and gates[].spark.
  5. Add regression coverage in tests/test_dashboard_timings.py; run Heart and Brain consumer suites, inspect light/dark mobile/desktop and keyboard/zoom behavior. Use fixtures because local timing slices are empty.
  6. Ship an open PR after checks; merge remains human. Dispatch heart-health.yml after a later authorized merge.

Key Files

  • heart/dashboard.py — timing presentation and import summary
  • tests/test_dashboard_timings.py — presentation/state/contract regressions
  • docs/internals.md — timing display contract if useful

Authorization

The human approved the Fable-amended three-PR plan and explicitly requested "$prm and ddo C". Existing same-session Heart RED development-only override remains limited to this dashboard task; no release or merge of C is authorized. Entry feed: STALE, missing evidence; no new approval needed.

Original Prompt

Approved phase prompt # Heart clarity PR C: readable import, unit-test and CI timings

Type: feature
Target: PyAutoHeart
Difficulty: medium
Autonomy: human-required
Status: ready
Priority: medium

@PyAutoHeart. Parent intent, findings, design and the Fable review with its numbered amendments: heart_dashboard_clarity.md in this directory. Human approved the amended plan on 2026-09-30; PR B merged as #248; implementation is now unblocked.

Scope (parent detailed step 3, applicable step 5 validation):

  • Import timing: package, bold current seconds, labelled baseline/change, source and coverage; preserve unavailable/failed imports and baseline-building states. Fix the false green at heart/dashboard.py:774-781 (OK “0 imports within baseline” while 4 packages have no baseline and 1 is unavailable) with a regression test (amendment 6).
  • Unit timing: suite wall-clock, Python leg, counts, top three bottlenecks by default, rest under disclosure; never sum parallel legs; separate absolute slowness from measured regression.
  • CI: median, max, run count and window first; accessible labelled inline SVG with text fallback; keep performance.gates[].spark intact for the Brain; never present missing samples as zero.
  • Fixtures: the local snapshot has empty timing slices, so validate against the published board.json, a heart-health artifact or fixtures (amendment 10).

Preserve verdict/score, the performance block's own schema and the Brain/hygiene reads of performance. Dispatch heart-health.yml after merge.

Proposed branch feature/heart-dashboard-timings. Follow start-dev → start-library → ship-library. Implementation approved on 2026-09-30; existing dependency and shipping gates still apply.

Activity

  1. Jammy2211 commented on Sep 30, 2026

    @Jammy2211
    ContributorAuthor

    Summary

    Import, unit-test and CI timing rows now show readable cards with prominent seconds, explicit coverage and expandable details. Four imports building baselines plus one unavailable import no longer report a green “0 imports within baseline”.

    Suite Python legs remain separate, with the three slowest measured tests visible and remaining tests disclosed. CI cards lead with median, maximum, run count and date window; accessible daily charts retain missing-data gaps and offer equivalent text. Full identifiers and source observations remain available. Heart-local styling also prevents copy labels from truncating.

    Closes #249. Completes PR C of the approved, Fable-reviewed dashboard plan (A #246, B #248).

    API Changes

    None — internal presentation changes only. Readiness verdict/score/blockers and the existing performance schema, values and gates[].spark remain unchanged. Plain section detail wording is more explicit and no longer silently drops timing rows.

    Test Plan

    • Full Heart suite: 1099 passed; final display refinements: 147 targeted tests passed.
    • Brain board/hygiene/vitals consumers: 53 passed.
    • Four before/after fixture comparisons against main: performance, verdict, score and blockers identical.
    • Chromium light/dark at 375/390/1280px; 200% text; keyboard disclosures; all details expanded without horizontal overflow; copy labels and 44px targets.
    • In-session diff and visual review; external Fable plan review already completed. No independent implementation review claimed.
    • No scientific library API or workspace behavior changed; browser rendering and Brain consumer tests cover the downstream surface.
    • After human-authorized merge, dispatch heart-health.yml so Pages updates immediately.
    Full API Changes (for automation & release notes)

    Changed Behaviour

    • Internal dashboard timing presentation uses heart/timing_display.py and HTML-only Section.timing_html.
    • Import comparisons without baselines are informational; unavailable imports warn; real regressions retain their severity. A CI gate with no measured runs is informational.
    • Existing collectors, readiness computation and machine performance payload are unchanged. No consumer migration required.

    Heart development-only override

    Current authoritative Heart: RED, score 45, 2026-09-30T20:06:10.501884+00:00.
    Exact RED reason: release validation FAILED (stage integrate).

    The human approved the amended three-PR dashboard plan, explicitly authorized continuing with Heart RED (“yes go”), and requested “$prm and ddo C” in this same session. This authorizes development shipping of C only; it does not authorize its merge or any release. Passed branch gates are listed above. This PR does not claim to repair the integration failure.

    Current warnings: workspace validation has one timeout (autolens_test scripts/multi_dataset/rectangular.py); generated public front-door tables and workspace-checkout manifest each have one mismatch. These are separate from this dashboard implementation.

    Generated by the PyAutoLabs agent workflow.

  2. Jammy2211 commented on Sep 30, 2026

    @Jammy2211
    ContributorAuthor

    Implementation is ready in PR #250 at 984b1f6. Local tests and browser checks passed as recorded above. Both exact-head GitHub Python CI jobs were still running at the shipping check. Mind is awaiting merge; next step is human /prm, then dispatch heart-health.yml and close out. No scientific workspace migration applies.

  3. Jammy2211 commented on Sep 30, 2026

    @Jammy2211
    ContributorAuthor

    Shipped in #250, merged as 46d267f. Exact-head run 36770498391 passed both Python 3.12/3.13 jobs and every step. Local validation: 1099 Heart tests, 147 final display tests, 53 Brain consumer tests and responsive browser checks. All three approved dashboard phases are merged. Dashboard publication dispatched; the existing release integration failure is not repaired by this presentation work.

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