Repository navigation
Description
Overview
With phases 1–3 live (#203 per-script smoke timings, #205 the permanent timings/ record, #207 unit-test + import timings by ingestion), the board's first full timing round is the legacy reference: the epic's later phases (the _test physical+fast rebuilds, CI caches) will change script content, datasets, pinned likelihoods and compile behaviour, so this round is not the start of the long-term history — it is the pre-rebuild record the rebuilds are measured against. This task (a) gives the record the labeled epoch boundary the phase-2 README reserved (timings/epochs.jsonl), so post-rebuild drift never fires against pre-rebuild baselines, (b) verifies the first live round reports for every repo, and (c) writes the short digest of where the time currently goes — the input evidence for phases 5, 6, 8 and 9.
Phase 4 of the ci-timing-fast-tests epic (PyAutoMind/draft/feature/pyautoheart/ci_timing_fast_tests_epic.md). The first live heart-health.yml run after #207 was dispatched by hand on 2026-09-05 to seed the record without waiting for the 05:00 UTC cron.
Plan
timings/epochs.jsonl: append-only, one line per epoch boundary{"date", "label", "note"}; the record's readers compare only within the current epoch (records dated on or after the latest boundary), so a boundary appended when the rebuild lands ends the legacy epoch and every baseline starts fresh.- Commit the first line —
label: legacy, dated at the record's first day — in this PR, with aheart.timings epochverb for a human to append later boundaries (the workflow never writes this file). - Surface the epoch on the board (one detail line under each timing row; an additive
performance.epochkey) so a reader can tell a step change in the world from a regression. - Verify the seeded round: every smoke-gated and library repo reports (or the exact
unavailablereason is named — the cross-repo artifact 403 is the known one, remedied by theHEART_TIMINGS_TOKENsecret). - Write the legacy digest in PyAutoMind (
docs/pyautoheart/legacy_timing_round_2026-09.md): slowest scripts per repo, slowest unit tests per library, import floors, and the compile- vs execution-dominated classes, from the ingested rows — linked from the epic ledger.
Detailed implementation plan
Affected Repositories
- PyAutoHeart (primary: the epoch mechanism + the first epoch line)
- PyAutoMind (the digest document + epic ledger — ledger-only, lands by itself)
Work Classification
Library (organ code) + a Mind document. No workspace change.
Branch Survey
| Repository | Current Branch | Dirty? |
|---|---|---|
| ./PyAutoHeart | main @ cb1d500 (+ the day's record commit once the dispatched run lands) | clean |
Branch: claude/ci-test-timing-epic-ke2lul (designated for the epic; restarted from main; cloud session, no task worktree).
Implementation Steps (PyAutoHeart)
heart/timings.py— epochs.read_epochs(path=EPOCHS_FILE) -> list[dict](read_jsonl, keep lines with adateand alabel, sorted by date),current_epoch(epochs, today=None) -> dict | None(the latest boundary whose date ≤ today;Nonewhen the file is absent — no epoch is "everything is one epoch", i.e. today's behaviour).append_epoch(path, date, label, note) -> bool— append-only; refuses (False) a duplicate(date, label); never rewrites.- Every reader gains
since: str = ""(ISO date):gates_historydrops lines withdate < since;previous_script_rows,previous_unit_rowsandimport_historydrop record lines withdate < sincebefore picking the latest per leg / the window. Records without adateare treated as older than any boundary (excluded whensinceis set). census()gainsepoch: {label, date} | nullandepochs: int.main: new verbepoch --label LABEL --note NOTE [--date YYYY-MM-DD] [--dir DIR](prints the line it appended, or "already recorded");showprints the epoch. The dailyappendnever touchesepochs.jsonl(assert in a test).
- Callers pass the current epoch.
ci_timing.main --aggregate,smoke_timings.main --aggregate,unit_timings.main --aggregatecomputesince = (current_epoch(read_epochs(record_dir / "epochs.jsonl")) or {}).get("date", "")and pass it to the reader(s). Pureaggregate()functions unchanged. - Board.
_record_lines(record)(dashboard.py) adds· epoch <label> since <date>to both record lines when the census carries an epoch;_performance_sectionsemits an additive"epoch": {"label", "date"}key only when present. Older snapshots byte-identical (test). timings/epochs.jsonl— the first line, committed in this PR:{"date": "2026-09-05", "label": "legacy", "note": "pre-rebuild reference round of the ci-timing-fast-tests epic: phases 5-7 change _test script content, datasets, pinned likelihoods and CI caches; comparisons must not cross this boundary"}. Dated at the record's first day (the dispatched 2026-09-05 run). Write it with the newepochverb, never by hand, so the line is byte-identical to what the verb produces.timings/README.md— replace the "Reserved" section with the live one: the schema, "readers compare within the current epoch", who appends (a human, via the verb, in a PR — a boundary is a judgement about the world), and the standing instruction that the phase that lands the rebuild appends the next boundary (e.g.label: fast-tests) in its own PR.- Tests (fake names):
tests/test_timings.py— epochs read/sort,current_epochpicks the latest ≤ today,append_epochdedupes and never rewrites, every reader honourssince(a pre-boundary line is invisible; an undated line is excluded whensinceis set, included otherwise), census keys,epochverb viamain,appendleavesepochs.jsonluntouched;tests/test_dashboard.py— the epoch suffix andperformance.epochpresent only with the census; the three--aggregatemains passsince(a wiring-level test using a tmp record dir with one pre-boundary and one post-boundary line: only the post-boundary one is compared). Existing tests unmodified. - Validate: full suite green (baseline 841), tenant firewall OK; commit + push; no PR opened by the subagent.
Verification + digest (judgment tier, after the dispatched run lands)
- Confirm the daily commit on
maincarriestimings/gates.jsonl,timings/scripts/*.jsonland (once a library CI run has producedunit-timings-*)timings/unit/*.jsonl; read the publishedboard.jsonfor theunavailablecounts on the Smoke scripts and Unit-test rows. If the workspace/library repos are allunavailablewith a 403, the round cannot be completed until theHEART_TIMINGS_TOKENsecret exists — stop and say so. - Digest:
PyAutoMind/docs/pyautoheart/legacy_timing_round_2026-09.md— per repo the slowest scripts with seconds and cap, the gate wall-clock medians, per library the slowest tests and suite wall-clock, the import seconds per package, and a classification of the slow class (compile-dominatedENV: jaxfull-dataset scripts vs execution-dominated vs import-floor) from the names and the numbers, with the caveat where the class is inferred. Linked from the epic ledger as the evidence for phases 5, 6, 8, 9.
Out of scope
- Appending the second boundary (the rebuild's own PR does it).
- Any change to script content, datasets or pins (phases 5–7).
Original Prompt
Click to expand starting prompt
# Legacy baseline timing round: snapshot pre-rebuild timings of every CI test surface
Type: test
Target: PyAutoHeart
Repos:
- PyAutoHeart
- workspaces
Difficulty: medium
Autonomy: safe
Priority: high
Status: formalised
Consequence: judge
Review-minutes: 20
Unattended: ready
Epic: ci-timing-fast-tests
Phase: 4
Legacy baseline timing round: snapshot the pre-rebuild timings of every CI test surface.
With phases 1-3 live, do the first full timing round across the workspace, _test workspace
and HowTo repos plus unit tests and import times: trigger/collect a complete pass, verify
every repo reports, and record the snapshot in the phase-2 durable history explicitly
LABELED AS THE LEGACY RECORD. The user's framing: the epic's later phases (the _test
physical+fast rebuild, CI caches) will change script content, datasets and pinned
likelihoods, so this round is a legacy reference — NOT the starting point of the long-term
tracking history, which begins after the rebuild lands. Mark it so in the stored record and
on the board (a labeled epoch boundary, so post-rebuild drift warnings do not fire against
pre-rebuild baselines).
Deliverables: the labeled snapshot committed to PyAutoHeart; a short written digest of
where the time currently goes (slowest scripts per repo, slowest unit tests, import
floors, compile-dominated vs execution-dominated classes) — this digest is the input
evidence for phases 5, 6, 8 and 9 of the epic.
Activity
docs(timings): the legacy round digest — where CI time went before th…
Jammy2211 commentedon Sep 6, 2026
Shipped
PyAutoHeart#209 →
ad56720, merged 2026-09-06 (CI green on both matrix legs via the new manual door; suite 841 → 864).heart-health.ymlrun on 2026-09-05: 26 gates, 494 script rows across all 11 smoke-gated repos, 0 legs unavailable (the cross-repo artifact 403 risk from feat(smoke_timings): ingest per-script smoke timings onto the ⏱ board #203 did not materialise; noHEART_TIMINGS_TOKENneeded).timings/epochs.jsonlis live with the first boundarylegacy @ 2026-09-05; every record reader compares only within the current epoch;heart.timings epochis the human door; the board shows the epoch on both timing rows and inperformance.epoch.timings/legacy_round_2026-09.md— the digest of where CI time went before the rebuild (the evidence for phases 5–9). Its unit/import section fills once a library CI run has produced theunit-timingsartifact.[skip ci]record commit).heart-tests.ymlgainedworkflow_dispatch: this PR, opened while main's tip was the daily[skip ci]record commit, received nopull_requestrun even after asynchronizepush; the dispatch trigger was the only way to run the suite on the head. Worth watching on future PRs opened right after a daily record commit.Phase 4 of the
ci-timing-fast-testsepic. Next per the ledger's review order: phase 7 (CI caches), before the rebuild waves.Generated by Claude Code