Skip to content

Phase P4: import group and upstream commands - #2323

Merged
neuromechanist merged 14 commits into
feature/issue-2307-epic-admin-treefrom
feature/issue-2312-phase4-import-group
Nov 24, 2026
Merged

neuromechanist merged 14 commits into
feature/issue-2307-epic-admin-treefrom
feature/issue-2312-phase4-import-group

Conversation

@neuromechanist

Copy link
Copy Markdown
Contributor

Summary

Phase P4 of the admin command tree restructure (ADR 0135): the import commands join the existing nemar admin import group (beside status, rollback, retry, verify), and the upstream snapshot commands join nemar admin repull. 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 import-weekly move is a one-line re-parent (importCommand.addCommand(importWeeklyCommand.name("weekly"))) with the command's definition untouched, so the RFC branches that edit import-weekly rebase over it with a one-line conflict at most; import-coverage and import-issue-triage move the same way.

Closes #2312

Part of epic #2307

Old path to new path

  • admin import-openneuro -> admin import openneuro
  • admin import-coverage -> admin import coverage
  • admin import-weekly -> admin import weekly
  • admin import-issue-triage -> admin import triage
  • admin upstream-status -> admin repull upstream-status
  • admin upstream-backfill -> admin repull upstream-backfill

Behavior changes

  • admin repull upstream-backfill: --apply is the write flag; --execute is a hidden alias of it. The request still carries execute=1.
  • .github/dataset-workflows/onboard-openneuro.yml: each of the prepare, copy and finalize steps asks the installed CLI which import path it has (nemar admin import openneuro --help, read by its usage line, with a fallback to admin import-openneuro) and calls that path. It is byte-identical to Onboard: probe the CLI's import path nemarDatasets/.github#158.

Expected CI failure: dataset-workflow-parity

test/dataset-workflow-parity.test.ts compares this repository's copy of onboard-openneuro.yml with nemarDatasets/.github main, so it FAILS on this PR until the owner merges nemarDatasets/.github#158. Locally, with NEMAR_DATASET_WORKFLOW_LIVE set: against nemarDatasets main, 3 pass and 1 fail (the byte comparison); against the #158 branch, 4 pass. Merge order: #158 first (it works with today's CLI and with this one), then this phase.

Callers updated in this repository

Backend import-coverage.ts, import-failure-cause.ts, import-weekly-summary.ts, import-weekly-summary-sweep.ts; shared/upstream-staleness.ts, shared/repull-observability.ts, shared/contract/weekly-attention.ts; src/lib/import-openneuro.ts, src/lib/repull/auto-view.ts, src/lib/upstream-status-report.ts, src/lib/upstream-measure.ts, src/lib/debug-log.ts, src/commands/admin-upstream-status.ts, the admin --help block, and CHANGELOG. .context/design-upstream-repull.md and .context/plan-multi-archive-importer.md are design records and are left as written.

Outside this repository (not in this PR)

nemarDatasets/.github#158 (the workflow), nemarDatasets/.github docs/import-failure-procedure.md:33, docs.nemar.org pages, and the website's .context/handoff.md:52.

Test plan

  • bun run lint, bun run typecheck, biome check on every changed test file
  • test/onboard-workflow.test.ts (new block): every nemar admin ... path the workflow names is a live command except the old-CLI fallback, which is the moved-command stub; the import is only called through the probe's choice; the three steps carry the same probe; the probe picks admin import openneuro from this CLI's real help, plain and with forced color; the control shows an unknown word under import answers with exit 0; and against a pre-move CLI's answers it falls back to admin import-openneuro
  • The probe run by hand against nemar-cli 0.10.39 (origin/main) and this branch: old path and new path respectively, --tag found in both (output in Onboard: probe the CLI's import path nemarDatasets/.github#158)
  • Every changed test file plus moved-commands.unit, help-tiers.unit, admin-restructure, repull-command-text.unit, repull-workflow, completion-candidates.unit, release-version-flag: 24 files, 1213 pass, 6 skip (live tier, no keys), 1 fail fixed (repull-command-text listed repull's children; it now imports the whole tree so it does not depend on file order)
  • Live-tier and integration files grepped: import-tag-pin.integration updated (its API is a closed local port)
  • Mutation: making the probe trust the exit code (if ! nemar admin import openneuro --help) fails the pre-move fallback test
  • dataset-workflow-parity green: needs Onboard: probe the CLI's import path nemarDatasets/.github#158 merged (owner)
  • 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@PR2323

Version: 0.10.39-PR2323.107b42d
Commit: 107b42d


🤖 Updated on each push.

@neuromechanist
neuromechanist merged commit d83bdfe into feature/issue-2307-epic-admin-tree Nov 24, 2026
51 of 53 checks passed
@neuromechanist
neuromechanist deleted the feature/issue-2312-phase4-import-group branch November 24, 2026 00:11

This branch was previously deployed

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