Repository navigation
feat(smoke-tests): JAX compile + simulated-dataset caches across runs; cache state on every timing row - #211
Merged
Conversation
…; cache state on every timing row (#210) The reusable smoke workflow now restores and saves the JAX persistent compilation cache (keyed on runner OS x Python leg x jaxlib x a manual epoch salt) and the workspace's simulated datasets (keyed on the simulator-script hash x the dependency-chain SHAs x the salt, no broader fallback), both as non-fatal steps, and writes test-results/cache_state.json so every per-script row the Heart ingests says whether it ran hot or cold. smoke_timings, the timings/ record and the board carry that state additively, and drift is never classified across two different known cache states. Readiness verdict and badge untouched; the runner command is unchanged. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0151gQm9fk3XGLi5f18Urdba
This was referenced Sep 6, 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 #210. Phase 7 of the
ci-timing-fast-testsepic (PyAutoMinddraft/feature/pyautoheart/ci_timing_fast_tests_epic.md), pulled ahead of the phase-5/6 rebuild waves per the epic ledger's review: the waves then target what remains once compile is cached, and their before/after is measured on one cache state.Summary
The reusable smoke workflow every workspace /
_test/ HowTo gate calls had noactions/cachestep, so the JAX persistent compilation cache autonerves already writes was discarded between runs, anddataset/(gitignored in every workspace) was re-simulated on every run. The legacy digest (#209) shows that in both_testflagships the time sits in ~15 compile-dominatedjax_likelihoodscripts.JAX_COMPILATION_CACHE_DIRset to an explicit workspace path in the runner env (the runner copies the job env into every script subprocess, so all scripts share one cache);actions/cache/restore+savekeyed on runner OS × Python leg × jaxlib version × a manual epoch salt (PYAUTO_CACHE_EPOCH, job-level env, bump to invalidate everything), run-id suffixed so each save is a fresh superset (accumulating-cache pattern). Saved even on a red run (an entry is complete or absent) and only when the cache actually changed.workspace/datasetrestored/saved keyed on the hash of every simulator script × the dependency-chain HEAD SHAs × the salt, with no broader fallback: a different simulator or library commit must miss. Not keyed on the Python leg. Safe by construction:should_simulatekeeps a restored dataset only while its resolution regime matches and re-simulates otherwise. Saved only on a green run (a killed simulator can leave a truncated FITS thatshould_simulatewould keep).Record cache statestep (if: always()) writestest-results/cache_state.json(restored key, hit/miss, size and entry counts before/after) into the report dir the existingsmoke-timings-<py>upload already globs.smoke_timingsingests it: legs, rollup items, board lines ([jax cache hit|miss]) and thetimings/scriptsrecord carrycache, and drift is never classified across two known but different jax cache states — a cold run after a hot baseline is a recompile, not a regression. Artifacts from before the sidecar readunknownand compare exactly as before.@mainby eleven repos: every new step hascontinue-on-error: true, the runner command is byte-identical (itsenv:gained one variable), the upload step is untouched, and the whole diff is additive (243 insertions, 0 deletions in the workflow).API Changes
No public API change.
smoke_timingsgainsparse_cache_state/cache_view/read_cache_state, acache=keyword onclassify_drift, and additivecache/cache_jax/prev_cache_jaxfields;timingsrecord lines gaincache;previous_script_rowsrows gaincache_jax.Test Plan
python3 -m pytest -q -n auto— 864 → 893 passed (11 in newtests/test_smoke_tests_wiring.pypinning step order, non-fatality, key components, the single dataset restore-key, theif:conditions and the unchanged runner command; 11 + 4 + 3 appended). One existing exact-equality expected dict gained the newcache_jax: "unknown"key; nothing weakened.yaml.safe_loadon the workflow; the record step's Python and the two bash steps executed locally against a fake workspace; tenant firewall check OK_testrepo restores nothing and saves; the second restores (cache_state.jsonshowshit, board line[jax cache hit]); comparejax_likelihoodper-script seconds and gate p50 hot vs cold intimings/scripts/andtimings/gates.jsonl, and the restore/save overhead on autocti_workspace_test (3 entries). Numbers go into the issue's Shipped comment and the epic ledger.Generated by the PyAutoLabs agent workflow.
🤖 Generated with Claude Code
https://claude.ai/code/session_0151gQm9fk3XGLi5f18Urdba
Generated by Claude Code