Repository navigation
Phase 4: Fix git-annex blind spot in publication pre-screen (#753) - #761
Merged
neuromechanist merged 2 commits intoJun 16, 2026
Conversation
The publication pre-screen falsely blocked annexed datasets as empty (on007523: 'binary data files not found'). decidePrescreenOutcome only let the Worker's authoritative S3 check ADD a block; it could never CLEAR a false data-shortage verdict when the blobs are actually in S3. Make it symmetric: when S3 confirms real objects, strip data-shortage reasons and, if that was the only reason to block, downgrade to pass; non-data reasons (README, Name, Authors) still block. Empty-prefix path unchanged. New no-mock decision tests.
📦 Package PreviewYour package is ready to test! bun install -g nemar-cli@PR761Version: 🤖 Updated on each push. |
/review-pr (3 agents): (1) word-bound the data-shortage regex so a non-data block reason containing 'annex'/'storage'/'files' isn't silently stripped; drop bare 'storage' (only the synthetic s3Missing reason carries it, and that branch never strips). (2) Downgrade block->pass only when real data-shortage reasons were stripped -- never silently clear a reasonless or non-data block. (3) Log the S3 override (verdict + stripped reasons) so a downgrade is auditable. +3 tests.
neuromechanist
merged commit Jun 16, 2026
a73c473
into
feature/issue-749-epic-import-robustness
1 check passed
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The publication pre-screen (
claude -p, #666) falsely blocked valid annexed datasets as having no data. Confirmed on on007523 (445.8 GB / 2508 files in S3): issue #1 "Block: MEG and MRI binary data files not found" — "0.0 MB across 0 annexed files".Root cause (two layers):
run-prescreen.ymlbuilds its data summary from a plain checkout. NEMAR/OpenNeuro store annexed files as mode-120000 symlinks whose target embeds theSHA256E-s<bytes>key.grep -randfind -type fboth skip symlinks, so the summary reported 0 MB / 0 files / no binaries → claude blocks. (Fixed in nemarDatasets/.github#.)decidePrescreenOutcomewas asymmetric — its authoritative S3 check could ADD a block (emptyobjects/) but never CLEAR a false data-shortage block when S3 holds the blobs.This PR is the backend half (layer 2):
decidePrescreenOutcomeis now symmetric: when S3 confirms real objects, strip data-shortage reasons; if that was the only block reason, downgrade to pass. Non-data reasons (README / Name / Authors) still block. Empty-prefix path unchanged.isDataShortageReasonhelper; 11 no-mock decision tests.Note: the metadata-enrichment pipeline is not affected (
enrich-dataset.tsreads S3objects/viagetDatasetS3Stats; on007523's committedsizesis already477.7 GB).Closes #753
Part of epic #749
Test plan
bun test(262 pass, incl. 11 new prescreen-decision cases);tscclean.set -eabort.pass; close false issue Add proper test coverage measurement (90%+ target) #1.