Repository navigation
feat: test-performance board — CI wall-clock + NO_RUN census (#163) - #164
Merged
Merged
Conversation
…census
The speed of development is the speed of the gates a change must pass, and
until now that number was only recoverable by hand-scraping job logs: every
timing diagnosis in the record started with an archaeology session. This adds
the Heart half of the test-performance board — two cloud-safe, API-only checks
and the two board rows they feed, published in board.json as an additive
`performance` block that the Brain board consumes verbatim.
heart/checks/ci_timing.{sh,py} — CI wall-clock per tracked gate:
* duration = updated_at - run_started_at, NEVER created_at (a re-attempted
run keeps its original creation stamp and otherwise reports multi-day
durations); runs with no run_started_at are skipped, not guessed at
* no branch filter and no exclude_pull_requests: the contributor-facing
number IS the PR gate, medianed separately as pr_median_s
* medians over success runs only, with the conclusion mix and the run count
recorded beside them — a gate must not look faster the more it breaks, and
a speed row without coverage rewards deleting coverage
* cancelled is disambiguated: a superseded PR run (a newer run of the same
workflow on the same branch) is benign and counted; a cancelled run on main
or with no successor is a kill/hang suspect and becomes an event, as is
every timed_out run
* drift needs BOTH gates — ratio >= yellow_factor AND delta >= min_delta_s —
the profiling conductor's doctrine: the ratio alone screams at jitter, the
absolute floor alone misses a big relative drift, and an alarm that cries
wolf gets ignored. Gates are ok/warn, never fail; readiness is untouched
* history is self-carrying: the aggregate step re-reads the previously
published board.json, drops today's entry, appends today, caps at 30 —
idempotent per date, and a publish gap costs a sparkline, never a render
* a failed fetch records its reason and no workflows: "we could not ask"
must never render as "all quiet"
heart/checks/no_run_census.{sh,py} — the census of skipped scripts:
* parsed line-based, never yaml.safe_load: the SLOW/NEEDS_FIX markers live
in the trailing # comments a YAML load discards, and a bare `- off` entry
parses as a YAML boolean (a recorded crash)
* a SLOW claim counts as measured only when its reason carries a real
seconds figure that is not a cap mention — "233.7s" is a measurement,
"flakes at the 1800s cap" is the limit it hit, which is exactly the
unmeasured claim the census exists to surface
* a repo with no no_run.yaml is present: false — honest data, not an error
Dashboard: two new rows (CI wall-clock, NO_RUN census), cloud-observed so
deliberately not local-only, each with the top rows, a per-gate sparkline of
its own history, and one-tap prompts; plus Board.performance, emitted in the
json surface as `performance` (schema v2 stays v2 — the block is additive).
Every actionable row inside it carries its own ready-to-paste prompt string:
the producer writes it, the renderer never re-derives it.
Config declares the surface (the tenant firewall): a `performance:` block for
the scheduled drivers timed beyond each group's required workflows, and
`thresholds.ci_timing`. heart-health.yml now runs all four cloud-safe checks.
73 new tests (573 total, green), stdlib + PyYAML only, fake repo names.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EoDPz2LevKeBaDwqFKtZrU
The firewall gate rejects any instance fact in a new organ-code file; the end-to-end sidecar test named a real library repo where LibA serves. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EoDPz2LevKeBaDwqFKtZrU
2 tasks done
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.
Closes #163. Phase 1 of the test-performance board (design record:
PyAutoMind/docs/pyautoheart/test_performance_board_assessment.md).Two new cloud-safe checks feeding a ⏱ performance surface on the Heart board, advisory only — the GREEN/STALE/YELLOW/RED readiness verdict and
badge.jsonshape are untouched.heart/checks/ci_timing.{sh,py}— CI wall-clock per tracked gate (each polled repo'srequired_workflows+performance.extra_workflows: Workspace Smoke, Nightly Release). Durations fromrun_started_at→updated_at(nevercreated_at), PR runs included (the contributor-facing number), success-only medians, queue delay, conclusion mix. Cancelled runs disambiguated: superseded-by-a-newer-same-branch PR run is benign; cancelled on main or successorless is a suspect hang event;timed_outis always an event — each event carries a ready-to-paste/bug kill timer: …prompt with its run URL. History is self-carrying: the aggregate pass re-reads the previously publishedboard.json, appends today's p50 per gate, dedupes by date, caps at 30 — no commits, a publish gap costs a sparkline, never a render.heart/checks/no_run_census.{sh,py}— contents-API census of every workspace'sconfig/build/no_run.yaml: SLOW / NEEDS_FIX / permanent tiers with marker dates and reasons; SLOW rows with no real seconds figure in their reason are flagged unmeasured (a bare "1800s cap" mention does not count); a missing file is recorded honestly aspresent: false; a bareoffentry parses as a name, not a YAML boolean.heart/dashboard.py— "CI wall-clock" and "NO_RUN census" sections (events → FAIL, drift → WARN, both advisory; sparklines from gate history) and an additiveperformanceblock inboard.json(schema v2 stays v2) — every actionable row carries its own prompt, theblockerscontract extended to timings. The sibling PyAutoBrain PR consumes it verbatim.config/repos.yaml—performance.extra_workflows+thresholds.ci_timing(yellow_factor: 1.5,min_delta_s: 120,history_cap: 30; drift flags only when ratio AND absolute floor both trip)..github/workflows/heart-health.yml— both checks join the daily cloud-safe step (deliberately not the <30s tick).Tests: 573 passed (+73 new: 34 ci_timing, 23 no_run_census, 16 dashboard) — stdlib+PyYAML, hermetic, fake repo names throughout.
🤖 Generated with Claude Code
https://claude.ai/code/session_01EoDPz2LevKeBaDwqFKtZrU
Generated by Claude Code