Skip to content

Tests.yml: run check-compat-bounds as a separate job#67

Merged
mtfishman merged 1 commit intomainfrom
mf/separate-compat-check
Apr 22, 2026
Merged

Tests.yml: run check-compat-bounds as a separate job#67
mtfishman merged 1 commit intomainfrom
mf/separate-compat-check

Conversation

@mtfishman
Copy link
Copy Markdown
Member

@mtfishman mtfishman commented Apr 22, 2026

Summary

  • Move the compat-bounds check out of the tests job into a sibling check-compat-bounds job in Tests.yml. A compat failure no longer prevents the test matrix from running, but still blocks auto-merge via the caller's gate job (which needs: the reusable-workflow call and so aggregates both jobs).
  • Gate the new job to the canonical (ubuntu-latest, julia=1) cell so it runs exactly once per caller invocation regardless of matrix size, since the check is platform-independent.
  • Fix check_compat_bounds.jl to not spuriously fail when a workspace project pins its own package to a not-yet-registered version.

The self-compat bug

Reproduced in ITensor/DataGraphs.jl#94:

Found 3 compat entries not matching the latest allowed version:
  - DataGraphs: compat "0.4" matches no registered version (resolved 0.4.0)
      declared in docs/Project.toml
  - DataGraphs: compat "0.4" matches no registered version (resolved 0.4.0)
      declared in examples/Project.toml
  - DataGraphs: compat "0.4" matches no registered version (resolved 0.4.0)
      declared in test/Project.toml

Root Project.toml bumps version = "0.4.0"; the workspace subprojects pin DataGraphs = "0.4". Since no 0.4.x is registered yet, max_satisfying returned nothing:no_match.

The fix: workspace_versions(projects) reads each workspace Project.toml's (uuid, version), and the main loop merges the workspace version into the candidate set before calling max_satisfying. Forward-looking self-compat entries that don't match the workspace version (e.g. declaring = "0.5" while root is still 0.4.0) still fail as before.

Caller impact

None. Existing callers of ITensor/ITensorActions/.github/workflows/Tests.yml@main don't need edits:

  • The check-compat-bounds / check-compat-bounds-mode inputs are preserved with the same defaults.
  • The caller's tests-gate job (needs: tests) automatically aggregates both reusable jobs — a new job inside the reusable bubbles up through the single needs.tests.result.

Caveat

The canonical-cell gate assumes every caller's matrix includes (ubuntu-latest, julia=1). Every ITensor package I looked at does. If that ever breaks down for some package we can swap the gate (e.g. to the lts cell) or expose an input.

Move the compat-bounds check out of the `tests` job into a sibling job
so a compat failure no longer prevents the test matrix from running.
The caller's gate job still aggregates both via `needs:` on the
reusable-workflow call, so a failure here continues to block auto-merge.

Gate the new job to the canonical (ubuntu-latest, julia=1) cell so it
runs exactly once per caller invocation regardless of matrix size, since
the check is platform-independent.

Also fix check_compat_bounds.jl to not spuriously fail when a workspace
project pins its own package to a not-yet-registered version (e.g. root
bumps `version = "0.4.0"` and test/docs/examples pin `MyPkg = "0.4"`):
merge each workspace project's declared version into the candidate set
before computing max_satisfying.
@mtfishman mtfishman merged commit e783b6f into main Apr 22, 2026
1 check passed
@mtfishman mtfishman deleted the mf/separate-compat-check branch April 22, 2026 16:38
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.

1 participant