Skip to content

Relocate central manifest workflow to nemarDatasets/.github (#564) - #565

Merged
neuromechanist merged 2 commits into
devfrom
feature/issue-564-repoint-manifest
May 19, 2026
Merged

neuromechanist merged 2 commits into
devfrom
feature/issue-564-repoint-manifest

Conversation

@neuromechanist

Copy link
Copy Markdown
Contributor

Summary

Follow-up to epic #559 / PR #563. Companion to nemarDatasets/.github#1.

Repoints `CENTRAL_WORKFLOW_REPO` from `nemarOrg/nemar-cli` (constrained GitHub Free, currently billing-blocked) to `nemarDatasets/.github` (GitHub Team plan, more Actions minutes, natural home for dataset-shaped orchestration). The workflow file + Python scripts now live alongside the existing `onboard-openneuro.yml` precedent at `nemarDatasets/.github`.

Done in coordination with nemarDatasets/.github#1, which adds the files to that repo.

Changes

Worker code:

  • `backend/src/services/github.ts`: `CENTRAL_WORKFLOW_REPO = "nemarDatasets/.github"` (was `"nemarOrg/nemar-cli"`) + docstring updates
  • `backend/src/routes/webhooks.ts`: replaced `getNemarOrgToken(env)` with `getDatasetsToken(env)` (the App is installed on both orgs via Epic Epic: migrate GITHUB_ADMIN_PAT to a GitHub App installation token #432; dataset org installation is now the right pick since the central workflow runs there)
  • `backend/src/services/github-auth.ts`: removed `getNemarOrgAuth` + `getNemarOrgToken` (now-dead code, only ever called by the manifest dispatch path)

Comment + doc:

  • `backend/src/types/bindings.ts` — `MANIFEST_VIA_CENTRAL_WORKFLOW` docstring points at nemarDatasets/.github
  • `backend/src/db/migrations/0025_manifest_jobs.sql` — same
  • `backend/src/routes/data.ts` — `summaryJsonHandler` JSDoc

Deletes (moved to nemarDatasets/.github):

  • `.github/workflows/generate-manifest.yml`
  • `scripts/emit_manifest.py`
  • `scripts/build_callback_body.py`
  • `scripts/build_failure_body.py`
  • `scripts/test_emit_manifest.py`

CI:

  • `.github/workflows/test.yml` — drops the `python-unit-test` job + `scripts` paths-filter (the Python test job moved to `nemarDatasets/.github/.github/workflows/test-emit-manifest.yml`)

State doc:

  • `.context/epic_central_manifest_state.md` — updates secrets section to nemarDatasets org-level + new ops sequence. Notes most required secrets already exist (used by `onboard-openneuro.yml`); only `MANIFEST_CALLBACK_SECRET` is genuinely new.

Test plan

  • `bun run typecheck` clean (backend)
  • 69 manifest tests pass (callback-token, jobs-migration, callback-body-validation, flag-toggle)
  • After both PRs merge: `gh workflow run generate-manifest.yml --repo nemarDatasets/.github -f dataset_id=nm099999 ...` succeeds end-to-end
  • Then flip `MANIFEST_VIA_CENTRAL_WORKFLOW=true` on SCCN dev and run `nemar admin e2e-test --verbose`

Required ops before merging both

  1. Verify `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, `NEMAR_APP_ID`, `NEMAR_APP_PRIVATE_KEY` are at nemarDatasets ORG level with "all repos" visibility (per memory, they should be)
  2. `gh secret set MANIFEST_CALLBACK_SECRET --org nemarDatasets --visibility all`
  3. Mirror same value: `wrangler secret put MANIFEST_CALLBACK_SECRET` on Worker (both prod + dev, neuromechanist + sccn)

Closes #564 (worker side). nemarDatasets/.github#1 closes it on the workflow side.

neuromechanist added a commit to nemarDatasets/.github that referenced this pull request May 19, 2026
Companion to nemarOrg/nemar-cli#564. Relocates the central manifest generation workflow + Python scripts from nemarOrg/nemar-cli (billing-constrained) to here (GitHub Team allowance). 33 Python tests pass. After nemarOrg/nemar-cli#565 also lands, the worker will dispatch repository_dispatch[generate-manifest] at this repo.
@neuromechanist
neuromechanist merged commit 211599c into dev May 19, 2026
7 of 9 checks passed
@neuromechanist
neuromechanist deleted the feature/issue-564-repoint-manifest branch May 19, 2026 05:09

This branch had an error being deployed

1 failed deployment
npm — 1aaf9af3 Deployed May 19, 2026 by neuromechanist via publish #1034
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