Repository navigation
Release 0.8.14: queue cleanup batch (10 issues + 7 stale closures) - #474
Conversation
- Add xx-prefix (sandbox) to shouldSyncToNemarAfterVersionDoi skip list; sandbox datasets pass the gate, causing false-alarm failed sync rows - Remove redundant && published.doi guard on the Zenodo trigger: true already guarantees versionDoi is non-null via the no_doi predicate; align with EZID caller which doesn't repeat this check - Add sandbox log line to the Zenodo else branch for consistency - Add backend/test/version-doi-sync-trigger.test.ts covering all decision paths including the new sandbox case (10 tests)
- Rename BucketSelection -> __BucketSelection (test-only convention) - Rename AUTH_MAX_REQUESTS_AUTHED -> TOKEN_MAX_REQUESTS_AUTHED (clearer) - Tighten AUTH_PATHS matching: exact or /- or ?-prefixed subpath only - Replace "unknown" IP fallback with crypto.randomUUID() to avoid pooling - Add TTL-aware InMemoryCache and window-reset test (14th test)
Adds the missing unconditional test for publish resend (mirrors the existing status/request bogus-key tests). Also changes nm000104 to nm099999 in the two existing bogus-key tests (test convention).
- Mark authAttempted as optional in Variables type (was a lie) - Extend stale-token 401 hint to GET /datasets/:id - Note lowercase bearer fallthrough in middleware comment - Fix test comment: authMiddleware -> optionalAuthMiddleware - Add negative assertion and test for /:id stale-token path
Apply trim-and-length guards to awardNumber and awardTitle in buildDataCiteXml so whitespace-only values are suppressed. Also trim uploaderName before pushing to contributors so surrounding whitespace does not appear in emitted XML. Adds tests for whitespace-only awardNumber/awardTitle suppressed, padded values emitted trimmed, and padded uploaderName emitted trimmed.
Backend was returning s3_lock_total and s3_lock_batch_count on the
hasMore=true and error paths but not on the final non-paging success
path. The CLI accumulates s3_lock_batch_count from every response so
the last batch was never counted — progress read short by one full
page (e.g. 3963/4963 at "complete" for a 4963-object dataset).
Fix: capture s3LockFinalTotal/s3LockFinalBatchCount before calling
updateProgress("s3_lock") and include them in the final c.json
response. Also update the test comment to make the contract explicit
so the fixture can no longer mask this class of bug.
Two Important review findings addressed: 1. Spinner reset on Worker retry: add s3LockResumed flag to PublishProgressInfo. When an outer retry fires while the continuation token is set (mid-s3_lock), subsequent progress events carry s3LockResumed=true and renderProgress appends "(resumed)" to the spinner line. The locked counter (s3LockLocked) is kept at function scope across retries so the display shows accumulated progress rather than appearing to restart from zero. 2. Subrequest budget for getDatasetS3Stats: add maxPages parameter that caps the LIST sweep at N pages. The s3_lock path in admin.ts passes MAX_COUNT_LISTS=20 (covers up to 20000 objects). If the dataset is larger, objectCount returns undefined and the CLI degrades to a running count without a denominator — correct behaviour rather than risking "Too many subrequests" on the first Worker invocation. All callers updated to handle objectCount: number | undefined.
- fix: API-fail false-negative in get: fall back to reading local .nemar/metadata.json when backend is unreachable so port check fires even offline - fix: update detectImportMarker JSDoc to clarify -1 semantics (most recent commit, not any-commit) and add forward-compat note - feat: add --skip-port-check to both download and get commands so admins and automation can bypass the check - fix: replace misleading retry hint in download; clone already exists, instruct user to wait then run get from that dir - fix: replace "~5 minutes" with "5-30 minutes depending on size" in both commands - docs: add unknown-case comment at both call sites - test: add git-rm deletion case for detectImportMarker
- Add validation_warnings field to AddCiResponse type - Print yellow warning block after workflow list in ci add - Print per-dataset warnings in --all loop with dsSpinner.warn() - Add --no-validate flag to ci add for fleet deploys - Pass ?validate=false query param to backend when --no-validate used - Backend reads validate param and forwards to deployWorkflows() - Include validation_warnings in audit log details - Add retry in deployWorkflows: probe at 2.5s, retry once at 5s if missing - Document disabled workflow state behavior in comments and JSDoc - Add per_page=100 pagination comment in validateWorkflowsParseable - Add 429 handling note in comment with TODO for future test coverage - Update tests: expect 2 listing calls on missing, 3 on server-error
Make notify_user step non-fatal in publish approve
Polish: 6 items from #474 review
Remove BEGIN/COMMIT from migration 0021 (D1 rejects)
Second-pass silent-failure audit (pass 2)New release blockersNone found. New important#484 #487 D1 migration 0021 partial-failure risk: MEDIUM concern. Acceptable (not release blockers)#483 #486 #486 #475 Confirmed-fixed from pass 1
No new release blockers. Safe to proceed with CI green. |
Second-pass test coverage review — v0.8.14 (#474)Coverage blockers (new)None. No new critical gaps found in the changes introduced since pass 1. Important gaps (new)[I-1]
[I-2] The new code in Confirmed-fixed from pass 1[C-1] Migration 0021 test completeness — All 5 invariants from issue #479 are covered. The BEGIN/COMMIT removal from #487 has no impact: the test never relied on transaction rollback semantics; it applies the migration as a script via
HTTP-layer
New test count (cumulative diff)8 test files added or substantially modified: Final coverage verdictPass 2 finds no blockers. The two important gaps (audit_log observability for |
Summary
Cleanup batch: closes 17 issues, addresses 10 user-visible bugs / features / refactors. Auto-tag pipeline will strip
-devNsuffix and tagv0.8.14on merge.Closed via this PR (10 merges)
--user <username>for per-user emails--mineauth header (stale-token detection)bun testin CI (unit-test-alljob)--skip-port-check)Closed up-front (7 stale/subsumed)
#196, #205, #346, #366, #367, #368, #389.
Migrations
0021_broadcast_user_recipient.sql— relax CHECK onbroadcast_emails.recipient_groupto allowuser:<username>for per-user notify (transactional rebuild, no PRAGMA, no FK drops).New CI
unit-test-alljob in.github/workflows/test.ymlruns everytest/*.test.tsexcept long-running e2e/sandbox suites on PRs todevandmain. Branch protection updated to require it.Follow-up issues filed during the work
Test plan
bun test(unit-test-all in CI) green on dev HEADauto-tag.ymlruns on merge: strips-dev10, tagsv0.8.14, triggersnpm-publish.ymlsync-dev.ymladvances dev to0.8.15-dev0after publish