Skip to content

Onboard: probe the CLI's import path - #158

Merged
neuromechanist merged 1 commit into
mainfrom
feat/onboard-import-path-fallback
Nov 24, 2026
Merged

neuromechanist merged 1 commit into
mainfrom
feat/onboard-import-path-fallback

Conversation

@neuromechanist

@neuromechanist neuromechanist commented Nov 22, 2026 •

Copy link
Copy Markdown
Member

Summary

nemar-cli is moving nemar admin import-openneuro to nemar admin import openneuro (nemar-cli ADR 0135, epic nemarOrg/nemar-cli#2307, phase nemarOrg/nemar-cli#2312). On a CLI that has the new path, the old one is a stub that exits 1 without importing, and this workflow installs the CLI unpinned. Each of the prepare, copy and finalize steps now asks the installed CLI which path it has and uses that path for its call, so the workflow works with today's CLI (0.10.39, old path) and with the CLI that ships the move (new path).

The probe reads the usage line of nemar admin import openneuro --help, not its exit code: a CLI without that command answers it with the import group's help and exit 0. Color codes are stripped first, as approve-publication.yml does. The prepare step's --tag check now reads the help that probe captured, from whichever path it found.

Do not merge yet. Merging changes live imports and is the owner's call. nemar-cli's copy of this file (.github/dataset-workflows/onboard-openneuro.yml) is byte-identical to this one in the phase PR (nemarOrg/nemar-cli#2323), and nemar-cli's test/dataset-workflow-parity.test.ts compares its copy with this repository's main, so that test fails on the nemar-cli PR until this one merges. Since the probe works with both CLIs, this PR can merge before the CLI release.

Local dry check

Every probe block in this file, run as written in bash -eo pipefail with nemar bound to bun run <checkout>/src/index.ts, an empty NEMAR_CONFIG_DIR and HOME, and no credentials:

== nemar-cli epic branch with the move (new path)
probe 1 of 3: exit 0: import_cmd=(admin import openneuro) help names --tag: yes
probe 2 of 3: exit 0: import_cmd=(admin import openneuro) help names --tag: yes
probe 3 of 3: exit 0: import_cmd=(admin import openneuro) help names --tag: yes
== nemar-cli origin/main, 0.10.39 (old path)
probe 1 of 3: exit 0: import_cmd=(admin import-openneuro) help names --tag: yes
probe 2 of 3: exit 0: import_cmd=(admin import-openneuro) help names --tag: yes
probe 3 of 3: exit 0: import_cmd=(admin import-openneuro) help names --tag: yes

The same result with FORCE_COLOR=1 for both CLIs. nemar-cli's test/onboard-workflow.test.ts runs the same blocks in CI against the real help of the new path and a simulated pre-move CLI, and checks that every nemar admin ... path the file names exists in the CLI's command tree.

Test plan

  • Probe run locally against nemar-cli 0.10.39 and the epic branch, plain and with forced color (above)
  • Byte-identical to nemar-cli's copy in the phase PR (sha256 ef52fa0d2c3b53d3f407164f072d4be5bcb5ec7b2b9dc5f5da71007ff98aca4c)
  • An import dispatch after merge (owner's call; not run)

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