Skip to content

Phase P1: dataset group - #2320

Merged
neuromechanist merged 25 commits into
feature/issue-2307-epic-admin-treefrom
feature/issue-2309-phase1-dataset-group
Nov 22, 2026
Merged

neuromechanist merged 25 commits into
feature/issue-2307-epic-admin-treefrom
feature/issue-2309-phase1-dataset-group

Conversation

@neuromechanist

@neuromechanist neuromechanist commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Phase P1 of the admin command tree restructure (ADR 0135): nemar admin repo becomes nemar admin dataset, with repo kept as a Commander alias, and the per-dataset commands move under it. Every old path is a row of the moved-command table: it runs nothing, prints one line naming the new path, and exits 1.

Moves are their own commits with no behavior change; the behavior changes (the --apply flag on the lifecycle commands, doctor fix dry run by default, dropping --provider) are separate commits.

Closes #2309

Part of epic #2307

Old path to new path

  • admin repo -> admin dataset (alias repo kept, so admin repo publish approve still runs)
  • admin publish, admin withdraw, admin restore (ADR 0125 stubs) -> now point at admin dataset publish|withdraw|restore
  • admin ci {check, add, validate, sync} -> admin dataset ci ...
  • admin doi {create, info, update, enrich} -> admin dataset doi ...
  • admin exemplar {create, status, remint-dois} -> admin dataset exemplar ...
  • admin doctor scan, admin doctor fix -> admin dataset doctor scan|fix (admin doctor kinds stays until P2 moves it to users kind-check)
  • admin s3, admin s3 lock, admin s3 credential-check -> admin dataset s3 ...
  • admin delete-dataset -> admin dataset delete
  • admin bulk-delete -> admin dataset bulk-delete (no behavior change)
  • admin reindex -> admin dataset reindex
  • admin make-public -> retired; its stub says the bare visibility flip that skipped the publication request and screen no longer exists and to use nemar admin dataset publish (the POST /datasets/:id/publish route stays, no break-glass flag; ADR 0135 amendment 2026-11-22, with a pointer in ADR 0065)
  • admin regenerate-iam, admin s3 regenerate-iam -> retired; the stub says why (the backend route still answers 410)

Behavior changes

  • admin dataset unpublish|withdraw|restore: --apply is the write flag; --execute is a hidden alias of it.
  • admin dataset doctor fix: a dry run unless --apply; --dry-run is accepted and hidden; both together are refused.
  • admin dataset doi create: --provider removed (it could only be refused; EZID is the registrar, ADR 0007).
  • src/lib/moved-commands.ts: a row may be { oldPath, retired } for a command with no replacement; its line reads "'...' was retired: Nothing was run."
  • make-public and its publishDataset client function are removed.

Callers updated in this repository

shared/publication-review.ts COMMAND_*, shared/contract/publication.ts, backend mail and refusal text (email.ts, identifier-screen.ts, unpublish.ts, routes/datasets/publication.ts, routes/admin/fleet.ts), CLI hints in src/, help-groups.ts (admin lead block is now users, approve, revoke, dataset, pr-reviews, mail, notify), the admin --help text, README, .rules/datasets-and-fixtures.md, one memory, three current runbooks, and CHANGELOG. The publication-request mail hashes in backend/test/publication-review-mail.test.ts are re-pinned: the new mail with admin dataset publish put back to admin repo publish hashes to the old pins exactly.

Outside this repository (not in this PR)

The website cliApproveCommand (website#582), the nemar-observability manifest alert text and its test, and the docs.nemar.org pages that name moved paths change in the same release.

Test plan

  • bun run lint, bun run typecheck, biome check on every changed test and backend file
  • test/moved-commands.unit.test.ts (296 pass), now asserting each pointer's usage line, not only exit 0
  • test/adr-index.unit.test.ts (10 pass), test/admin-restructure.test.ts (20 pass), test/help-tiers.unit.test.ts (12 pass)
  • New test/approve-publication-probe.unit.test.ts (5 pass): runs the bash probe from approve-publication.yml verbatim against the real admin repo --help and admin dataset --help, colored and plain, with a folded-help control that picks the dead path
  • New test/admin-dataset-group.unit.test.ts (22 pass, including a confirmed --yes run per spelling that asserts the request carries dry_run: false) and test/admin-doctor-fix-dry-run.unit.test.ts (5 pass), against a recording Bun.serve stand-in with an environment built from nothing
  • Every test file whose argv or asserted text changed: 48 files, 1780 pass, 1 skip, 0 fail
  • Mutation: sending dry_run: true after confirmation in withdraw and restore fails the 4 confirmed-run tests
  • Mutation: removing .alias("repo") fails 3 of the 5 probe tests; pointing a stub at a path that does not exist fails its pointer test
  • Full bun test not run (runs at epic to dev)

@github-actions

Copy link
Copy Markdown

📦 Package Preview

Your package is ready to test!

bun install -g nemar-cli@PR2320

Version: 0.10.39-PR2320.2b60289
Commit: 2b60289


🤖 Updated on each push.

@neuromechanist
neuromechanist merged commit 9956077 into feature/issue-2307-epic-admin-tree Nov 22, 2026
31 checks passed
@neuromechanist
neuromechanist deleted the feature/issue-2309-phase1-dataset-group branch November 22, 2026 18:30

This branch was previously deployed

1 inactive deployment
npm — 2b602894 Deployed Nov 22, 2026 by neuromechanist via publish #4770
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