Skip to content

Phase 4: Fix git-annex blind spot in publication pre-screen (#753) - #761

Merged
neuromechanist merged 2 commits into
feature/issue-749-epic-import-robustnessfrom
feature/issue-753-phase4-annex-sizes
Jun 16, 2026
Merged

neuromechanist merged 2 commits into
feature/issue-749-epic-import-robustnessfrom
feature/issue-753-phase4-annex-sizes

Conversation

@neuromechanist

Copy link
Copy Markdown
Contributor

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):

  1. run-prescreen.yml builds its data summary from a plain checkout. NEMAR/OpenNeuro store annexed files as mode-120000 symlinks whose target embeds the SHA256E-s<bytes> key. grep -r and find -type f both skip symlinks, so the summary reported 0 MB / 0 files / no binaries → claude blocks. (Fixed in nemarDatasets/.github#.)
  2. The Worker's decidePrescreenOutcome was asymmetric — its authoritative S3 check could ADD a block (empty objects/) but never CLEAR a false data-shortage block when S3 holds the blobs.

This PR is the backend half (layer 2):

  • decidePrescreenOutcome is 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.
  • New isDataShortageReason helper; 11 no-mock decision tests.

Note: the metadata-enrichment pipeline is not affected (enrich-dataset.ts reads S3 objects/ via getDatasetS3Stats; on007523's committed sizes is already 477.7 GB).

Closes #753
Part of epic #749

Test plan

  • bun test (262 pass, incl. 11 new prescreen-decision cases); tsc clean.
  • Cross-repo workflow dry-run on locked/unlocked/no-annex trees: BYTES/NPTR/EXTS correct, no set -e abort.
  • Gated live: re-dispatch on007523 pre-screen → pass; close false issue Add proper test coverage measurement (90%+ target) #1.

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.
@github-actions

github-actions Bot commented Jun 16, 2026 •

Copy link
Copy Markdown

📦 Package Preview

Your package is ready to test!

bun install -g nemar-cli@PR761

Version: 0.8.53-PR761.f6f86cc
Commit: f6f86cc


🤖 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
neuromechanist merged commit a73c473 into feature/issue-749-epic-import-robustness Jun 16, 2026
1 check passed
@neuromechanist
neuromechanist deleted the feature/issue-753-phase4-annex-sizes branch June 16, 2026 21:33

This branch was previously deployed

1 inactive deployment
npm — f6f86cc0 Deployed Jun 16, 2026 by neuromechanist via publish #1406
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant