Skip to content

Polish: 6 items from #474 review - #486

Merged
neuromechanist merged 8 commits into
devfrom
feature/issue-480-polish
May 14, 2026
Merged

neuromechanist merged 8 commits into
devfrom
feature/issue-480-polish

Conversation

@neuromechanist

Copy link
Copy Markdown
Contributor

Closes #480

Items addressed

  • 1. broadcastRequestSchema integration test: add HTTP-level test to test/api.test.ts posting POST /admin/notify with neither to nor user, asserts 400
  • 2. getDatasetS3Stats JSDoc: add @warning block explaining that when maxPages is exceeded totalSize is a partial sum; callers must check objectCount === undefined
  • 3. shouldSyncToNemarAfterVersionDoi JSDoc: replaced "tracked in CLAUDE.md" with "see nemar.org sync not triggered on version releases #339"
  • 4. detectImportMarker self-reference: removed the TODO: track in nemarOrg/nemar-cli#460 line; the "See Pulling data after porting from OpenNeuro fails #460" further down is sufficient
  • 5. TODO without issue in tree-batched-commit.test.ts: rephrased as a plain explanatory comment
  • 6b. Variables.authAttempted: narrowed from boolean | undefined to true | undefined; removed the explicit c.set("authAttempted", false) (unset is equivalent)
  • 6c. RecipientGroupOrUser: introduced named template-literal type alias in broadcast.ts, used in sendBroadcast params and admin.ts notify handler

Deferred

  • 6a. PublishProgressInfo tagged union: more invasive than expected. The test file (test/publish-progress.test.ts) accesses .s3LockLocked directly on unnarrowed PublishProgressInfo[], so the split would require updating the test array filtering pattern and all render call sites. Deferred to a follow-up.

Tests

  • test/broadcast.test.ts: 21 pass
  • test/publish-progress.test.ts, test/tree-batched-commit.test.ts, test/rate-limit-retry.test.ts: 49 pass
  • test/datacite.test.ts, backend/test/rate-limit-buckets.test.ts: 145 pass
  • bun run typecheck (root + backend): both clean

@neuromechanist
neuromechanist merged commit 0c18a4d into dev May 14, 2026
2 checks passed
@neuromechanist
neuromechanist deleted the feature/issue-480-polish branch May 14, 2026 12:35

This branch was previously deployed

1 inactive deployment
npm — 33592f5b Deployed May 14, 2026 by neuromechanist via publish #865
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