Skip to content

feat: unit-trend chart follow-ups from #338 - #347

Merged
Jammy2211 merged 2 commits into
mainfrom
feature/unit-trend-followups
Nov 14, 2026
Merged

Jammy2211 merged 2 commits into
mainfrom
feature/unit-trend-followups

Conversation

@Jammy2211

Copy link
Copy Markdown
Contributor

Summary

Follow-ups from the independent review of PyAutoHeart#339 (unit-test trend charts), issue #346.

  • Sub-second series fill the chart. plot() gains min_span (default 1, today's floor). unit_trend passes min_span=0, so a PyAutoNerves import chart spans the full height instead of 10–14% of it. Gate charts keep the default.
  • Epoch filter and plotted x agree. unit_history now applies the epoch to the run day it plots (at, falling back to date), not to the line's date. On the live record, PyAutoArray's 2026-10-26T17:32Z run carries date: 2026-10-27.
  • Label range matches the axis. The unit-trend label names the first and last measured days, which is what the axis draws (gaps=False).
  • Per-day point = median of the day's main runs. For wall_s and import_s, the median is taken over the day's cache-hit runs when there are any, otherwise over all its runs. tests is still the last run's count.
  • Gate charts pinned. tests/golden/gate_chart.html holds a gate chart (sub-second series, with a gap) rendered by the pre-change code, compared byte for byte.

API Changes

None. Internal only: heart.timing_display.plot gains a keyword min_span=1, and the default output is unchanged.

Test Plan

  • pytest tests -x: 1459 passed
  • Control tests. Each fix was reverted in turn and its new test fails: a global min_span=0 fails the golden test; the unit trend with floor 1 fails the fill-height test; the epoch filter on date fails the epoch test.
  • After the next daily heart-health run, look at the unit-trend charts on the live board. Item 6 of the prompt is post-merge and is left to the human.

Validation checklist (--auto run — plan was not pre-approved)

  • Effective level: supervised (header: supervised, cap: feature → supervised); batch launch 2026-11-14-pm
  • Plan: on the issue (feat: unit-trend chart follow-ups from PyAutoHeart#338 #346), written at start, unmodified since
  • Gate: tests 1459 passed · smoke n/a (Heart organ board render; no library or workspace script surface) · review independent Opus review CLEAN (claims: "gate charts keep the floor of 1, pinned byte-for-byte" basis-cited — golden test + independent render from origin/main matches; "only the unit-trend charts change" basis-cited — caller audit: chart and organism_total keep the default floor, organism_total reads only tests) · Heart dev-ship GREEN (readiness --dev --repos PyAutoHeart); shown, non-blocking: PyAutoLens 1 uncommitted source change; manifest drift ×2; PyAutoArray open PR 10d old; release validation no rehearsal (all in the brief's heart-ack) · adversary independent Sonnet adversary CLEAN — Witness holds on all three clauses (golden passes against base code; fill-height and epoch tests fail when each fix is reverted; real record: PyAutoNerves import charts span y 15–75)
  • Human: plan sound in hindsight?
  • Human: diff matches plan (no scope creep)?
  • Human: merge, amend, or reject — then log the outcome

Tier: glance. Merge mode: auto-merge on green if the Witness passes, with a post-merge summary.

Generated by the PyAutoLabs agent workflow.

🤖 Generated with Claude Code

- unit trends fill the chart height (min_span=0); gate charts keep the
  floor of 1, pinned byte-for-byte by a golden-HTML test
- unit_history applies the epoch to the plotted day (at, else date)
- unit-trend label's date range names the measured days the axis draws
- per-day point: median of the day's main runs (cache hits preferred)
  for wall_s/import_s; tests from the last run

Closes #346

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…firewall)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Jammy2211
Jammy2211 merged commit 3260cde into main Nov 14, 2026
2 checks passed
@Jammy2211
Jammy2211 deleted the feature/unit-trend-followups branch November 14, 2026 17:16
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.

1 participant