Skip to content

Key the nightly data cache on the fwl-mors dataset manifest - #37

Merged
timlichtenberg merged 4 commits into
mainfrom
tl/nightly-cache-key-mors-manifest
Sep 24, 2026
Merged

timlichtenberg merged 4 commits into
mainfrom
tl/nightly-cache-key-mors-manifest

Conversation

@timlichtenberg

Copy link
Copy Markdown
Member

Description

The nightly stopped at "Resolve the data cache key" (https://github.com/FormingWorlds/ZEPHYRUS/actions/runs/35973497916): tools/nightly_data_cache.py read the Spada pin from mors.data.get_zenodo_record(), which fwl-mors 26.9.23 removed when it moved its dataset pins into mors_manifest.toml.

  • The cache key now comes from the Spada entry of the fwl-mors manifest (read through fwl-io): a digest of the versioned data directory and the registry checksums, so the cache follows the dataset it holds. Still no restore-keys.
  • check uses fwl-io's check_dataset, which names each missing file from the fetch record, instead of counting files. It is read-only and fails with a clear message on a missing or incomplete tree.
  • The develop extra requires fwl-io >= 26.8.31 and fwl-mors >= 26.9.23, which the tool needs; the runtime fwl-mors floor is unchanged.

Validation of changes

  • In a clean environment with fwl-mors 26.9.23 and fwl-io 26.9.23, the script on main fails with the CI error; this branch prints the key and exits 0.
  • check on a real copy of the Spada grid exits 0 (1602 files present) and names a deleted file (exit 1); a missing data root exits 1 and is not created.
  • tests/test_nightly_data_cache.py: 11 passed (macOS, Python 3.12).

Checklist

  • I have followed the contributing guidelines
  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • My changes generate no new warnings or errors
  • I have checked that the tests still pass on my computer
  • I have updated the docs, as appropriate
  • I have added tests for these changes, as appropriate
  • I have checked that all dependencies have been updated, as required

The Spada grid is declared in the manifest fwl-mors ships and fetched into a versioned directory, so the key digests that directory and the registry checksums fwl-io reads from the manifest, instead of a Zenodo record the fwl-mors data module no longer exposes. The restore check looks in the versioned directory and no longer looks for a leftover archive, since fwl-io places the extracted tree in one step.

The tests build a manifest and show that a new record or checksum moves the key, that the Baraffe entry does not, and that a missing entry, registry or manifest stops with a diagnostic.
Checking a data root that does not exist reports it instead of creating it as a side effect of building the fetcher. The missing-registry test asserts the message it means, the comment on the sibling script matches what it does now, and the catch-all error no longer blames the manifest for failures that are not about it.
…I in the develop extra

The restore check asks fwl-io whether the members it recorded when it unpacked the archive are present, and names the missing ones, instead of counting files under a directory. A data root that does not exist is reported inside the check, so calling it directly does not create the tree.

The develop extra requires fwl-mors 26.9.23, which ships the dataset manifest the cache script reads, and fwl-io 26.8.31, the first release with check_dataset. The runtime dependency on fwl-mors is unchanged.
Copilot AI lite review requested due to automatic review settings September 24, 2026 08:49

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Address the file-count handling issue and add the required manifest error-path coverage.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 Low severity

Open (1)
What changed in this PR

Updates nightly data caching to use the fwl-mors manifest and fwl-io validation.

Changes:

  • Derives cache keys from the Spada dataset directory and registry checksums.
  • Validates restored datasets with check_dataset.
  • Updates dependencies, tests, and nightly workflow documentation.
File Summary Review notes
tools/​nightly_data_cache.py Manifest-based cache keying and dataset validation Moderate issue (1 vote): structural faults can produce an incorrect present-file count.
tests/​test_nightly_data_cache.py Tests for manifest keys and restored trees Nit (2 votes): add a boundary or malformed-manifest case.
pyproject.toml Adds required development dependency floors No final comments.
.github/​workflows/​nightly.yml Documents the updated cache-key flow No final comments.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread tests/test_nightly_data_cache.py
…ries

The key material test now also checks that a re-pinned Spada record moves the version directory to that record, and that a second registry line or a DOI that is not a Zenodo record raises ResolutionError without creating a data root.
@timlichtenberg
timlichtenberg merged commit 0587dab into main Sep 24, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants