Skip to content

fix: findings of the 0.10.16 release review - #1705

Merged
neuromechanist merged 19 commits into
devfrom
fix/release-review-findings
Oct 10, 2026
Merged

neuromechanist merged 19 commits into
devfrom
fix/release-review-findings

Conversation

@neuromechanist

@neuromechanist neuromechanist commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

What this is

The fixes from a toolkit review of the whole dev to main release (195 commits, 254 files). Twelve reviewers (code review, silent failures, test coverage) each took one area and looked at the seams between features, not at the features again. Every item below was checked against the code, and the ones that changed behaviour have a test that fails without the change. Three more reviewers read this PR; their record is the comment below.

Fixed

Finding What happens now
The first push of an imported dataset was refused. The privacy gate added with #1683 refuses any clone whose uuid.log holds a user@host:/path description, and OpenNeuro's repositories carry them (all of 20 older datasets checked; ds000001 has root@93184394ac19:/datalad/ds000001). nemar admin import prepare would have stopped at the push. Reproduced with real git-annex. Before anything of the branch is published, another repository's description is replaced with upstream and the history is pruned again. This machine's own description is still refused, and the message names the way out. The scan now reads every line (--text: a -diff attribute made git log -p print "Binary files differ" and exit 0), and only a uuid-shaped token from the untrusted uuid.log is ever handed to git.
--verbose could print a GitHub token (the credential helper written for a push or a fleet clone, the token gh returns for nemar admin pr-reviews and the fleet annex policy). Only nemar sandbox turns that log on today. New redact option on runCommand; the gh auth token calls are marked sensitive.
nemar dataset download exited 1 for a partial dataset. The data plane answers 502 for a file the manifest lists and storage lacks; the downloader retried it three times and counted a failed run, against ADR 0005. One shared error word. The Worker sends it, the downloader reads it (a small JSON body only) as reported absence, any other 502 is still a transport fault.
The retired retrieve-key stub, and a refused regenerate-key, asked people to attach a debug log to a bug report. Marked as reported exits (401, 403, 429 for regenerate-key).
A blocked-publication sweep that threw left zeros in its audit tally (reads as "nothing to do"). The comment on the cron job also said it was production-only. Counted as an error; comment corrected.
No test stopped the Worker from approving or merging (ADR 0093's central rule). Two mutations that add an approving review or a merge left 219 tests green. A lifecycle test asserts every GitHub call is a dispatch, a check or a comment; an approving-review path makes it fail.
bun run migrations:d1-check died after all 96 migrations applied, when wrangler prints a warning banner. Reads the catalog around the banner. All 96 migrations apply on real D1 and the catalog matches bun:sqlite.
PR_REVIEW_ENABLED had no documented home, and a dashboard variable is not kept by a deploy. Documented in the Worker config and ADR 0092.

The 0.10.16 changelog entry is in this PR.

One decision made here, at the maintainer's request

The PR review is on in the dev Worker's config ([env.dev.vars]), as the trial. Production stays dark. The production Worker forwards pull_request events for the datasets dev owns (the xx09* datasets and the fixture nm099998) to dev, so once the workflow is deployed and the App is subscribed, a throwaway pull request to a published xx0999NN exemplar runs the whole chain. (nm099999 is private and production's, nm099998 is an anonymous deposit: neither is ever reviewed.) Turning it on for real datasets is adding the flag to [vars], which ships in a later release.

Recorded, not changed

ADR 0064 (points to 0095 for the serving half), 0086, 0092, 0094, 0095 and 0097 carry the gaps the review found that need a decision or a deploy step rather than a code change: the merge refusing a pull request the review holds (unstable), the route and the sweep reading the BIDS run differently, nemar dataset update not clearing stale flags, chunk serving limits, and the hourly backup keeping password hashes.

Not done here, needs the maintainer

  • ADR 0096 is still proposed and ships owner edits of an account's email and GitHub handle that do not end the old holder's keys or sessions, with a handle that is not checked against GitHub.
  • y in nemar admin pr-reviews next and --merge approve and then refuse to merge a pull request the review holds.
  • run-pr-review.yml is not yet in nemarDatasets/.github, and this session cannot write to that repository.

