Repository navigation
feat(timings): permanent CI timing record committed daily - #205
Merged
Merged
Conversation
heart-health.yml now appends the day's observations to an append-only record in the repo — timings/gates.jsonl (one line per date, the per-gate medians ci_timing measured) and timings/scripts/<repo>.jsonl (one line per python leg x run id, the per-script seconds smoke_timings ingested) — and commits it beside the README block, one commit a day. Both checks read their baselines from the record first and from the previously published board.json only as a fallback, so a Pages publish gap no longer loses history. Dedupe is on identity (date; python leg + run id), never on the day, so a quiet week cannot write seven copies of one run. Readiness verdict, badge and the board.json performance shape are untouched. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0151gQm9fk3XGLi5f18Urdba
This was referenced Sep 5, 2026
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 #204. Phase 2 of the
ci-timing-fast-testsepic (PyAutoMinddraft/feature/pyautoheart/ci_timing_fast_tests_epic.md); Plane C ("durable baselines") ofdocs/pyautoheart/test_performance_board_assessment.md.Summary
Until now the ⏱ surface's only history was the self-carried window: both timing checks re-read the previously published Pages
board.json, capped at 30 gate entries and one previous per-script observation, and nothing was ever committed. A publish gap lost it. This adds the permanent record undertimings/and makes it the first source of truth:timings/gates.jsonl— one line per UTC date with every tracked gate'sp50_s/pr_median_s/max_s/queue_median_s/runs(the figuresci_timingalready measures). Keyed bydate: a re-run of the daily job appends nothing.timings/scripts/<repo>.jsonl— one line per(python leg, run id)with provenance (run_url,head_branch,head_sha,env_profile) andentries: {path: [seconds, status, cap_s]}for every timed script. Keyed by(python, run_id): a quiet week whose newest artifact is the same run appends nothing — thescript_timing"one value repeated seven times" defect (phase 0 of the board arc) cannot recur here. This is why phase 1 stampedrun_idon every row.heart/timings.py— the append-only writer (never truncates; compact sorted-key single lines, so a daily diff is the added lines only), the readers that feed the checks (gates_historyin the exact shapehistory_baseline/_gate_sparkconsume;previous_script_rowsin the shapeclassify_driftexpects), a census, and a CLI (append,show).ci_timing.aggregate(record_history=…)andsmoke_timings.aggregate(record_prev_rows=…)prefer the committed record; the previously published board is the fallback (first run, fresh clone).board.json'sperformanceshape is unchanged, so the Brain board and the next render's fallback read exactly what they always read.ci_timingexcludes today's date from its baseline,smoke_timingscompares by run id), and the README-commit step now commitstimings/beside the README block: one[skip ci]commit a day,git status --porcelainso a repo's first (untracked) line is seen. This job is the record's single writer; a dev-box tick never appends.record: …detail line under each timing row from the census (state.aggregate()gainstimings_record); absent census → byte-identical render.timings/README.md— schema, the two dedupe keys and why, the append-only rule, growth shape (gates ~1 line/day; scripts ≤ 2 lines/day/repo), and the reservation oftimings/epochs.jsonlfor phase 4's labeled LEGACY epoch boundary (not created here).gates.jsonlandscripts/are deliberately not committed empty; the first scheduled run creates them.API Changes
No public API change. New module
heart.timings;ci_timing.aggregateandsmoke_timings.aggregategain an optional keyword argument each; both--aggregateCLIs gain--record-dir;smoke_timings.json'srepos[]items gainhead_sha/env_profile(additive); new snapshot keytimings_record.Test Plan
python3 -m pytest -q -n auto— 735 → 767 passed (newtests/test_timings.py; appended cases intest_ci_timing.py,test_smoke_timings.py,test_dashboard.py,test_heart_health_wiring.py); existing tests unmodifiedappendover identical rollups appends nothing (2 skipped (already recorded))bash -nboth shell legs;yaml.safe_loadon the workflow; tenant firewall check OK (fake names only in new files)heart-health.ymlrun onmain: the daily commit carriestimings/gates.jsonlandtimings/scripts/<repo>.jsonlbeside the README block, and the tworecord:lines appear on the boardGenerated by the PyAutoLabs agent workflow.
🤖 Generated with Claude Code
https://claude.ai/code/session_0151gQm9fk3XGLi5f18Urdba
Generated by Claude Code