Skip to content

Block publication requests when BIDS CI is failing - #274

Merged
neuromechanist merged 2 commits into
devfrom
fix/270-publish-readiness
Mar 10, 2026
Merged

neuromechanist merged 2 commits into
devfrom
fix/270-publish-readiness

Conversation

@neuromechanist

Copy link
Copy Markdown
Contributor

Summary

  • Run readiness checks when users request publication: deploy BIDS validation CI if missing, check latest run status
  • If BIDS validation is failing, set request status to blocked with reason bids_validation_failed and return clear message with CI URL
  • Users can re-request to re-check; if CI now passes, request transitions from blocked to requested and admin notification is sent
  • Reject publish requests for already-published datasets (was previously allowed)
  • New D1 migration (0015) adds block_reason column to publication_requests
  • Status endpoint includes block_reason, message, and ci_url for blocked requests

Test plan

  • Build passes
  • All tests pass (no regressions)
  • Apply migration: npx wrangler@latest d1 migrations apply nemar-db -c backend/wrangler.toml
  • Test: request publication for a dataset with failing CI, verify blocked response
  • Test: fix CI, re-request, verify unblock and admin notification
  • Test: request publication for already-published dataset, verify 409

Closes #270

@github-actions

github-actions Bot commented Mar 9, 2026 •

Copy link
Copy Markdown

📦 Package Preview

Your package is ready to test!

bun install -g nemar-cli@PR274

Version: 0.7.16-PR274.40dffe3
Commit: 40dffe3


🤖 Updated on each push.

Run readiness checks on publish request: deploy CI if missing,
check BIDS validation status. Block request if CI is failing
with clear message to user. Re-checking unblocks when fixed.

Also reject publish requests for already-published datasets.

Closes #270
- Recreate publication_requests table to add 'blocked' to CHECK
  constraint (SQLite cannot ALTER CHECK constraints)
- Block when no CI runs exist (pending) or run is in-progress
- Return HTTP 422 for blocked requests instead of 200
- Allow admin approve/deny to find blocked requests
@neuromechanist
neuromechanist force-pushed the fix/270-publish-readiness branch from 40dffe3 to 5a050c2 Compare March 10, 2026 00:13
@neuromechanist
neuromechanist merged commit bdcd5c6 into dev Mar 10, 2026
1 check passed
@neuromechanist
neuromechanist deleted the fix/270-publish-readiness branch March 10, 2026 01:52
@neuromechanist neuromechanist mentioned this pull request Mar 10, 2026
2 tasks done

This branch was previously deployed

1 inactive deployment
npm — 5a050c21 Deployed Mar 10, 2026 by neuromechanist via publish #465
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