Verification

Typecheck and Biome are clean. Passing: git-annex-remote (real git-annex 10.20240129), run-command-redaction, http-download, pr-review-approve, ADR index, changelog format, the Worker's pr-review-flow, cron-sweep-wiring and data-route-manifest-stream suites. One test in auth-device-cli fails here and on a clean dev: it makes a config directory unwritable, which the root user of this sandbox ignores.

🤖 Generated with Claude Code

https://claude.ai/code/session_01XpB5Wz7WvF2AZNfqYZLoRR

claude added 17 commits October 10, 2026 18:02
A clone of an OpenNeuro dataset arrives with the source's own default-form repository descriptions (13 of 20 sampled datasets), and the first-push gate refused every one, so the import stopped. Before anything of the branch is published, replace another repository's description with a neutral label and prune again. This repository's own description is still refused, now with the way out.
runCommand echoes the command line under --verbose and redacted only AWS values, so the credential helper written with password=<token> and the token gh returned for the admin pr-reviews commands reached stderr, which people paste into issues. A redact option blanks values a command is given, and gh auth token is marked sensitive at its two remaining call sites.
The hidden retrieve-key stub, and regenerate-key on a refusal the server explained, told people to attach a debug log to a bug report. Both now mark the exit as reported.
The flag was named nowhere in the Worker config, and a plain variable set in the dashboard is not kept by a deploy. Document that it is added to the block of the Worker that should run the review.
Every GitHub call across a pass, a fail, a decline and a failed run must be a dispatch, a check or a comment. An approving-review path added to the comment writer makes this fail.
The data plane answers 502 for a file the manifest lists and storage lacks. The download path retried it three times and exited 1, where ADR 0005 calls a file the archive does not have a reportable gap and not a failed run. The error word is now one shared constant: the Worker sends it, the downloader reads it as absence, and any other 502 stays a transport fault.
When the blocked-publication sweep threw, the audit row kept the tally's zeros, which reads as a sweep that found nothing to do. Count it as an error. The comment that called the sweep production-only is corrected: outside production it runs narrowed to the dev range and the fixtures dev owns.
ADR 0064 points to ADR 0095 for the serving half. ADR 0095 lists its known limits, ADR 0092 the flag's home, the dev soak path and the open items before the review is switched on, ADR 0086 and 0094 the gaps found, ADR 0097 that the hourly backup keeps the hashes.
The migration replay joins stdout and stderr and sliced the JSON from the first [, which is also in the [WARNING] banner wrangler prints when a proxy variable is set, so the catalog diff died in JSON.parse after all 96 migrations had applied. Take the array between the line that is just [ and the last line that is just ].
The fixes of the release review, the deploy notes they add, and the limits the review found.
At the maintainer's request, as the soak target. Production stays dark: the production Worker forwards pull_request events for the datasets dev owns to dev, so a throwaway pull request to nm099999 runs the whole chain once the workflow is deployed and the App is subscribed. The ADR, the changelog and the config comment say so, and the OpenNeuro prevalence figure is corrected to what was measured (all of 20 older datasets).
git log -p prints only 'Binary files differ' and exits 0 for a path with a -diff attribute (the dataset's own .gitattributes is in the tree pushed) or a NUL byte, so the scan read an empty history and the descriptions went out. --text reads the lines. The scrub also stops when this repository's own uuid cannot be read (every uuid would count as foreign), names the repository whose description could not be replaced, and says in the verbose log how many it replaced.
regenerate-key marked every 4xx as reported. A 400, 404 or 405 means client and server disagree about the route, which is when the nudge is wanted, so only 401, 403 and 429 are reported. The retired-command test no longer passes vacuously under NEMAR_DEBUG.
A 502 with a different JSON error is still a transport fault, the token read from gh is kept out of the verbose log too, and the redact option's minimum length is documented.
The first token of a uuid.log line goes into git annex describe, and the file comes from the clone's source. Only a uuid-shaped token is taken, with -- before it, and anything else stops the push. The fleet clone's credential helper write is redacted like the other three, and the download only trusts the named 502 when it is a small JSON body.
nm099999 is production's and private, nm099998 an anonymous deposit, so neither is forwarded to dev or reviewed: the trial runs on a published xx0999NN exemplar. Also: the real text of the refused merge, ADR 0005's actual wording, what the chunk listing bound is per, what exports keep, and no history in the config comment.
A repo-wide format run reformatted two test files that no part of this change touches. They are back to what dev has.
@github-actions

github-actions Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

📦 Package Preview

Your package is ready to test!

bun install -g nemar-cli@PR1705

Version: 0.10.16-PR1705.b74a485
Commit: b74a485


🤖 Updated on each push.

Copy link
Copy Markdown
Contributor Author

Review record (pr-review-toolkit)

Three reviewers read this change (code review, silent failures, comment accuracy), after twelve reviewers had read the release it fixes. All three found real things; each is fixed or stated below.

Comment accuracy

Finding Resolution
The trial target was wrong. nm099999 is production's and private, nm099998 is an anonymous deposit; only xx09* datasets and nm099998 are forwarded to dev, and a dataset is reviewed only while public, named and first-published. A throwaway pull request to nm099999 would never have been reviewed. ADR 0092, the changelog and the config comment now name a published xx0999NN exemplar and say why the other two are never reviewed.
"Recorded, not refused" for the pending publication request was wrong (the route still records it as blocked; what changed is the CLI's reporting). Reworded.
The quoted "the archive does not have it" is not ADR 0005's wording. The chunk-listing bound is per file size, not per dataset. Exports keep hashes until deleted, not 30 days. The real refused-merge text differs. The unstable mapping is expected, not observed. All corrected.
#1455 was described as open for the wrong reason; "the App delivers" was true only once subscribed; transitional wording in the config comment. Corrected.

Code review

Finding Resolution
One credential-helper write (fleet-key-registration.ts) missed the redact option. Fixed.
The first token of a uuid.log line goes into git annex describe, and that file comes from the clone's source. Only a uuid-shaped token is taken, with -- before it; anything else stops the push. Test builds a hostile uuid.log line with git plumbing.
The new response.json() on a 502 has no size or type guard. Only a JSON content type and at most 4 KB are read; a test sends the named error as text/html.

Silent failures

Finding Resolution
git log -p prints only "Binary files differ" and exits 0 for a path with a -diff attribute (the dataset's own .gitattributes) or a NUL byte, so the scan read an empty history and the descriptions would have gone out. Reproduced. --text. Test with a *.log -diff rule; removing the flag makes it fail.
An unreadable local uuid made every uuid count as foreign. The scrub stops. (Not reachable through pushToGitHub, where the earlier forget fails first, so this guard has no test.)
Error text dropped the uuid and exit code; the relabel was silent. The message names the repository and git-annex's exit code (not its words, which may repeat the description); the verbose log says how many were replaced.
regenerate-key skipped the debug hint for every 4xx. Only 401, 403 and 429.
Test gaps: a 502 with a different JSON error, the gh token branch of configureGitHubRemote, two foreign uuids, the retired-command check passing vacuously under NEMAR_DEBUG. Tests added or fixed; the redact minimum length is documented.

Left as it is, on purpose: the sandbox command exits 0 after a failed save (it does so for its other failures too); cloneDataset's persisted helper has no redaction test; the changelog date is renamed at merge.

Also in this PR since the first push: the PR review is turned on in the dev Worker's config at the maintainer's request (production stays dark), and two test files that a repo-wide format run touched were put back.


Generated by Claude Code

@neuromechanist
neuromechanist merged commit d816547 into dev Oct 10, 2026
14 checks passed
@neuromechanist
neuromechanist deleted the fix/release-review-findings branch October 10, 2026 19:38

This branch was previously deployed

1 inactive deployment
npm — b74a4855 Deployed Oct 10, 2026 by neuromechanist via publish #3344
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.

2 participants