Skip to content

Centralize version-check (completes Phase 4 of #601) - #1072

Merged
neuromechanist merged 2 commits into
nemarOrg:devfrom
bruAristimunha:central-version-check
Aug 19, 2026
Merged

neuromechanist merged 2 commits into
nemarOrg:devfrom
bruAristimunha:central-version-check

Conversation

@bruAristimunha

Copy link
Copy Markdown
Contributor

version-check is a required status check in the NEMAR branch protection ruleset, but it still shipped as a full per-repo workflow while BIDS validation was converted to a shim in Phase 4 (#610).

On any dataset repo where per-repo Actions do not run, version-check can never be produced — so PRs stay BLOCKED forever even though Run BIDS Validation already passes via the central workflow. That is currently blocking 37 sourcedata-enrichment PRs.

This converts the per-repo template into a dispatch shim, mirroring bidsValidation exactly:

  • fires repository_dispatch[run-version-check] at nemarDatasets/.github with {dataset_id, ref, head_sha, pr_number}
  • the central run-version-check.yml mints a per-repo App token, compares Version in dataset_description.json between the branch and main, and posts the required version-check check-run onto the PR head SHA

Companion central workflow: nemarDatasets/.github#91 (merged and verified — nm000192 went BLOCKED → CLEAN with both required checks sourced centrally).

Note the version-comparison semantics are simplified to the original per-repo logic (bumped vs not). If the stricter VERSION_COMPARE_SNIPPET semver-increment rule should be preserved, it belongs in the central workflow — happy to move it there.

version-check is a REQUIRED status check in the NEMAR branch protection
ruleset, but it shipped as a full per-repo workflow. On any dataset repo
where per-repo Actions do not run, the check can never be produced, so PRs
stay BLOCKED indefinitely even when Run BIDS Validation already passes
centrally.

This mirrors the BIDS Validation shim (Phase 4, nemarOrg#610): the per-repo file now
just dispatches repository_dispatch[run-version-check] at nemarDatasets/.github,
where run-version-check.yml performs the comparison and posts the required
'version-check' check-run back onto the PR head SHA.

Central workflow: nemarDatasets/.github#91 (merged).
Unblocked 37 sourcedata-enrichment PRs that were stuck on this.
Phase 4 turns version-check.yml into a dispatch shim, so it must mint an
App token scoped to .github to reach repos/nemarDatasets/.github/dispatches.
That broke 'read-only / AWS-only templates stay on the auto-token', which
asserted the template contains no create-github-app-token step.

version-check.yml was that list's only remaining entry (bids-validation and
generate-archive left in earlier phases), so the test cannot be repaired --
only retired. Its coverage moves into the two existing shim tests, which are
strictly stronger: they pin the token scoping (owner + repositories:
.github), the mint-step ordering, the absence of secrets.GITHUB_TOKEN, and
the dispatch event_type.

Verified the added coverage is not vacuous: mis-scoping the token fails
'shim templates mint App tokens...', and changing the event_type fails
'shim templates dispatch to nemarDatasets/.github'. Suite: 12 pass, 0 fail.
@neuromechanist
neuromechanist changed the base branch from main to dev August 19, 2026 01:47
@neuromechanist

Copy link
Copy Markdown
Contributor

Adjudicated the failing checks: api-test and integration-dev fail because this is a fork PR, which receives no repository secrets (TEST_ADMIN_API_KEY/TEST_USER_API_KEY are empty in the logs) — unrelated to the change. Verified locally on a merge with current dev: all 12 workflow-yaml tests pass, backend suite 896 pass, tsc clean. The shim matches the established Phase 4 pattern (ADR 0020) and the central receiver run-version-check.yml exists in nemarDatasets/.github. Retargeted to dev per repo convention (features land on dev; rollout to dataset repos remains an explicit 'nemar admin ci sync'). Merging.

@neuromechanist
neuromechanist merged commit 803c33f into nemarOrg:dev Aug 19, 2026
7 of 9 checks passed
@neuromechanist neuromechanist mentioned this pull request Aug 19, 2026
7 of 8 tasks
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