Repository navigation
feat(ci): add central run-generate-archive workflow - #10
Merged
neuromechanist merged 3 commits intoMay 23, 2026
Merged
Conversation
Closes #9. Phase 3 of nemarOrg/nemar-cli#601. Sibling to #5 (run-enrichment) and #8 (run-version-doi). Lifts the per-repo generate-archive.yml template — already repository_dispatch-driven so the Worker just retargets the dispatch URL.
Phase 3 centralizes generate-archive on .github. The trigger-archive job in run-version-doi.yml previously dispatched against the dataset repo (where the legacy per-repo workflow listened). Update to dispatch against nemarDatasets/.github with the same client_payload, and re-mint the App token with repositories:.github so the dispatch call has actions:write on the right repo. The central run-generate-archive workflow mints its own per-dataset token internally for the checkout step.
4 of 6 tasks
Code-review findings: 1) npm install violated the project's no-npm policy (CLAUDE.md). Switch to bun via oven-sh/setup-bun@v2 — bun installs CommonJS packages correctly, and NODE_PATH pointed at the resulting node_modules lets the Node 20 streaming script still run unchanged. 2) When skipped > 0 (annexed files missing from S3), the script was logging a warning and exiting 0, so a partial zip silently became the downloadable artifact. Set process.exitCode = 1 in that branch so the Actions run goes red and the operator is forced to investigate. The S3 upload is already finalized at that point, so the partial artifact is on S3 either way; the red mark is the operator signal, not a rollback.
This was referenced May 23, 2026
neuromechanist
added a commit
to nemarOrg/nemar-cli
that referenced
this pull request
May 23, 2026
….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.
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 #9. Phase 3 of nemarOrg/nemar-cli#601, sibling to #5 (run-enrichment) and #8 (run-version-doi).
What
New
.github/workflows/run-generate-archive.yml— central archive-generation workflow. Lifts the per-repogenerate-archive.ymlthat previously shipped to every dataset repo. Alreadyrepository_dispatch[generate-archive]-driven, so this is the lowest-friction phase: the Worker'striggerArchiveGenerationjust retargets its POST URL from the dataset repo tonemarDatasets/.github(handled in nemarOrg/nemar-cli#609).dataset_idshape and rejects a leadingvonversion(S3 key isv<bare>).client_payload.dataset_id, checks out the target dataset repo atv<VERSION>.archiver+@aws-sdk/lib-storagemultipart upload as the legacy template — disk usage stays constant regardless of dataset size.permissions: {}at the job level.workflow_dispatchwithdataset_id+versioninputs for manual recovery.Test plan
After merge:
Expect green; archive at
s3://nemar/nm099999/archives/v0.0.0-rc2.zip.