Skip to content

CI: gate backend/test + surface auth errors in dataset get - #475

Merged
neuromechanist merged 3 commits into
devfrom
feature/unit-test-all-backend-glob
May 14, 2026
Merged

neuromechanist merged 3 commits into
devfrom
feature/unit-test-all-backend-glob

Conversation

@neuromechanist

Copy link
Copy Markdown
Contributor

Two follow-ups from the #474 release review.

CI gate gap

The new unit-test-all job from #465 only globs test/*.test.ts, missing every test in backend/test/:

A regression in any of those would pass CI today. Extended the glob to test/*.test.ts backend/test/*.test.ts. Verified all 24 currently-uncovered tests pass.

Silent auth-failure in dataset get

#470 added a getDataset() call wrapped in bare catch {} so the offline .nemar/metadata.json fallback could fire. That catch also swallows 401 (revoked token) and 403 (forbidden), forcing the user past the port check into git annex get which then fails with a cryptic "remote unavailable" error.

Fix: discriminate on err.statusCode. Fall through to offline mode only when statusCode === 0 (true network failure). Surface 401/403 as a clear re-login hint and exit 1. Other ApiError statuses re-throw.

Found by silent-failure-hunter during the #474 release review.

Test plan

  • bun test backend/test/rate-limit-buckets.test.ts backend/test/version-doi-sync-trigger.test.ts — 24/24 pass
  • bun run typecheck clean
  • CI gates pass

Closes nothing directly; both items were called out in the #474 review and addressed here so they ride along with v0.8.14.

@github-actions

Copy link
Copy Markdown

📦 Package Preview

Your package is ready to test!

bun install -g nemar-cli@PR475

Version: 0.8.14-PR475.b3a4dc0
Commit: b3a4dc0


🤖 Updated on each push.

@neuromechanist
neuromechanist merged commit bcb862e into dev May 14, 2026
2 checks passed
@neuromechanist
neuromechanist deleted the feature/unit-test-all-backend-glob branch May 14, 2026 12:34

This branch was previously deployed

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