Repository navigation
Description
Motivation
The publicly-served data.nemar.org/<id>/<version>/manifest.json is 10+ MB for typical BIDS-EEG datasets because the worker injects a presigned S3 URL into every file entry on each request (~500-800 bytes × 14k files). The website needs only paths + readme pointer + totals to render the detail page, but pays the full bandwidth + worker CPU cost every time.
Companion website issue: nemarOrg/website#29 (consumer side, fallback-safe).
Proposal
Emit a compact summary at manifest creation time, store as a separate S3 object, serve via a new lightweight route.
Artifact
s3://nemar/<id>/version/v<X.Y.Z>-summary.json (typically 50-200 KB regardless of dataset size)
{
"schema_version": "1.0",
"dataset_id": "on005261",
"version": "1.0.0",
"doi": "10.82901/nemar.on005261.v1.0.0",
"concept_doi": "10.82901/nemar.on005261",
"created": "2026-05-18T...Z",
"totals": { "files": 14536, "bytes": 241618664825, "subjects": 17 },
"modalities": ["meg", "beh"],
"subjects": ["sub-01", "sub-02", ...],
"readme": { "path": "README.md" } | null,
"paths": ["README.md", "dataset_description.json", "sub-01/meg/...", ...]
}
Critically:
- No presigned URLs — the summary is path-only. Downloads use the existing
data.nemar.orgfile routes that already sign on demand. - No per-entry checksum/size — totals only. Sufficient for the page's needs.
Implementation tasks
-
Generation: extend the manifest builder (
/tmp/manifest_recover.pyis the prototype used today for the 5 stuck-datasets recovery; this logic moves into the central publish workflow per Centralize manifest+archive generation: workflow_dispatch on one central repo (zero YAML in dataset repos) #557) to also emit summary alongside manifest. Sameaws s3 cpplumbing. -
Serving: add
GET /<id>/<version>/summary.jsonroute inbackend/src/routes/data.ts. Readss3://nemar/<id>/version/v<X.Y.Z>-summary.jsonand serves withCache-Control: public, max-age=300, s-maxage=86400, stale-while-revalidate=86400. Static-passthrough cacheable since there are no per-request fields. -
Backfill: one-shot script invocation against the 5 recently-recovered datasets (nm000103, nm000106, nm000166, on004362, on005261) so the website's fast path activates for them immediately.
Dependencies
- Replace API-per-pointer manifest generation with git-clone tree walk (today's quota burn) #556 (replace API-per-pointer manifest gen with git-clone walk) — summary lives in the same generator; both should be implemented together.
- Centralize manifest+archive generation: workflow_dispatch on one central repo (zero YAML in dataset repos) #557 (central workflow_dispatch) — summary generation runs in the same workflow step.
Acceptance
- Every new publish writes both
v<X.Y.Z>.jsonandv<X.Y.Z>-summary.jsonto S3 -
data.nemar.org/<id>/<version>/summary.jsonreturns 200 with the documented shape - Backfill run for the 5 recovered datasets succeeds; their summary.json files exist and are < 500 KB each
- Existing manifest.json route unchanged (tooling that wants per-file presigned URLs keeps working)
- No new infrastructure (no daemon, no queue, no external host)
Activity
feat(dataset): consume compact summary.json with manifest fallback
Stream A: emit_manifest.py + central generate-manifest workflow (#556 …
Stream C: summary.json route + 5-dataset backfill (#558)
Epic #559: Centralize manifest generation (PR-1 of #557 + #556 + #558) (
neuromechanist commentedon May 19, 2026
Implementation landed in #563 (commit 8b2510d on dev).
Done:
Remaining (post-secrets-setup, ops task):
bash scripts/backfill-summaries.shafter secrets are configured on nemarOrg/nemar-cli, to emit summary.json for nm000103/nm000106/nm000166/on004362/on005261Keep open until the backfill ops step runs and the 5 summaries are verified at
https://data.nemar.org/<id>/<version>/summary.json.