Skip to content

geotiff: wire fast/slow CI split and add determinism gate (#1930)#2062

Merged
brendancol merged 2 commits into
mainfrom
1930-ci-fast-slow-determinism
May 18, 2026
Merged

geotiff: wire fast/slow CI split and add determinism gate (#1930)#2062
brendancol merged 2 commits into
mainfrom
1930-ci-fast-slow-determinism

Conversation

@brendancol
Copy link
Copy Markdown
Contributor

Summary

  • Wires the fast/slow split (registered in geotiff: golden corpus phase 4 PR 1, fast/slow split (#1930) #2043) into .github/workflows/test.yml. PRs run pytest -m "not slow", which drops the six compression fixtures. push-to-main runs the full set, and a new nightly cron at 03:00 UTC plus a workflow_dispatch button run the full corpus too.
  • Adds test_corpus_determinism.py under xrspatial/geotiff/tests/golden_corpus/. It regenerates every manifest fixture into a session-scoped tmp dir, md5s each one against the committed bytes, and asserts no orphan .tif files are sitting on disk. That covers two failure modes in one gate: a generator-side regression, and a manually-edited or stale committed fixture.
  • The new module does not carry the slow mark, so the PR fast lane catches the regression too. Runtime is ~0.3s for 30 fixtures.

Refs #1930.

Test plan

  • pytest -m "not slow" xrspatial/geotiff/tests/test_golden_corpus_eager_numpy_1930.py xrspatial/geotiff/tests/golden_corpus/ -q -- 103 passed, 6 deselected (the compression cells), 3 skipped.
  • pytest xrspatial/geotiff/tests/golden_corpus/test_corpus_determinism.py -v -- 31 passed, 1 skipped (the schema-only example).
  • YAML parses: python -c "import yaml; yaml.safe_load(open('.github/workflows/test.yml'))".
  • Negative test: corrupted a regenerated fixture in a scratch script, confirmed the md5 compare detects the drift.

PR runs use `pytest -m "not slow"` so the six compression fixtures
(tagged via `_marks.fast_slow_marks_for`) drop out of the fast lane.
push-to-main, a nightly cron at 03:00 UTC, and a `workflow_dispatch`
manual trigger run the full corpus with no filter.

Adds `test_corpus_determinism.py`: regenerates every manifest fixture
into a tmp dir once per session and md5s it against the committed
bytes. Also asserts no orphan `.tif` files on disk. The module runs
in about 0.3s.
@github-actions github-actions Bot added the performance PR touches performance-sensitive code label May 18, 2026
* `_md5()` passes `usedforsecurity=False` so FIPS-strict runners do
  not raise. Use is byte-identity only, no security claim.
* External-overview sidecar test now parametrises over every manifest
  entry with `external_overview: true` so a future fixture is covered
  without a code change. Today's single sidecar still runs.
* `_manifest_ids` / `_load_entries` cached at import as module-level
  tuples; parametrize and the orphan-file test share one manifest
  load + validation per session.
* Docstring runtime claim swapped for the measured ~0.3s.
* Workflow comment notes that GitHub Actions `schedule` triggers only
  fire from the default branch, so cron on a feature branch is a
  no-op.
@brendancol brendancol merged commit 7440676 into main May 18, 2026
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

performance PR touches performance-sensitive code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant