Skip to content

Phase P3: rework group - #2322

Merged
neuromechanist merged 14 commits into
feature/issue-2307-epic-admin-treefrom
feature/issue-2311-phase3-rework-group
Nov 22, 2026
Merged

neuromechanist merged 14 commits into
feature/issue-2307-epic-admin-treefrom
feature/issue-2311-phase3-rework-group

Conversation

@neuromechanist

@neuromechanist neuromechanist commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Phase P3 of the admin command tree restructure (ADR 0135): a new nemar admin rework group holds the operations that change the content or history of an existing dataset (ADR 0135 decision 3), with an annex sub-group for the git-annex repairs. Every old path is a row of the moved-command table: it runs nothing, prints one line naming the new path, and exits 1. admin fleet stays a live group; its three annex repairs become stubs under it.

Moves are their own commits with no behavior change; the two flag changes are separate commits with their own tests.

Closes #2311

Part of epic #2307

Old path to new path

  • admin revert -> admin rework revert
  • admin recover, admin recover status -> admin rework recover, admin rework recover status (moved, not retired)
  • admin annex-normalize -> admin rework annex normalize
  • admin fleet annex-policy -> admin rework annex policy
  • admin fleet key-registration -> admin rework annex key-registration
  • admin fleet content-recovery -> admin rework annex content-recovery

Behavior changes

  • admin rework annex normalize is a dry run unless --apply is given: it plans and stops before any change. The old --dry-run is accepted and hidden; --apply with --dry-run is refused. It now also takes -n, --no (decline the confirmation), the same option the other confirming admin commands have.
  • admin rework recover: --apply is the write flag; --execute is a hidden alias of it.

Callers updated in this repository

backend/src/services/import-failure-cause.ts:115, src/lib/import-finalize-gate.ts:149, src/lib/repull/execute/register.ts:258, src/lib/fleet-annex-policy.ts:91, 456, 476, the rework annex key-registration hints in admin.ts, src/lib/recover-datasets.ts, src/lib/argv-shadowing.ts comments, two backend comments, the admin --help block (a rework line replaces revert), the ieeg-geometry plan's proposed command (admin rework ieeg-geometry), .context/recover-runbook.md, and CHANGELOG.

Outside this repository (not in this PR)

docs.nemar.org admin/commands.mdx (regenerate) and nemarDatasets/.github docs/import-failure-procedure.md:32 (nemar admin recover <id>).

Test plan

  • bun run lint, bun run typecheck, biome check on every changed and new test file
  • New test/admin-annex-normalize-dry-run.unit.test.ts (5 pass), against a local bare origin and a reused --dir clone, so nothing is cloned from GitHub; every run passes --no, so nothing is committed or pushed even with a terminal attached
  • New test/admin-rework-recover-apply.unit.test.ts (4 pass)
  • Every changed test file plus moved-commands.unit, help-tiers.unit, admin-restructure, fleet-content-recovery, fleet-annex-policy.unit, completion-candidates.unit, admin-users-group.unit: 843 tests across 15 files, 0 fail after fixing release-version-flag (30 pass); 13 skips are live-tier tests that need keys
  • Live-tier test/cli.test.ts grepped and updated (revert); its revert tests run locally: 2 pass, 1 skip (needs a key)
  • Mutations: restoring the old default (write unless --dry-run) in normalize fails the default test; dropping the --execute alias on recover fails its alias 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@PR2322

Version: 0.10.39-PR2322.4749846
Commit: 4749846


🤖 Updated on each push.

@neuromechanist
neuromechanist merged commit 67f9d8f into feature/issue-2307-epic-admin-tree Nov 22, 2026
27 checks passed
@neuromechanist
neuromechanist deleted the feature/issue-2311-phase3-rework-group branch November 22, 2026 20:16

This branch was previously deployed

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