Repository navigation
Description
Goal
Move the data-quality artifacts that live on hallu (/data/qumulo/openneuro/processed/<id>/) into S3 and expose them via the same data.nemar.org Worker that serves dataset bytes. The new web frontend (nemarOrg/website#4) needs them.
Sibling to: nemarOrg/website#4 (Phase 3 of the redesign epic, nemarOrg/website#1).
What's on hallu today
For each of the 269 processed datasets at /data/qumulo/openneuro/processed/<id>/:
<id>/
dataqual.json aggregate stats for the dataset
<id>_histogram.png / .svg dataset-level distribution figure
code/ MATLAB pipeline scripts (skip)
logs/ per-step logs + status csvs (skip)
sub-XXX/
eeg/
sub-XXX_task-Y_eeg_dataqual.json per-file QA summary
sub-XXX_task-Y_eeg_eegplot_mid-sample.svg
sub-XXX_task-Y_eeg_icaact.svg
sub-XXX_task-Y_eeg_icahist.svg
sub-XXX_task-Y_eeg_icamaps.svg
sub-XXX_task-Y_eeg_spectopo.svg
There's also a citation_dashboard/ and badges/ at the root of processed/ — those are Phase 4 territory, NOT this issue.
Deliverables
1. scripts/hallu-qa-sync.sh
Companion to the existing hallu-sync.sh that syncs annexed dataset bytes. This one mirrors the QA tree to S3.
- Source:
/data/qumulo/openneuro/processed/<id>/ - Target:
s3://nemar/<id>/qa/ - Mirror semantics, not transform: file paths stay the same as on hallu.
dataqual.json→qa/dataqual.json,sub-001/eeg/foo_dataqual.json→qa/sub-001/eeg/foo_dataqual.json. - Skip
code/,logs/,*.mat— those are pipeline internals. - Manifest: append-only log at
/data/qumulo/openneuro/.nm-qa-sync-manifest.json(mirror the existing.nm-sync-manifest.jsonpattern) recording last-synced timestamp per dataset. - Cron:
15 * * * *(offset 15 minutes from the bytes-sync at0 * * * *). - Manual run:
ssh hallu /data/qumulo/openneuro/nemar-cli/scripts/hallu-qa-sync.sh --dataset ds002718 --verbose
2. New Worker route: GET data.nemar.org/<id>/qa/*path
Add to backend/src/routes/data.ts alongside the existing /<id>/<ver>/<path> route.
- 302 to a presigned S3 URL for the requested path under
s3://nemar/<id>/qa/ - Same visibility gate as the rest of the data route: public datasets only, private/unknown 404 with no leak
- Same content-negotiation pattern:
Accept: application/jsonreturns JSON;Accept: text/htmlreturns a directory index (reuserenderIndexHtml) - Cache-Control
public, max-age=300(QA artifacts are stable per dataset version)
Notes:
- The QA tree is NOT version-locked — it reflects whichever version the hallu pipeline most recently processed. That's OK for Phase 3; the website expects
/<id>/qa/...not/<id>/<v>/qa/.... If we ever need per-version QA, add aqa/<v>/...sub-prefix later without breaking the contract.
3. Optional: HED summary endpoint
If enrichment_json.hed_summary in D1 isn't already exposed in data.nemar.org/<id>/metadata.json, surface it OR write a separate data.nemar.org/<id>/qa/hed-summary.json that the website's wordcloud renderer can consume directly.
Check existing data-router.ts first — metadata.json may already include this.
Acceptance
aws s3 ls s3://nemar/ds002718/qa/shows the synced treecurl https://data.nemar.org/ds002718/qa/dataqual.json→ 302 → presigned S3 GET → original JSON contentcurl -H 'Accept: text/html' https://data.nemar.org/ds002718/qa/returns a directory listingcurl https://data.nemar.org/<private-id>/qa/anything→ 404, no leak- Cron runs hourly, manifest updates, only diff-syncs (idempotent)
- New sync logged to the existing structured logs
Out of scope
- Generating NEW QA artifacts. This is a sync + serve issue, the pipeline that produces them stays where it is.
- The website's chart + HED-wordcloud + per-file modal rendering — that's in
nemarOrg/website#4.
Related
nemarOrg/website#1(redesign epic) andnemarOrg/website#4(Phase 3 website side — blocked on this issue)nemarOrg/nemar-cli#449(the data.nemar.org epic that introduced the routing pattern)- Existing
scripts/hallu-sync.shas the reference for the cron + manifest shape
Activity
Phase 3: QA artifact sync from hallu + data.nemar.org/<id>/qa/* route (…
neuromechanist commentedon May 16, 2026
Shipped via PR #519 (epic→dev). Code is on
devand will flow tomainin the next dev→main cycle.