Repository navigation
Centralize version-check (completes Phase 4 of #601) - #1072
Merged
neuromechanist merged 2 commits intoAug 19, 2026
Merged
Conversation
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.
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
version-checkis 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-checkcan never be produced — so PRs stayBLOCKEDforever even thoughRun BIDS Validationalready passes via the central workflow. That is currently blocking 37 sourcedata-enrichment PRs.This converts the per-repo template into a dispatch shim, mirroring
bidsValidationexactly:repository_dispatch[run-version-check]atnemarDatasets/.githubwith{dataset_id, ref, head_sha, pr_number}run-version-check.ymlmints a per-repo App token, comparesVersionindataset_description.jsonbetween the branch andmain, and posts the requiredversion-checkcheck-run onto the PR head SHACompanion central workflow: nemarDatasets/.github#91 (merged and verified — nm000192 went
BLOCKED→CLEANwith 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_SNIPPETsemver-increment rule should be preserved, it belongs in the central workflow — happy to move it there.