Skip to content

Admin command tree grouped by object (epic #2307) - #2347

Merged
neuromechanist merged 11 commits into
devfrom
feature/issue-2307-epic-admin-tree
Nov 24, 2026
Merged

neuromechanist merged 11 commits into
devfrom
feature/issue-2307-epic-admin-tree

Conversation

@neuromechanist

Copy link
Copy Markdown
Contributor

Closes #2307. ADR 0135 (accepted, with amendments of 2026-11-22 and 2026-11-23).

nemar admin goes from 51 visible top-level entries to fourteen groups named for an object: users, dataset (alias repo), rework, repull, import, fleet, compute, oidc, pr-reviews, neurobagel, mail, notice, notify, docs. Depth stays at most three. --apply is the one write flag; --execute, --write and --fix stay as hidden aliases. A moved path is a stub that runs nothing, prints one line naming its new path and exits 1 (70 paths, listed in the CHANGELOG from the moved-command table). Defaults changed: dataset doctor fix and rework annex normalize are dry runs unless --apply. Retired: make-public (route stays), regenerate-iam, backfill-names.

Phases

  1. P0 moved-command table and --apply helper: Phase P0: moved-command table and --apply helper #2316
  2. P1 dataset group: Phase P1: dataset group #2320
  3. P2 users group: Phase P2: users group #2321
  4. P3 rework group: Phase P3: rework group #2322
  5. P4 import group and upstream commands: Phase P4: import group and upstream commands #2323, with Onboard: probe the CLI's import path nemarDatasets/.github#158 (merged: the onboarding workflow probes for either import path)
  6. P5 sweeps and checks into fleet: Phase P5: sweeps and checks into fleet #2345
  7. P6 last flag, tree tests, help and docs: Phase P6: last flag, tree tests, help and docs #2346

Plan and ADR: #2302.

Ships together (open, merge in the release hour)

nemarOrg/docs#142 (regenerated command reference, also fixes the generator dropping aliased groups), nemarOrg/nemar-observability#120, nemarDatasets/.github#160, nemarOrg/website#589, nemarOrg/nemar-infisical#4, nemarOrg/nemar-private#120.

Before the release

  • Owner: grep the Hallu, nemaring and Expanse crontabs for nemar admin (not readable from here).
  • Announce a week ahead with nemar admin notice set.

Test plan

  • Every phase PR reviewed (one full round, a second only where the fixes were substantial) and green in CI.
  • Merge of dev (32 commits): conflicts in CHANGELOG.md and the ADR index resolved (both sides kept); the 0135 tolerated-gap entry dev added for this epic's reserved number is removed now that the ADR exists. dev's new code names no old admin path.
  • Local after the merge: typecheck, changelog-format, adr-index, moved-commands-changelog, moved-commands.unit, admin-write-flag, help-tiers (708 pass).
  • Full suite in this PR's CI.
  • Seam review of the epic diff.

* ADR 0135: admin tree grouped by object (proposed)

* Plan the admin command tree restructure

* Fold maint into fleet in the admin plan

* Record the owner answers, accept ADR 0135

* Use the plain accepted status
* Declare moved admin commands in one table

* Add --apply helper with hidden aliases

* Run moved-command stubs before Commander parses

* Drop the alias key from --apply options

* Point admin help <old path> at the move

* Note apply-flag relies on the option store

* Use a template literal in the guard message
* Rename admin repo to dataset, repo an alias

* Move admin ci and doi under dataset

* Move admin exemplar under dataset

* Move admin doctor scan and fix under dataset

* Let a moved-command row name a retired command

* Retire admin regenerate-iam to stubs

* Move admin s3 under dataset

* Move delete-dataset and bulk-delete to dataset

* Move admin reindex under dataset

* Retire admin make-public to a stub

* Use --apply on unpublish, withdraw, restore

* Make dataset doctor fix a dry run by default

* Drop --provider from dataset doi create

* Point CLI and shared text at admin dataset

* Point backend text at admin dataset

* Point repo docs at admin dataset

* Update tests for the admin dataset group

* Test the dataset group alias and --apply

* Test the approve-publication help probe

* Restore env vars without delete in a test

* Assert a stub's pointer by its usage line

* Name admin dataset in two test strings

* Retire make-public with its own reason

* Record the make-public retirement in ADRs

* Test a confirmed --apply sends the write
* Move approve, revoke, role, verify, kind to users

* Move admin keys under users

* Move admin email-preferences under users

* Move duplicates and backfill-usernames to users

* Move doctor kinds to users kind-check

* Retire admin backfill-names to a stub

* Drop backfill-names from the name hints

* Point CLI and shared text at admin users

* Point backend text at admin users

* Lead admin help with users, not approve

* Describe admin users as the account group

* Update tests for the admin users group

* Test users subcommands beside the listing

* Test the approval command in admin mail

* Point repo docs at admin users

* Word the missing-name fix once, conditionally

* List every users subcommand in admin help

* Check admin help for the users group
* Add admin rework; move revert under it

* Move annex-normalize to rework annex normalize

* Move the fleet annex repairs to rework annex

* Move admin recover under rework

* Make rework annex normalize a dry run by default

* Use --apply on rework recover

* Point CLI text at admin rework

* Point backend text at admin rework

* Point repo docs at admin rework

* Update tests for the admin rework group

* Test rework recover --apply and its alias

* Name rework paths in comments and User-Agent

* Accept --no on rework annex normalize

* Decline normalize runs with --no in its test
* Move import-openneuro to import openneuro

* Move import-coverage and import-issue-triage

* Move import-weekly to import weekly

* Move upstream-status and -backfill to repull

* Use --apply on repull upstream-backfill

* Point CLI and shared text at the import group

* Point backend text at the import group

* Realign upstream-status usage comment

* Probe the import path in the onboard workflow

* Test the onboard workflow's import path probe

* Update tests for the import group

* Changelog: import group and upstream commands

* Describe admin import as the import group

* Read workflow command paths by walking the tree
* Move the sweeps to admin fleet sweep

* Move summary and zarr-catalog under fleet

* Move e2e-test under fleet

* Use --apply on availability and summary check

* Point CLI text at admin fleet

* Point backend and workflow text at admin fleet

* Point repo docs at admin fleet

* Update tests for the fleet group

* Test --apply on fleet availability and summary

* Say that fleet sweep availability --all writes

* Pin availability --all and summary --yes
* Use --apply on neurobagel regenerate

* Test the admin tree's shape and write flag

* Drop the admin help fold; fix stale counts

* Changelog: the admin command tree, generated

* Point README and current notes at the new tree

* Amend ADR 0135 with the cap exceptions

* Changelog: how long the stubs stay
…c-admin-tree

# Conflicts:
#	.context/decisions/README.md
#	CHANGELOG.md
@github-actions

github-actions Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

📦 Package Preview

Your package is ready to test!

bun install -g nemar-cli@PR2347

Version: 0.10.40-PR2347.08c6608
Commit: 08c6608


🤖 Updated on each push.

@neuromechanist

Copy link
Copy Markdown
Contributor Author

Seam review: no blocking findings. Fixed in the last commit: the onboarding-fallback removal and the stub removal now have issues (#2348, #2349) and the CHANGELOG names them, with the stub removal version stated plainly (0.12.0); ADR 0135's 2026-11-23 amendment says the repo alias may go only after the three callers that use it (nemarDatasets approve-publication probe, the website publication queue, docs pages) name dataset; a stale comment naming a nonexistent nemar admin sync run is reworded. Note kept as is: exitIfMovedCommand stays correct only while no group with a stub child takes an option with a value, which the guard test enforces.

@neuromechanist
neuromechanist merged commit 1486407 into dev Nov 24, 2026
89 of 91 checks passed
@neuromechanist
neuromechanist deleted the feature/issue-2307-epic-admin-tree branch November 24, 2026 03:06

This branch was previously deployed

1 inactive deployment
npm — 08c66084 Deployed Nov 24, 2026 by neuromechanist via publish #4826
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