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
Fast-follow to #990 (epic #989 Phase 2). Step 4c in src/lib/import-openneuro.ts resets a re-import's local main onto origin/main so the metadata seed + push fast-forwards. It assumes the re-import is the SAME dataset version as the first import (the #967 recovery case: re-copy empty S3 data for a version already imported once).
If OpenNeuro published a genuinely NEW snapshot between the first import and the retry, bidsDesc/openNeuroDoi (read from the fresh clone before Step 4c) reflect the NEWER content, but Step 6 commits that metadata on top of origin/main's OLDER (reset-restored) tree. Net effect is orphaned S3 copies (the copy-phase manifest references keys not pointed to by any file in the pushed tree) rather than tree corruption. Today this is a comment-only contract: nothing loudly fails if the assumption is violated.
Bounded in practice: prepareImport is only re-entered via the admin-triggered import retry / sharded-CI-workflow path (auto-import cron is disabled since #967), so the window is deliberate recovery ops on datasets flagged for a data-only re-copy. But a cheap loud guard would be safer than a silent reset.
Proposed: before trusting the Step 4c reset, compare a content/version fingerprint (e.g. the upstream default-branch SHA, or a hash of dataset_description.json) between the fresh clone and origin/main; if they differ, refuse the silent reset and fail loud (this is a new-version import, out of the recovery path's scope). Low-risk, no migration.
Found in the Phase 2 code review; explicitly deferred as a fast-follow rather than blocking #990.
Activity
Phase 2: Fix git-divergence on OpenNeuro re-import (#994)
docs: ADR 0111, narrow the #993 guard
docs: align re-pull design record with ADR 0111
docs: ADR 0111, guard reads the tag as parsed
docs: bring the ADR and CHANGELOG up to date
docs: bring the ADR and CHANGELOG up to date
Phase 3: tag-pinned imports and upstream-moved guard (#1924)