Repository navigation
CI: gate backend/test + surface auth errors in dataset get - #475
Merged
Merged
Conversation
📦 Package PreviewYour package is ready to test! bun install -g nemar-cli@PR475Version: 🤖 Updated on each push. |
2 of 5 tasks
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.
Two follow-ups from the #474 release review.
CI gate gap
The new
unit-test-alljob from #465 only globstest/*.test.ts, missing every test inbackend/test/:backend/test/rate-limit-buckets.test.ts(14 tests for Resume stuck publications blocked by rate limiter #275)backend/test/version-doi-sync-trigger.test.ts(10 tests for nemar.org sync not triggered on version releases #339)backend/test/datacite.test.ts(128 tests for Skip empty funder and creator entries in DataCite XML #466)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 barecatch {}so the offline.nemar/metadata.jsonfallback could fire. That catch also swallows 401 (revoked token) and 403 (forbidden), forcing the user past the port check intogit annex getwhich then fails with a cryptic "remote unavailable" error.Fix: discriminate on
err.statusCode. Fall through to offline mode only whenstatusCode === 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 passbun run typecheckcleanCloses nothing directly; both items were called out in the #474 review and addressed here so they ride along with v0.8.14.