Repository navigation
fix(reindex): --missing-metadata skips rows attempted in the last 24h - #579
Merged
Merged
Conversation
📦 Package PreviewYour package is ready to test! bun install -g nemar-cli@PR579Version: 🤖 Updated on each push. |
Contributor
Author
Review (pr-review-toolkit:code-reviewer)Critical: none. Important — fixed in ffe96e8:
Strengths confirmed:
Companion to PR #553 — both solve the `nm000133` reindex-loop bug from different angles. Land together. |
neuromechanist
added a commit
that referenced
this pull request
May 22, 2026
When a dataset's BIDS root doesn't include participants.tsv, derive a minimal one from the sub-XXX/ directory listing and commit it via the GH App. Closes the lifecycle gap that #579 mitigated with a recency guard: now the data actually appears instead of staying NULL forever. Pure module + 3 real-integration tests, no mocks. Case-sensitive on purpose (BIDS spec mandates lowercase); see code comment in participants-tsv.ts.
neuromechanist
added a commit
that referenced
this pull request
May 22, 2026
Cross-phase review on dev→main #580 found Commander's '30' default always overrode the server-side ?? 1 default for --missing-metadata, hiding the 24h recency guard from #579. Fix moves default into the action handler per filter. Admin-merge: publish workflow fails with the npm 409 race that #581 (just merged) fixes for next time.
5 tasks done
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.
Replaces #552 (auto-closed during a botched rebase). This PR is a clean linear cherry-pick of the same change on top of current dev.
Summary
User observation: `nm000133` was getting reindexed on every `--missing-metadata` sweep with no progress. The filter only checked column nullness, so datasets whose upstream genuinely lacks a column we require (e.g. no `participants.tsv` -> `subject_count` stays NULL) re-matched every sweep, ran the full enrichment pipeline, and converged back to NULL. No useful work; just billing.
Adds a 24h recency guard to the `missing-metadata` filter: rows whose `metadata_updated_at` is within the last 24h are skipped. After 24h they're eligible again, giving upstream time to ship a fix (e.g. add `participants.tsv` to the BIDS root). Operators who need to force an immediate retry use `--all`.
Companion to PR #553 (`feat(enrich): auto-generate participants.tsv when missing at root`).
Test
`test/dataset-reindex.test.ts` covers the new behavior. Local: 21 pass, 0 fail.
Original PR
#552 was a merge commit on top of an older base. During the rebase to current dev the GitHub state machine auto-closed it. This re-issue is a clean linear commit (no merge weirdness) ready for normal review + merge.