Skip to content

ci(deps): make setup-micromamba consistent, pinned and Dependabot-visible - #151

Merged
bioedca merged 1 commit into
mainfrom
ci/m9-micromamba-consistency
Jul 19, 2026
Merged

ci(deps): make setup-micromamba consistent, pinned and Dependabot-visible#151
bioedca merged 1 commit into
mainfrom
ci/m9-micromamba-consistency

Conversation

@bioedca

@bioedca bioedca commented Jul 19, 2026

Copy link
Copy Markdown
Owner

Summary

Two silent-drift traps converge on setup-micromamba, and nothing was watching either.

1. The composite action was invisible to Dependabot. Its github-actions ecosystem with directory: "/" scans only .github/workflows plus a root-level action.yml — never .github/actions/** (dependabot-core#6345). That is how .github/actions/setup-env sat on setup-micromamba v2 (node20) while packaging.yml and release.yml were bumped to v3.0.0 in #149. The skew was inverted from where you'd want it: the composite feeds seven workflows including the required 3-OS test matrix and schema-guard, so the required CI ran the old pin while the two zero-CI-coverage workflows ran the new one.

2. micromamba-version was unset at all three call sites, so the binary re-resolved to latest on every run. Upstream setup-micromamba#306 (STATUS_ACCESS_VIOLATION on windows-latest, fixed in micromamba 2.6.2) and #307 (sharded-repodata resolution failures, fixed in 2.7.0) each turned floating consumers red overnight with no repo-side change. A signed release must not re-resolve its own toolchain (pin-and-hold, PRD §4.1).

Linked tracking

Type of change

  • feat — new capability
  • fix — bug fix
  • ci — CI / dependency configuration
  • ! / BREAKING CHANGE: — a deliberate schema-version bump (the only sanctioned breaking change)

Self-review checklist (PRD §12.4)

  • Schema freeze respected — no .tether HDF5 change; CI/config only. schema-guard green.
  • conda-lock updated if dependencies changed — the committed conda locks are untouched; this pins the micromamba binary (a GitHub-Action input), not a lock entry. conda-lock-verify green. The mamba#4332 win-64 restore bug is unreachable — all three committed locks are pure conda (0 manager: pip entries).
  • Tests added/updated — three contract tests in tests/test_marker_contract.py (stdlib + pyyaml, OS-agnostic, required 3-OS matrix); CodeQL clean. No GUI surface.
  • Provenance stamped — N/A: no analysis writes to .tether.
  • New tunables registered in PRD §11.2 — N/A: the micromamba version is a build-toolchain pin, not a scientific tunable; MICROMAMBA_PIN is the single source in the contract test and every call site is bound to it.
  • Scientific/statistical claims carry a citation; SPDX header on every new source file — no new files (all edited files already carry GPL-3.0-or-later); no scientific claims; reuse lint unaffected.
  • A resolved PRD decision that changed is reflected in the PRD / an ADR — N/A: no decision changed; consistency/pinning fix.

What

Scope, stated honestly

Only setup-env restores a conda-lock with micromamba. packaging.yml/release.yml solve a throwaway pkgbuild tool env from create-args and never exercise the restore path — so a shared pin value is maintenance convenience (one number to bump), not a CI-matches-the-signed-release guarantee. The larger reproducibility gap (constructor, conda-standalone, python-build, pip, wheel unpinned in create-args) is untouched — a good follow-up.

Testing

  • pytest tests/test_marker_contract.py24 passed (rebased on fix(release): assert the installers actually staged before publishing #150, so A's 5 staging tests and B's 3 new tests coexist); ruff check + format --check clean at 0.15.19; all four touched YAML files parse.
  • Mutation-tested (each turned the intended guard red): pin removed from one site, pin diverged between sites, composite Dependabot entry deleted, glob widened to overlap workflows, a nested composite action added.
  • The dispatch-only consumers of setup-env were exercised on this branch (no PR run covers them): deps-audit ✅, large-fixtures ✅, sidecar-measure ✅. sidecar/parity and deep/smoke (both consume the composite) are green on the PR.

What this does NOT cover

  • Whether the Dependabot directories: glob expands in production is the one link not verifiable from CI. Source-verified against dependabot-core; a non-expanding multi-directory glob fails loudly (red Dependabot job), not silently. One-time post-merge check: Insights → Dependency graph → Dependabot → latest github-actions job log; confirm /.github/actions/setup-env is enumerated. If absent, swap to the literal directories: ["/.github/actions/setup-env"] — the contract test passes either way.
  • with: input values generally — Dependabot still never watches them; only micromamba-version is now guarded.
  • Expect one cold environment rebuild on all three OSes on the first run after merge (v3 changed the cache-key computation). That is not a failure.

Summary by CodeRabbit

  • Build and Release

    • Build, packaging, and release workflows now use a consistent, pinned micromamba version for more predictable environment setup.
  • Maintenance

    • Automated update coverage now includes repository composite actions, with clearer update scheduling and scope.
  • Tests

    • Added checks to ensure micromamba versions remain consistent across workflows.
    • Added validation that composite actions are covered by automated updates without overlapping workflow scans.

Base automatically changed from fix/m9-release-stage-assert to main July 19, 2026 21:04
@bioedca
bioedca force-pushed the ci/m9-micromamba-consistency branch from 94da85c to 33b7093 Compare July 19, 2026 21:05
@bioedca
bioedca marked this pull request as ready for review July 19, 2026 21:05
Repository owner deleted a comment from coderabbitai Bot Jul 19, 2026
Repository owner deleted a comment from coderabbitai Bot Jul 19, 2026
Repository owner deleted a comment from coderabbitai Bot Jul 19, 2026
Repository owner deleted a comment from coderabbitai Bot Jul 19, 2026
@bioedca

bioedca commented Jul 19, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 19, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai

coderabbitai Bot commented Jul 19, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 52 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 26d18926-90f8-47d2-b4b6-f7ea722c6ef9

📥 Commits

Reviewing files that changed from the base of the PR and between 33b7093 and a5eb13f.

📒 Files selected for processing (5)
  • .github/actions/setup-env/action.yml
  • .github/dependabot.yml
  • .github/workflows/packaging.yml
  • .github/workflows/release.yml
  • tests/test_marker_contract.py
📝 Walkthrough

Walkthrough

The pull request pins micromamba version 2.8.1-0 across CI setup calls, upgrades the composite setup action, adds Dependabot coverage for nested composite actions, and introduces contract tests for version consistency and non-overlapping update scopes.

Changes

CI dependency contracts

Layer / File(s) Summary
Pin micromamba across CI setup calls
.github/actions/setup-env/action.yml, .github/workflows/packaging.yml, .github/workflows/release.yml, tests/test_marker_contract.py
Setup actions pin micromamba to 2.8.1-0; the contract test scans GitHub configuration and verifies every setup call uses the same pin.
Cover composite actions with Dependabot
.github/dependabot.yml, tests/test_marker_contract.py
Dependabot separately monitors .github/actions/*, while tests verify composite-action coverage and prevent overlap with workflow scanning.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Possibly related PRs

  • bioedca/tether#3: Introduced the composite setup action updated here.
  • bioedca/tether#142: Added the packaging micromamba provisioning covered by these pins and contracts.

Suggested labels: type:ci, area:packaging, milestone:M9, priority:P2

Poem

A rabbit pinned the mamba with care,
Then checked every workflow everywhere.
Dependabot hopped through the action-tree,
While contracts guarded consistency.
CI now nibbles bugs with glee!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed It concisely captures the main change: pinning setup-micromamba and expanding Dependabot coverage.
Description check ✅ Passed All required sections are present and filled with substantive content, including summary, tracking, type, checklist, and testing.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ci/m9-micromamba-consistency

Comment @coderabbitai help to get the list of available commands.

@bioedca

bioedca commented Jul 19, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Jul 19, 2026

Copy link
Copy Markdown
✅ Action performed

Full review finished.

…ible

Two silent-drift traps converge on setup-micromamba, and nothing was watching
either.

1. The composite action was invisible to Dependabot. Its `github-actions`
   ecosystem with `directory: "/"` scans only `.github/workflows` plus a
   ROOT-level action.yml — never `.github/actions/**` (dependabot-core#6345).
   That is how `.github/actions/setup-env` sat on setup-micromamba v2 (node20)
   while packaging.yml and release.yml were bumped to v3.0.0. The skew was
   inverted from where you would want it: the composite feeds SEVEN workflows
   including the required 3-OS `test` matrix and schema-guard, so the *required*
   CI ran the old pin while the two zero-CI-coverage workflows ran the new one.

2. `micromamba-version` was unset at all three call sites, so the binary
   re-resolved to `latest` on every run. Upstream setup-micromamba#306
   (STATUS_ACCESS_VIOLATION on windows-latest, fixed in micromamba 2.6.2) and
   #307 (sharded-repodata resolution failures, fixed in 2.7.0) each turned
   floating consumers red overnight with no repo-side change. A signed release
   must not re-resolve its own toolchain (pin-and-hold, PRD §4.1).

Bump setup-env to the v3.0.0 SHA, pin micromamba-version to 2.8.1-0 at all three
call sites, and add a second `github-actions` Dependabot entry using
`directories:` (the only key that supports globbing) scoped to
`/.github/actions/*`. The glob is deliberately not `**/*`, which would re-match
`.github/workflows` and produce duplicate PRs for every action
(dependabot-core#10884).

Three contract tests keep both closed: every call site must carry its own pin and
all pins must agree; every composite action on disk must fall inside some update
entry's scope; and no glob may overlap the workflows directory. Call sites are
discovered by glob over `.github/`, never a hardcoded list, so a fourth cannot
float unnoticed. Coverage matching uses `PurePosixPath.match`, not
`fnmatch.fnmatch`, because Dependabot expands with `Dir.glob` where `*` does not
cross a `/` — `fnmatch` would false-pass a nested action that Dependabot skips.

Scope, stated honestly: only setup-env restores a conda-lock with micromamba.
packaging.yml/release.yml solve a throwaway `pkgbuild` tool env from create-args
and never exercise the restore path, so a shared value is maintenance
convenience (one number to bump), not a CI-matches-the-signed-release guarantee.
The larger reproducibility gap — constructor, conda-standalone, python-build,
pip and wheel are unpinned in create-args — is untouched here.

Expect one cold environment rebuild on all three OSes on the first run after
merge: v3 changed the cache-key computation. That is not a failure.

Verified: `2.8.1-0` is the current micromamba-releases stable (2026-06-09) and
clears both the #306 and #307 floors; the `-0` build suffix is required by the
action's input regex. All three committed locks are pure conda (0 `manager: pip`
entries), so the mamba#4332 win-64 restore bug is unreachable today. Five
mutations — pin removed, pin diverged, composite entry deleted, glob widened to
overlap, nested action added — each turned the intended guard red.

Refs: PRD §4.1, §12.6, §12.8.
@bioedca
bioedca force-pushed the ci/m9-micromamba-consistency branch from 33b7093 to a5eb13f Compare July 19, 2026 23:12
@bioedca
bioedca merged commit fb5d62a into main Jul 19, 2026
16 checks passed
@bioedca
bioedca deleted the ci/m9-micromamba-consistency branch July 19, 2026 23:31
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