Repository navigation
Phase 3: centralize generate-archive workflow - #609
Merged
neuromechanist merged 2 commits intoMay 23, 2026
Merged
neuromechanist merged 2 commits into
neuromechanist merged 2 commits into
Conversation
….github Closes #608. Phase 3 of epic #601. Removes the per-repo .github/workflows/generate-archive.yml that shipped to 123 dataset repos via deployWorkflows() and replaces it with a retarget of the existing triggerArchiveGeneration helper: - triggerArchiveGeneration() now dispatches against CENTRAL_WORKFLOW_REPO (nemarDatasets/.github) instead of the dataset repo. The legacy repo parameter is preserved in the signature for callsite stability (CLI + admin endpoints still pass the dataset repo name); it's logged for traceability but no longer addresses the dispatch target. - The generateArchive template string and its entry in getWorkflowTemplates() are removed. - workflow-yaml.test.ts updated: the archiver-pin test collapses to a single negative assertion (template absence), generate-archive.yml removed from the read-only-templates list since it ships with no template anymore. - scripts/strip-per-repo-workflow.ts's WORKFLOW_ISSUE_MAP gains a generate-archive.yml entry so default-anchor selection works on the Phase 3 invocation. - New test test/trigger-archive.test.ts (5 cases) — mirrors trigger-enrichment + trigger-version-doi. Asserts the dispatch retargets to .github, client_payload shape is unchanged (dataset_id/version/public), non-2xx throws, and the legacy repo parameter is tolerated when divergent from dataset_id. Pairs with nemarDatasets/.github#10 which lands the central run-generate-archive workflow AND retargets run-version-doi's trigger-archive job's dispatch to .github.
📦 Package PreviewYour package is ready to test! bun install -g nemar-cli@PR609Version: 🤖 Updated on each push. |
Code-review findings (docs-only): 1) docs/operations/access-policies.md listed generate-archive.yml under per-dataset workflows shipped via getWorkflowTemplates() — stale after Phase 3. Replaces with a new entry for the central run-generate-archive.yml on nemarDatasets/.github. 2) docs/guides/github-app-setup.md justified the Actions:Read & write permission with 'dataset-repo CI can dispatch generate-archive' — incorrect after Phase 3 since the dispatch flows Worker → .github (or central workflow → .github). Updated to reference the cross-workflow dispatch pattern on .github.
neuromechanist
merged commit May 23, 2026
3f7ad2f
into
feature/issue-601-epic-centralize-workflows
1 check passed
This was referenced May 23, 2026
5 tasks done
This branch was previously deployed
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.
Closes #608. Phase 3 of epic #601.
Summary
Move the per-repo
.github/workflows/generate-archive.yml(123 dataset repos) into a single shared workflow onnemarDatasets/.github. The legacy template was alreadyrepository_dispatch-driven, so this is the lowest-friction phase — just a retarget of the dispatch URL insidetriggerArchiveGeneration.Pairs with nemarDatasets/.github#10 which lands the central workflow AND retargets the trigger-archive job in
run-version-doi.yml(Phase 2) so the v→DOI→archive chain continues to work after centralization.Changes
backend/src/services/github.tstriggerArchiveGenerationnow POSTs to${CENTRAL_WORKFLOW_REPO}/dispatches(i.e.nemarDatasets/.github) instead of the dataset repo. Legacyrepoparameter preserved in the signature (CLI/admin callers still pass it), now logged for traceability rather than addressing the dispatch target.generateArchivetemplate string and its entry ingetWorkflowTemplates()are removed. New dataset imports no longer ship the legacy file.scripts/strip-per-repo-workflow.ts—WORKFLOW_ISSUE_MAPgainsgenerate-archive.yml: '608'so the default invocation anchors back to this PR.test/trigger-archive.test.ts(new, 5 cases) — fake-GitHub fixture asserts the dispatch retargets to .github, client_payload shape is unchanged, non-2xx throws, and the legacy repo parameter is tolerated when divergent.test/workflow-yaml.test.ts— the archiver-pin test collapses to a single negative assertion (template absence); read-only-templates list dropsgenerate-archive.yml.Cutover
triggerArchiveGenerationcalls hit .github.bun run scripts/strip-per-repo-workflow.ts --workflow generate-archive.yml— operator sweeps the legacy file from all 123 dataset repos.nm099999(full DOI + archive chain); expect one run-version-doi run + one run-generate-archive run on .github, no per-repo runs.Test plan
bun run lintcleanbun run typecheckcleanbun run scripts/strip-per-repo-workflow.ts --workflow generate-archive.yml --dry-run nm000132smoke-testedgh workflow run run-generate-archive.yml --repo nemarDatasets/.github -f dataset_id=nm099999 -f version=0.0.0-rc2produces a green runtriggerArchiveGenerationfrom a test endpoint or the CLI should dispatch to .github, not the dataset repo (verified bygh run list --repo nemarDatasets/.github --workflow run-generate-archive.yml)