You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Block on00xxxx datasets from nemar.org sync (alternate_id needed) #265
OpenNeuro-imported datasets (on00xxxx prefix) are being synced to the nemar.org website database as separate entries. Specifically, on000117 was incorrectly added to nemar.org as its own page.
These datasets should NOT be synced directly because they correspond to existing ds00xxxx datasets on nemar.org. They need an alternate_id mapping (to be developed with Choonhan) before they can be synced.
Root Cause
The publish workflow (admin.ts line ~2846) only blocks xx-prefix (sandbox) datasets from publication:
There is no equivalent guard for on-prefix datasets. Neither the publish approve flow nor the admin sync run endpoint (admin.ts line ~4720) checks for the on prefix before calling syncDatasetToNemar().
Additionally, nemar-sync.ts itself has no prefix-based filtering.
Resolution
Immediate fix: Add on-prefix guard in two places:
Publish approve handler (alongside the existing xx check at line 2846)
POST /admin/sync/run endpoint (around line 4742)
Both should return a clear error: "OpenNeuro datasets require alternate_id mapping before nemar.org sync"
Manual cleanup: Delete the on000117 record from nemar.org database tables (dataexplorer_dataset, dataexplorer_extra_dataset, dataexplorer_dataset_channel_count, dataexplorer_supplementary_dataset)
Future work: Implement alternate_id support in the nemar.org datapipeline so on00xxxx datasets can be synced as updates to their corresponding ds00xxxx entries (requires coordination with Choonhan)
Affected Components
backend/src/routes/admin.ts - publish approve + sync run routes
backend/src/services/nemar-sync.ts - sync service (no prefix check)
Activity
Block on-prefix datasets from nemar.org sync
Block on-prefix datasets from nemar.org sync (#277)