Repository navigation
Release 0.10.16 - #1707
Release 0.10.16#1707
Conversation
The availability-report sweep commits .nemar/availability-report.json to main through the Contents API. On a dataset that was created but whose upload had not pushed yet, that PUT created main as an unrelated ROOT commit. nm000358 (created 2026-10-06 14:55Z, report commit 4ba0a7b at 03:00Z): every later 'nemar dataset upload' attempt failed at 'Pushing metadata to GitHub' with '[rejected] adjusted/main(unlocked) -> main (fetch first)', and the adjusted branch cannot be auto-rebased, so the upload Job failed after 12 attempts and needed a manual merge. - writeAvailabilityReport checks that main exists (new branchExists: 404 or GitHub's 409 'Git Repository is empty' mean no) and refuses with 409 instead of creating it. - The sweep's candidates now require a version (a version DOI or a dataset_versions row), like ARCHIVE_RETRY_SWEEP_QUERY: a never-versioned dataset has nothing to report, and a row the pass cannot complete must not hold one of its LIMIT slots forever. - Test seeds that model reportable datasets now carry a version.
branchExists sent encodeURIComponent(branch) as one component, so release/1.0 became release%2F1.0 and read as absent. It and getMainBranchSha now share one ref request that encodes per segment; 404 retry stays a per-caller choice. Tested against a local GitHub stand-in.
verifyDatasetVersionS3 and the availability report's manifest read built their S3 origin from the literal AWS host, so neither could be driven by a local server. They now pass env.S3_ENDPOINT_URL like the data plane and admin routes do. Unset in every deployment, so no production behavior changes.
The branch check ran after verifyDatasetVersionS3 (a paginated LIST plus manifest walk, up to 30 times per sweep) for rows that were then refused. The GitHub target and the main check now come first on the write path. The 409 message also covers a repository that is invisible to NEMAR, which GitHub reports as the same 404. Route-level tests drive the single-dataset and sweep routes against local GitHub and S3 stand-ins and assert zero PUTs and zero S3 requests when main is absent or the repository is empty, and exactly one PUT when main exists.
The version DOI or dataset_versions row rule was hand-copied from ARCHIVE_RETRY_SWEEP_QUERY into the availability-report sweep. It is now exported once as datasetHasVersionSql from archive-retry.ts and both queries build from it. A test pins that they share it; the candidacy tests keep pinning the behavior.
branchExists slept inside a sweep row under rate-limit pressure (about 60 s per row), treated every 404 as 'no branch', trusted any 2xx, and treated any 409 as an empty repository. It now makes one interactive attempt (never sleeps), probes the repository on a 404 and throws when it is not visible, requires object.sha on a 2xx, and accepts a 409 only when the message says the repository is empty. getMainBranchSha shares the sha check and keeps its retry on 404. Tests cover each case against a local GitHub stand-in, including the retry behavior of getMainBranchSha.
S3_ENDPOINT_URL is now honored only in a recognized non-production environment (testS3EndpointOverride), at the integrity check and the report's manifest read, which now builds its options from getS3Config. A guard test asserts no wrangler vars block declares it. A failed or untrustworthy main lookup (auth, rate limit, 5xx, a repository not visible to NEMAR) is wrapped as a 500 with its cause, logged on the single-dataset route, and distinct from the 409 refusal; sweep error entries gain a status. One REPORT_BRANCH constant names the branch for the guard and the write, and datasetHasVersionSql takes only the two aliases in use.
Route-level tests for the availability report now share one ordered event log across the GitHub and S3 stand-ins. They cover: 403, 401, junk 2xx, 500, non-empty 409 and a repository not visible to NEMAR as 500s with a cause and zero PUTs and zero S3 requests; the 409 refusals with their status marker; the order lookup, S3 walk, PUT; the PUT body (dataset, version, completeness, message, no sha); the token on every GitHub call; the moved 400 and 500 checks; a version-less dataset as a non-candidate; the known LIMIT-slot starvation of a refused row; and that S3_ENDPOINT_URL is ignored in production.
The CLI help, the cron comment and three test headers described the sweep as covering every managed dataset, capped at 10, with sibling routes having no S3 seam. It covers every non-sandbox dataset with a version and no report, AVAILABILITY_REPORT_SWEEP_MAX is 30 (the cron passes no limit), and listObjectPages and verifyDatasetVersionS3 honor S3_ENDPOINT_URL outside production.
verifyDatasetVersionS3 and the availability report's manifest read built the same fenced S3 options in two places, one of them layered over getS3Config's unfenced endpoint. versionReadS3Options is now the one builder; behavior is unchanged.
The write-target block of writeAvailabilityReport (the 400 checks, auth, and the never-create-main guard with its 409) is now resolveReportTarget. Messages, statuses and the order (guard before any S3 work) are unchanged.
Check the 404 first, then any other failure, then release the body once, instead of an early return that cancelled the body separately. Behavior is unchanged.
The LIMIT-slot behavior of a refused row is documented on AVAILABILITY_REPORT_SWEEP_BASE_WHERE; the cron comment, the route doc, the remaining doc and the test point to it. The createOrUpdateFile docblock keeps the warning and the fact that only the availability report guards it, without naming callers, and the fetchBranchRef docblock no longer restates the call sites.
The refusal and fault cases share expectRouteRefusal and expectSweepRefusal; stand-in ref states derive from one answers record; the branch-exists stand-in drops its hit counter and special repository; the rejection helper is shared. New tests pin that the single-dataset route logs a 5xx and only a 5xx. All six faults still run as route, sweep and cause tests.
The root program's '-v, --version' is recognised anywhere on the command
line, so 'nemar dataset release <id> --version 2.0.0' -- the form the
release help documents -- printed the CLI version and exited 0, and a
scripted release (-y) silently did nothing. The '=' form already worked
because the root option is boolean.
Before parsing, bindShadowedOptionValues joins a value-taking option of the
addressed subcommand to its value when an ancestor command declares the
same flag ('--version 2.0.0' -> '--version=2.0.0'). Global flags keep
working anywhere (no enablePositionalOptions); a bare '--version', values
that look like flags, anything after '--', and boolean collisions (#1220)
are left alone.
nemar dataset release <id> --version (or --version -y) still let the root -v, --version claim the bare flag, print the CLI version and exit 0: the #1493 silent no-op for a scripted -y release. When the leaf command declares a required-value option whose long flag an ancestor also declares and it appears with no value (last token, or followed by another flag), bindShadowedOptionValues now throws MissingShadowedValueError. index.ts reports it through the declaring command, so stderr and exit code are Commander's own: error: option '--version <version>' argument missing, exit 1. The "leaves everything else alone" test pinned the old pass-through for the valueless forms; those cases moved into a new error test on purpose. nemar --version and nemar -v are unchanged.
test.yml sorts a file into the live-API tier when its text matches testRequest, TEST_API_URL or runCli(. The helper and the env var here did, so the #1493 regression test ran only in the soft integration-dev tier and never in unit-pure. Rename the helper to spawnCli and point the CLI at a closed local port through config.json in the isolated config dir, as the offline CLI tests do. Strip TEST_* variables from the child env so an ambient setting cannot override the config. The file no longer matches the tier grep.
The comment said every ancestor option is a boolean; admin recover declares --recover-file <path> on a command that also has subcommands. Say what actually holds, and note why the join is harmless when the ancestor's option takes a value too.
The test kept a hand-written copy of the command tree, which keeps passing after a flag changes in src/commands. Build the tree from the command groups src/index.ts registers, under a root declared the way index.ts declares it, and restore the shared groups' parents after. Add an invariant over every command in that tree: each value-taking option whose long flag an ancestor also declares must be joined to its value. It finds two today, dataset release --version and admin recover status --recover-file; the second is shared with a value-taking group, so a test pins that it still resolves through optsWithGlobals(). A drift test compares the test root with `nemar --help`, so a new root option or top-level command in index.ts fails it until the tree is updated. Optional-value shadowed options are rejected by a test, since a bare flag cannot be delivered past the ancestor.
dataset validate declares -v, --verbose and the root declares --verbose; both are booleans, so the token after the flag is a positional. Joining them would make the path --verbose=./x and validate the current directory instead. Assert dataset validate --verbose ./x is unchanged, and that Commander then hands ./x to validate as its path. Removing the value-taking guard in bindShadowedOptionValues fails this test.
The valueless --version entry-point test passed even when index.ts stopped reporting the error through Commander, because main()'s generic catch prints the same message. The observable difference is the bug-report nudge that only a non-Commander exit gets. Assert it is absent, so the failure stays a usage error.
Only the throwaway root had exitOverride(), so a usage error raised by a shared command (a missing <dataset-id>) called process.exit(1) and ended the whole bun test run. Trap process.exit and stderr for the length of the parse and surface the exit as a failure, with a test that proves it. Commander 12 never clears parsed option values, and the shared groups outlive this file: clear what each parse stored, and give each case values no other case uses.
Each spawn now has a kill timer and an explicit test timeout, and the child env drops proxy variables: an unroutable proxy made a loopback spawn hang for the whole kill window. The CLI is pointed at a local stand-in backend instead of a closed port, and the release test asserts the stand-in saw the notices call, so a config apiUrl that stops being honored fails the test instead of sending the call to the real API. The spawn tests used the live dataset id nm000104; use nm099999.
A boolean ancestor option takes the flag and strands its value, which is what the join repairs. An ancestor option that takes a value (admin recover --recover-file) consumes the flag and its value together and the leaf reads it through optsWithGlobals(), so the join was unneeded there, and it made `admin recover status --recover-file --json` newly fail. Shadow only when the outermost ancestor option of that long flag is a boolean. Only dataset release --version is rewritten now. The tree invariant separates the two kinds of collision, keeps a non-vacuity check for each, and pins the admin recover shapes as unchanged and still resolving.
`dataset release nm1 --version "" --type patch -y` silently did a patch bump, and without --type it opened a prompt that hangs on a closed stdin: the release handler tested `options.version` for truthiness, so an empty value read as no --version. Fix both layers. The pre-pass treats an empty next token as a missing value (Commander's "argument missing", exit 1). The handler tests `!== undefined`, so the `--version=` spelling, which reaches it as "", gets the existing "Invalid version" exit 1. Entry-point tests run the real CLI against a stand-in backend whose dataset names a repository that does not exist, so a regression fails at the clone instead of touching a real dataset repository.
`release --help --version` and `release nm1 --version --help` now fail with "argument missing" instead of showing the help that was asked for, because the missing-value error fired first. When --help or -h appears before `--`, drop the bare shadowed flag instead of throwing. Left in the argv, the root would claim it and print the CLI version, so it has to go. A flag that has a value is still joined, and `--help` after `--` is an operand and does not count.
Commander reads a lone "-" as an option value (the usual spelling of stdin), but the pre-pass counted it as a flag and rejected `--version -` as a missing value. A lone "-" now joins like any value. Any other dash-leading token is still read as a flag, so a value that starts with "-" has to be spelled --flag=value; a test and the code comment say so.
`dataset --version 2.0.0 release nm1 -y` and `dataset --version release nm1 -y` printed the CLI version and exited 0: the leaf walk stopped at the flag's value, and `dataset` does not declare the flag, so the root claimed it. The `=` spelling cannot be rewritten into place either; Commander has `dataset` reject it as an unknown option. Remember a shadowed flag typed below the root and ahead of the command that takes it, step over its value so the walk still finds that command, and throw MisplacedShadowedOptionError. index.ts reports it through the command like the missing-value error. At the root the flag stays the root's own (`nemar --version dataset release ...` prints the version), and a flag after the command's name is unaffected. Pins `--` ahead of command names and the root-level shapes.
An unexpected throw from bindShadowedOptionValues escaped main() as a bare message that read like a failure of the command the user typed. Rethrow it as "argv pre-pass failed: <message>" with the original as the cause, and leave the bug-report nudge on it, since that is a bug. Explain at the catch that command.error() exits, and that going through it runs the exitOverride whose markUsageExit() suppresses the nudge for the mistyped-option errors. Checked by hand with an injected throw: the pre-pass has no input that fails unexpectedly, so no automated test can reach this branch.
Removing the alias lookup in the leaf walk failed nothing: the only alias in the real tree, dataset status|view, has no shadowed option, and no real option takes an optional value or collides on a short flag. Run the join over every alias spelling of each real path, and add a minimal tree of real Commander objects that has an aliased command, a short-flag collision, an optional-value collision and a flag claimed by both the root and a group. Each of those branches now fails a test when it is mutated away.
* fix: validate upload S3 worker count * test: cover upload worker count bounds * test: isolate upload worker validation
* feat: serve chunked annex data routes * fix: align phase 1565 CI expectations
nemar admin users gains --search, show and edit. Search looks in every text field with ranked results, an exact-identifier redirect and a near-miss fallback; edit has two tiers (any admin: names, affiliation, location; owners only: username, email, GitHub handle). GET /admin/users/:username no longer returns credential columns. USER_COLUMN_ROLES classifies every users column once, a schema test keeps it in step with migrations, and a source scan fails on any whole-row read of users. ADR 0094 records the decisions.
chore: sync latest dev into issue 1671 epic
NEMAR has no password sign-in any more. POST /auth/signup and POST /auth/retrieve-key answer 410 with a sentence naming nemar auth login, nemar auth retrieve-key is a hidden stub that does the same, and the bcrypt service and bcryptjs are removed. Mail, pages and hints that named retrieve-key now name nemar auth login. regenerate-key tells people to use login -k and exits non-zero on failure. Migration 0093 sets every stored users.password_hash to NULL. The column stays, nullable and classified secret. API keys, /auth/login, email verification, emailed key regeneration and the device flow are untouched. ADR 0095 records the decision and amends ADR 0047.
chore: sync latest dev into epic #1671
* docs: clarify 1455 benchmark acceptance * docs: fix 1455 test wording
copyAnnexedToRemote sized the recorded-file check from addTargets only. On a resume that adds a few files, every other recorded file had an unknown size and was checked in its own git-annex process. Size it from the full data-file inventory, as the pending copy already is. Only a path missing from the inventory is still checked alone. Resume check on 80 recorded files plus one new file: 2.5 s down to 0.5 s on a local directory remote, same result. Claude-Session: https://claude.ai/code/session_01YXQWmd9X8QG9diuUNQ1PaF
…load-fixes Epic: integrate upload and integrity fixes (#1671)
Import first-push gate accepts another repository's annex description, token redaction in --verbose, partial-dataset download exit code, d1-check banner handling, PR review flag in the dev Worker config, and the 0.10.16 changelog.
Review the dataset pull requests that were open before the automated review was switched on, and start again a commit whose review ended without a verdict. The platform's daily pool now counts model calls (migration 0095).
Review record for 0.10.16How it was reviewed. The whole What the release review found and fixed (#1705): the first push of an imported dataset was refused by the new privacy gate; Found by the start review (#1706): the platform's daily pool counted rows, not model calls (migration 0095); Checks before opening this: What is not verified, and why it matters:
The decisions that need the maintainer are in the description. I have not merged this pull request and will not until they have been seen. Generated by Claude Code |
Promotes
devtomainfor 0.10.16. The release is epic #1671 (upload and integrity fixes) plus six other pieces of work: the automated review of dataset pull requests (ADR 0092, #1682) and the admin commands that work through it (ADR 0093, includingstartfor pull requests that were already open), publication requests that wait for the BIDS check (ADR 0086 amendment), chunked annex objects that are counted and served (ADR 0064 amendment, ADR 0095), admin account search and edit (ADR 0096), and the end of password sign-in (ADR 0097). The CHANGELOG entry is ondev.Contents
action_required, never green. Off in production: nothing happens there untilPR_REVIEW_ENABLED = "1"is added to the production[vars]in a later release. It is on in the dev Worker's config as the trial.nemar admin pr-reviews(ADR 0093). List, show, approve, next, allow, block, clear, andstart(review a pull request that was already open, or start again a commit whose review ended without a verdict). Approval is the administrator's own and never passes through the Worker.data_completeand served through the stable data-plane route.git init -bfallback, shadowed-option rejection (release --version).nemar admin userssearch, show, edit (ADR 0096, stillproposed).POST /auth/signupand/auth/retrieve-keyanswer 410. Migration 0093 sets every stored password hash to NULL and cannot be undone.Merged into
devfirstmain...devdiff by twelve reviewers (code review, silent failures, test coverage), each on one area and aimed at the seams between features; the review record is a comment on fix: findings of the 0.10.16 release review #1705nemar admin pr-reviews start, reviewed by four toolkit reviewers including a mutation pass over its tests (record on that pull request)Merge
Merge commit (
gh pr merge --merge), never squash, and do not touch the version (ADR 0016). Rename the date in the CHANGELOG heading first if the merge is not on 2026-10-10.Before the merge
bun run migrations:d1-check: all 97 migrations (0092 to 0095 are new) apply on real D1 and the catalog matchesbun:sqlite(the script needed a fix to run where wrangler prints a banner, fix: findings of the 0.10.16 release review #1705).devmerges intomainwithout conflicts.After the merge
deploy-backendruns onmaintwice (merge commit, then strip commit). "Apply D1 migrations (production)" has four to apply this time: 0092 adds the review tables, 0093 clears the password hashes (not reversible), 0094 adds a trigger, 0095 adds one column with a default. All four run before the Worker deploys, so the previous Worker serves the old routes for a moment; both runs must pass/health.auto-tag.ymlstrips-dev8(or whatever dev carries), tagsv0.10.16,npm-publish.ymlpublishes,sync-dev.ymladvancesdev; thengh release edit v0.10.16 --notes-file <entry>.nemar admin data-integrity-sweep --reauditso chunked datasets stop counting as missing (ADR 0064).run-pr-review.ymltonemarDatasets/.github(a change there reaches every dataset repository at once, ADR 0020), wire the parity test (NEMAR_PR_REVIEW_WORKFLOW_LIVE), subscribe the App to Pull request events with Pull requests: write, and have the fourANTHROPIC_*organization variables. The flag is already in[env.dev.vars], and the production Worker forwards events for the datasets dev owns (xx09*and the fixturenm099998) to dev, so a throwaway pull request to a publishedxx0999NNexemplar runs the whole chain. Notnm099999(private, production's) and notnm099998(an anonymous deposit): neither is ever reviewed.PR_REVIEW_ENABLED = "1"to the production block ofbackend/wrangler-sccn.tomlin a later release, thennemar admin pr-reviews start --all --dry-runand, after reading the list,--yes.docs.nemar.orgthat nameretrieve-key(cli/getting-started/authentication,quickstart,platform/api,cli/commands/auth).Decisions for the maintainer
proposed): owner edits of an account's email and GitHub handle do not end the old holder's keys and sessions; the handle is not checked against GitHub; an email edit leaves an approved account withemail_verified = 0and the CLI's own hint cannot clear it. Accept as is, or refuse those edits onpersonaccounts for now, or revoke on change.yinnemar admin pr-reviews nextand--mergeapprove and then refuse to merge a pull request the review holds (unstable); ADR 0093 sayscleanonly. Matters once the review is on.run-pr-review.ymlintonemarDatasets/.github, which the session that prepared this cannot write to, and the first throwaway pull request to an exemplar. Nothing about the review is proven on GitHub until that run has happened (the live model call and the workload identity exchange have not run).Test evidence
Head
9d08bb2b(dev tip, after the-dev8bump). All 40 check runs finished without a failure; the pull request and push workflows both ran.lint,unit-pure,api-test,integration-dev,e2e-sandbox,e2e-upload,passwordless-auth-test,patch-duration-test,zarr-python-test,zenodo-sandbox-test,scrub-tools(five shards and the aggregate),test-gate,detect-environment,deploy-dev(the dev Worker deployed this head, which applied 0092 to 0095 to the dev database).deploy-production(runs only onmain),bump.bun run migrations:d1-checkon real D1, and the Worker'spr-review-start,pr-review-flowandpr-review-queuesuites (270 pass).run-pr-review.yml, the live model call, the workload identity exchange, the S3 credential renewal against a real bucket, and chunk serving from staging (decisions 4 to 6).