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
Data integrity: 53 published datasets (with DOIs) have missing GitHub repos #883
Surfaced during the #869 HED backfill: 54 datasets are active/public in D1 with a github_repo set, but the GitHub repo returns 404 (does not exist). Of the 54:
53 have a concept DOI (with_doi=53) and 53 have published dataset_versions rows — i.e. they were genuinely published, not failed/empty uploads.
All 54 have file_size > 0.
source='openneuro' = 0 (all native nm).
Created in a tight window: 2026-03-18 to 2026-03-28.
The 54th is nm099999 (the disposable E2E test dataset — expected, ignore).
So this is a data-loss / integrity incident: 53 published datasets with permanent EZID DOIs lost their GitHub metadata repos. Their DOI landing pages and ww2 detail pages will break (the repo is the metadata source).
S3 data: unknown — AWS session was expired at investigation time. If s3://nemar/<id>/objects + version/ manifests survive, the repos are likely RECONSTRUCTABLE (re-create repo from the S3 version manifest). Check first (aws s3 ls s3://nemar/nm000192/).
GitHub 90-day recovery: created ~March, now June -> the 90-day deleted-repo window has likely expired, so GitHub-side restore is probably unavailable.
AWS re-authed; checked S3 for all 53 (excl. nm099999 test):
53/53 have version manifests (s3://nemar/<id>/version/*.json)
53/53 have git-annex objects (s3://nemar/<id>/objects/)
Also present: archives/ (zip snapshots) and zarr/ (viewer data)
So only the GitHub metadata repos are gone; the data + version manifests + archives + zarr all survive in S3. The repos are reconstructable from the S3 version manifests (the same path used to restore nm000103-107).
Revised recovery plan
Recreate each nemarDatasets/<id> repo from its S3 version/ manifest (dataset_description.json + BIDS tree + git-annex pointers -> objects/). Re-point the existing concept DOI's metadata if needed.
Then reset + re-run nemar admin hed-sweep so the recovered repos finally classify for HED.
GitHub 90-day restore is likely expired, but it's moot — recreate-from-S3 is the better path and the data is intact.
Correction: deletion was RECENT — GitHub restore window likely still OPEN
The D1 created_at (March) is when the dataset record was created, NOT when the repo was deleted. The S3 artifacts tell the real timeline:
nm000192/version/v1.0.0.json written 2026-06-02
nm000192/version/v1.0.0-records.json written 2026-06-07
Both are generated from the live repo, so the repos existed in early June. The repos 404 now (June 30) -> deleted within the last ~3 weeks -> GitHub's 90-day deleted-repo restore is almost certainly still available.
Recommended recovery (in order)
Restore the deleted repos via GitHub (org Settings -> deleted repositories, or the restore endpoint) while the 90-day window is open. Cleanest — preserves full git history. Do this SOON.
If any window has closed, reconstruct from the S3 version/ manifest (confirmed: every file -> git-annex SHA256E key + size + checksum, pointing at objects/).
Then reset + re-run nemar admin hed-sweep so the recovered repos classify for HED.
Prevent recurrence
Repos deleted ~mid-June with no D1 cleanup is the signature of an automated deletion. Confirm whether the stale-cron path (#663 guard) or another job did this — 53 published, DOI'd datasets should never be auto-deletable.
The actual deleter is a script run by a system crontab (not git-tracked), firing ~03:00 UTC daily, UA NEMAR-API, using the now-dead PAT. Rotating the PAT stops the damage, but the cron itself is still out there and must be found + removed:
ssh hallu "crontab -l"
ssh mcm "crontab -l"
look for a 0 3 * * * (or 0 20 PT) job doing gh repo delete / deleteRepository against the MOABB ids.
Keeping this issue open until that job is located and deleted.
The deleter was two leftover NEMAR backend Workers on the retired personal Cloudflare account (nemar-api + nemar-api-dev, serving legacy api.osc.earth/nemar), never torn down after the SCCN migration (#314). Each had:
a daily cron 0 3 * * * (UTC) → the 03:00:1X UTC audit-log fingerprint,
the old admin PAT (token_id 2058954005) as GITHUB_ADMIN_PAT → UA NEMAR-API, and stopped the moment the PAT was rotated,
S3/D1 bindings pointing at the dead personal account → their delete-cascade destroyed the shared GitHub repo (live PAT) while S3+D1 steps hit dead resources, which is exactly why prod D1 + S3 survived.
Eliminated: crons removed, then all 4 nemar-* workers + both nemar D1s + both Vectorize indexes deleted from the personal account (details in #314). api.osc.earth/nemar/* now 404s.
Also hardened during the incident: 53 repos restored, org set members_can_delete_repositories=false, default_repository_permission=read.
Note: post-hoc, neither personal D1 still contains nm000192-346 and both compute stale-count 0, so the exact per-id selection query couldn't be reconstructed after teardown — immaterial now that the deployment is gone.
Resolved. Root cause = two leftover NEMAR Workers on the retired personal CF account (nemar-api/nemar-api-dev, cron 0 3 + old admin PAT), from the incomplete Phase 11 teardown (#332). Fully torn down (workers + D1 + Vectorize + secrets); 53 repos restored; org hardened (members_can_delete_repositories=false, default_repository_permission=read). Not a breach — self-inflicted decommission gap. Full write-up in-thread and on #314/#332.
Activity
neuromechanist commentedon Jun 30, 2026
Good news: all 53 are RECOVERABLE — no data loss
AWS re-authed; checked S3 for all 53 (excl. nm099999 test):
s3://nemar/<id>/version/*.json)s3://nemar/<id>/objects/)archives/(zip snapshots) andzarr/(viewer data)So only the GitHub metadata repos are gone; the data + version manifests + archives + zarr all survive in S3. The repos are reconstructable from the S3 version manifests (the same path used to restore nm000103-107).
Revised recovery plan
nemarDatasets/<id>repo from its S3version/manifest (dataset_description.json + BIDS tree + git-annex pointers -> objects/). Re-point the existing concept DOI's metadata if needed.nemar admin hed-sweepso the recovered repos finally classify for HED.GitHub 90-day restore is likely expired, but it's moot — recreate-from-S3 is the better path and the data is intact.
neuromechanist commentedon Jun 30, 2026
Correction: deletion was RECENT — GitHub restore window likely still OPEN
The D1
created_at(March) is when the dataset record was created, NOT when the repo was deleted. The S3 artifacts tell the real timeline:nm000192/version/v1.0.0.jsonwritten 2026-06-02nm000192/version/v1.0.0-records.jsonwritten 2026-06-07Both are generated from the live repo, so the repos existed in early June. The repos 404 now (June 30) -> deleted within the last ~3 weeks -> GitHub's 90-day deleted-repo restore is almost certainly still available.
Recommended recovery (in order)
version/manifest (confirmed: every file -> git-annex SHA256E key + size + checksum, pointing atobjects/).nemar admin hed-sweepso the recovered repos classify for HED.Prevent recurrence
Repos deleted ~mid-June with no D1 cleanup is the signature of an automated deletion. Confirm whether the stale-cron path (#663 guard) or another job did this — 53 published, DOI'd datasets should never be auto-deletable.
neuromechanist commentedon Jun 30, 2026
Status update — repos restored + re-swept (issue stays OPEN: culprit not yet found)
Recovery done
token_id 2058954005rotated (kill switch). Prod is unaffected — it authenticates via the GitHub App, not this PAT.HED re-sweep (the #869 backfill that surfaced this)
Re-ran
POST /admin/datasets/hed-sweepover the restored set. Clean finish — zero 404s, zero unknowns:has_hed=1, 5has_hed=0(as expected — the MOABB/BCI batch carriesHEDVersion+ HED-annotatedevents.json).has_hed=1: 187,has_hed=0: 553, NULL/unclassified: 0 (740 datasets, 100% coverage).Still open — root cause NOT identified
The actual deleter is a script run by a system
crontab(not git-tracked), firing ~03:00 UTC daily, UANEMAR-API, using the now-dead PAT. Rotating the PAT stops the damage, but the cron itself is still out there and must be found + removed:ssh hallu "crontab -l"ssh mcm "crontab -l"0 3 * * *(or0 20PT) job doinggh repo delete/deleteRepositoryagainst the MOABB ids.Keeping this issue open until that job is located and deleted.
neuromechanist commentedon Jul 1, 2026
Root cause FOUND and eliminated
The deleter was two leftover NEMAR backend Workers on the retired personal Cloudflare account (
nemar-api+nemar-api-dev, serving legacyapi.osc.earth/nemar), never torn down after the SCCN migration (#314). Each had:0 3 * * *(UTC) → the03:00:1X UTCaudit-log fingerprint,token_id 2058954005) asGITHUB_ADMIN_PAT→ UANEMAR-API, and stopped the moment the PAT was rotated,Eliminated: crons removed, then all 4
nemar-*workers + both nemar D1s + both Vectorize indexes deleted from the personal account (details in #314).api.osc.earth/nemar/*now 404s.Also hardened during the incident: 53 repos restored, org set
members_can_delete_repositories=false,default_repository_permission=read.Note: post-hoc, neither personal D1 still contains nm000192-346 and both compute stale-count 0, so the exact per-id selection query couldn't be reconstructed after teardown — immaterial now that the deployment is gone.
neuromechanist commentedon Jul 1, 2026
Resolved. Root cause = two leftover NEMAR Workers on the retired personal CF account (
nemar-api/nemar-api-dev, cron0 3+ old admin PAT), from the incomplete Phase 11 teardown (#332). Fully torn down (workers + D1 + Vectorize + secrets); 53 repos restored; org hardened (members_can_delete_repositories=false,default_repository_permission=read). Not a breach — self-inflicted decommission gap. Full write-up in-thread and on #314/#332.