diff --git a/.github/actions/setup-proteus/action.yml b/.github/actions/setup-proteus/action.yml index 3ee2b3e62..18b1dda3a 100644 --- a/.github/actions/setup-proteus/action.yml +++ b/.github/actions/setup-proteus/action.yml @@ -387,6 +387,18 @@ runs: fi return $rc } + # Skip the fetch when a warm cache already holds a complete res/ tree. + # res_complete asserts every required artifact is present AND non-empty + # (a zero-byte file from a green-but-empty fetch fails the -s test), so a + # tree that passes needs no repair and re-pulling it is pure download + # cost (~200 s, dominated by the thermodynamics archive). An incomplete + # or partially-written tree fails the check and falls through to the + # retry loop below, which overwrites and repairs it, so the repair path + # the unconditional fetch was added for is preserved. + if res_complete 2>/dev/null; then + echo "AGNI basic data already complete in res/ (warm cache); skipping fetch." + exit 0 + fi fetch="$GITHUB_WORKSPACE/AGNI/src/get_data.sh" delays=(10 30 60) attempts=$(( ${#delays[@]} + 1 )) @@ -527,11 +539,20 @@ runs: # ------------------------------------------------------------------ # 9. FWL_DATA cache + smoke / full data download # ------------------------------------------------------------------ + # The key hashes BOTH dataset descriptors: .github/data-manifest.yaml (the + # older download() datasets: spectral files, stellar spectra, tracks) and + # src/proteus/data/proteus_manifest.toml (the fwl-io pins for the exoplanet + # + mass-radius reference data). Keying on the fwl-io manifest as well means + # a Zenodo re-pin busts the cache and forces a fresh save. Without it, files + # pinned after the cache was first frozen re-download on every run: the key + # stays constant, actions/cache exact-hits and never re-saves, so the stale + # tree can never pick them up. The restore-keys prefix still lets a fresh + # save build on the previous tree instead of re-downloading everything. - name: Cache FWL_DATA uses: actions/cache@v5 with: path: ~/fwl_data - key: fwl-data-${{ runner.os }}-${{ hashFiles('.github/data-manifest.yaml') }} + key: fwl-data-${{ runner.os }}-${{ hashFiles('.github/data-manifest.yaml', 'src/proteus/data/proteus_manifest.toml') }} restore-keys: | fwl-data-${{ runner.os }}- diff --git a/.github/data-manifest.yaml b/.github/data-manifest.yaml index d1778e3e6..d56043b80 100644 --- a/.github/data-manifest.yaml +++ b/.github/data-manifest.yaml @@ -1,9 +1,10 @@ # PROTEUS data manifest -- explicit version pins for the datasets CI caches. # # The CI composite action (.github/actions/setup-proteus/action.yml) hashes -# this file to key the FWL_DATA cache. The cache invalidates only when this -# manifest changes; CI runs that don't change the manifest reuse the -# previously cached FWL_DATA tree. +# this file together with src/proteus/data/proteus_manifest.toml (the fwl-io +# dataset pins) to key the FWL_DATA cache. The cache invalidates when either +# descriptor changes; CI runs that change neither reuse the previously cached +# FWL_DATA tree. # # Bump a version string in this file when: # * a new dataset becomes a hard requirement of a tier the CI runs;