Repository navigation
Stream A: emit_manifest.py + central generate-manifest workflow (#556 + part of #558) - #560
Merged
neuromechanist merged 15 commits intoMay 19, 2026
Conversation
Contributor
Author
Review findings (epic leader)Three reviewers ran (code-reviewer, pr-test-analyzer, silent-failure-hunter). Summary: Critical (block merge)
Test gaps (critical)
Important
Strengths
Fix agent spawning shortly. |
neuromechanist
marked this pull request as ready for review
May 19, 2026 03:58
Contributor
Author
Review findings — resolution mapAll findings from the epic-leader review addressed in the following commits. Per CLAUDE.md "no technical debt carried forward" policy — every finding either fixed or explicitly justified. Critical (block merge)
Test gaps (critical)
Important
Test count25 tests total (16 baseline + 9 new). Notes on implementation choices
Ready for re-review. |
neuromechanist
merged commit May 19, 2026
4318140
into
feature/issue-559-epic-central-manifest
1 check failed
This branch had an error being 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.
Summary
PR-1 Stream A of epic #559 — replaces the in-worker GitHub-API-per-pointer manifest generation (#556) with a git-tree walk run on a managed runner, plus emits the new compact summary.json artifact (#558).
scripts/emit_manifest.py— port of/tmp/manifest_recover.py, productionized; writesmanifest.json(matchesVersionManifestshape exactly),summary.json(matches the schema_version=1.0 contract in.context/epic_central_manifest_state.md), andtotals.json(workflow-internal). Supports--verify-canary/--no-verify-canary; the canary mirrorsverifyGitBackedFilesinbackend/src/services/manifest.ts.scripts/test_emit_manifest.py— 16 real-git assertions, no mocks. Creates a tmp BIDS-shaped repo with a real annex-style symlink, tags itv0.0.0, runs the script, and asserts manifest + summary + totals shapes..github/workflows/generate-manifest.yml—repository_dispatch[generate-manifest](production) +workflow_dispatch(manual). Mints an App installation token scoped to the target dataset repo, shallow-clones at tag, runsemit_manifest.py, uploads both artifacts to S3, POSTs the documented callback (or best-effort/webhooks/manifest-failedon failure).scripts/build_callback_body.py+scripts/build_failure_body.py— tiny helpers that build the callback JSON fromtotals.json, pulled out of the workflow YAML to avoid heredoc indentation pitfalls.Contract surface (locked against
.context/epic_central_manifest_state.md)manifest.jsonshape — unchanged fromVersionManifest(dataset_id,versionwithout leading v,doi,concept_doi,createdISO Z,files)summary.jsonshape —schema_version: "1.0",totals: {files, bytes, subjects},modalities(BIDS datatypes),subjects(sortedsub-XXX),readme: {path}|null, sortedpathss3://nemar/<id>/version/v<X.Y.Z>.jsonand…-summary.jsondataset_id,version,doi,concept_doi,callback_url,callback_token,skip_canary(the last lets Stream B opt out of the raw.githubusercontent.com HEAD check for private repos){dataset_id, version, manifest_url, summary_url, totals: {files, bytes, annex, git}, workflow_run_id}withX-Webhook-Token: <callback_token>Interfaces with Streams B and C
feature/issue-557-stream-b-worker) dispatches with the documentedclient_payloadshape and validatesX-Webhook-Tokenon the callback. Stream A trusts the worker to setskip_canary=truefor private/sandbox datasets.feature/issue-558-stream-c-serving) readsv<X.Y.Z>-summary.jsonfrom S3 and serves it viadata.nemar.org.Out-of-scope (intentionally not touched)
backend/src/services/manifest.ts— Stream B adds the feature-flag dispatch pathbackend/src/routes/data.ts— Stream Cbackend/src/services/github.tsgetWorkflowTemplates()— the central workflow does NOT fan out to dataset reposTest plan
python3 scripts/test_emit_manifest.pypasses locally (16 tests, real git repo, no mocks)nemarOrg/nemar-cli(NEMAR_APP_ID,NEMAR_APP_PRIVATE_KEY,AWS_ACCESS_KEY_ID,AWS_SECRET_ACCESS_KEY,MANIFEST_CALLBACK_SECRET)workflow_dispatchrun againstnm099999withskip_canary=trueto verify clone + S3 upload + callback round-trip (blocked on the secrets step above)nemar admin e2e-testlands with Stream B's dispatch path and Stream C's serving routeCloses part of #556, part of #558.