Skip to content

Phase P6: last flag, tree tests, help and docs - #2346

Merged
neuromechanist merged 7 commits into
feature/issue-2307-epic-admin-treefrom
feature/issue-2314-phase6-tree-help-docs
Nov 24, 2026
Merged

neuromechanist merged 7 commits into
feature/issue-2307-epic-admin-treefrom
feature/issue-2314-phase6-tree-help-docs

Conversation

@neuromechanist

@neuromechanist neuromechanist commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Phase P6 of the admin command tree restructure (ADR 0135), the last one: the last write flag, a test of the tree's shape, the help without its fold, the release note generated from the moved-command table, and the remaining in-repo pointers.

Closes #2314

Part of epic #2307

Changes

  • admin neurobagel regenerate: --apply writes; --execute is a hidden alias (the request field stays execute).
  • New test/admin-write-flag.unit.test.ts, walking the real Commander tree: no visible option under admin is --execute, --write or --fix; every visible top-level entry is a group except notify and docs; the top level is the fourteen groups of decision 1; no path is deeper than three below admin; and a group past the cap of twelve visible children is one listed with its reason.
  • ADR 0135 has a dated amendment (2026-11-23) naming the two exceptions to decision 2's cap, and the index line notes it; the test's allow-list points at it.
  • The cap check found two groups past twelve: admin itself (14, the fourteen groups decision 1 names) and mail (14, support tickets, left unchanged by the restructure). users and dataset sit exactly at 12, compute jobs at 11. Both over-cap groups are listed in the test with their reason; a new one fails until it is decided.
  • help-groups.ts: the admin entry is removed, so plain nemar admin --help lists all fourteen groups with their descriptions (before: five led and nine folded onto "More commands"). The stale "43" comments in help.ts and help-groups.ts are rewritten. test/help-tiers.unit.test.ts pins the unfolded admin help.
  • CHANGELOG: the five per-phase sections become one ### Admin command tree (epic #2307, ADR 0135) section under ## Unreleased, with the release note (announce a week ahead with nemar admin notice set, update the CLI before following new mail text, the stubs stay until the second minor version after this release and then go in one change with its own note, the outside repositories ship together, the nemarDatasets fallback goes after release), every moved and retired path, the --apply unification with its hidden aliases, and the three defaults.
  • The path list is generated from MOVED_COMMANDS by scripts/moved-commands-changelog.ts (--write rewrites it between two marker comments); test/moved-commands-changelog.unit.test.ts fails when the list and the table disagree.
  • README's admin section covers rework, import, repull and fleet and states the --apply rule; current .context notes and a scripts/seed-dev-db.sql comment name the new paths. Historical plans and ADRs are left as written.

nemar admin --help, before and after

Before:

Commands:
  users [options]   List and search NEMAR accounts; its subcommands look up and
                    manage them
  dataset|repo      One dataset: publication lifecycle, DOIs, CI, S3 lock,
                    deletion and repairs
  pr-reviews        Open dataset pull requests to main, with the automated
                    review of each (ADR 0093)
  mail              Support tickets (exit: 0 ok, 1 error, 2 usage, 3 not found,
                    4 not permitted)
  notify [options]  Send a categorized email to a group, or an email to a
                    single user

More commands (--help-all for details):
  compute, docs, fleet, import, neurobagel, notice, oidc, repull, rework

After: all fourteen, each with its description (compute, dataset|repo, docs, fleet, import, mail, neurobagel, notice, notify, oidc, pr-reviews, repull, rework, users) and no "More commands" line.

Outside this repository

One pull request per repository, none merged; each merges with this epic's release:

Test plan

  • bun run lint, bun run typecheck, biome check on every new and changed test file
  • test/admin-write-flag.unit.test.ts (6 pass), test/moved-commands-changelog.unit.test.ts (3 pass), test/help-tiers.unit.test.ts (9 pass), test/admin-neurobagel-cli.test.ts (27 pass), with changelog-format, moved-commands.unit, admin-restructure, completion-candidates.unit, apply-flag.unit, adr-index: 780 pass, 0 fail
  • Live tier: test/cli.test.ts and approve-publication-probe help tests run locally (30 pass, 7 skip needing keys)
  • Mutation: making the --apply aliases visible (drop .hideHelp() in apply-flag.ts) fails the write-flag test and names all eight commands
  • Mutation: a table row added without regenerating the CHANGELOG list fails 2 of 3 changelog tests
  • 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@PR2346

Version: 0.10.39-PR2346.b7bc39c
Commit: b7bc39c


🤖 Updated on each push.

@neuromechanist
neuromechanist merged commit 8056f21 into feature/issue-2307-epic-admin-tree Nov 24, 2026
51 of 53 checks passed
@neuromechanist
neuromechanist deleted the feature/issue-2314-phase6-tree-help-docs branch November 24, 2026 02:10

This branch was previously deployed

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