-
-
Notifications
You must be signed in to change notification settings - Fork 0
feat: implement numan use for side-by-side Nu version management #67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 33 commits
Commits
Show all changes
37 commits
Select commit
Hold shift + click to select a range
9fdd94c
refactor(setup nu): replace action flags with subcommands + shared co…
tonythethompson 633c50c
fix: 3 findings — Prevent PATH subcommand from deleting active managed N
qodo-code-review[bot] fb0ff23
fix: address PR #66 review feedback
tonythethompson 438d80b
fix: clarify PATH messaging in Nu setup hints
tonythethompson 7e726a2
Add reserved `numan use` CLI stub
tonythethompson 7951797
fix: apply CodeRabbit auto-fixes
coderabbitai[bot] 8062a11
feat: implement numan use for side-by-side Nu version management
tonythethompson 213e874
fix: 5 findings — Validate and normalize Nu versions; Propagate legacy m
qodo-code-review[bot] b8f4233
fix: address PR review — validate before delete, fix help text, fix c…
tonythethompson 62b8656
chore: remove temp files
tonythethompson 2591036
Update src/cmd/snapshot.rs
tonythethompson d9b8e0f
fix: PR 67 review - bootstrap yes flag, version check, mutation lock
tonythethompson 0429557
Merge origin/master into feature/numan-use - resolve conflicts: take …
tonythethompson e245232
Update .gitignore
tonythethompson 641bd24
wip(numan-use): integrate use + migration pieces (split pending)
tonythethompson 3a38bbf
feat(numan-use): strip migration pieces for pr-migrate split
tonythethompson 6894382
fix(cmd): address PR 67 review findings (validate versions, drop --us…
tonythethompson 25f57b1
fix(bootstrap): install_from_archive writes to versioned layout
tonythethompson 7c8cc58
fix(numan-use): address remaining 7 PR 67 review threads
tonythethompson ec949e9
fix(numan-use): confirm.rs ConfirmPolicy + hints.rs shell_quote + set…
tonythethompson e15e5d3
ci(roadmap): detect roadmap drift before it ships
tonythethompson d5432d9
docs(roadmap): audit each Post-1.0 claim against shipped code
tonythethompson 99aa695
ci(roadmap): mirror drift check into numan-plugins and numan-registry
tonythethompson dcd6ad6
Merge branch 'master' into feature/numan-use
tonythethompson 48c3941
fix(version_manager): make is_version_installed consult off-tree acti…
devin-ai-integration[bot] 5022ce2
fix: resolve MSRV compile, format, and test failures for numan use
devin-ai-integration[bot] ad6ce88
Apply 3 edits across 1 file
devin-ai-integration[bot] 8acbfeb
Apply 1 edit across 1 file
devin-ai-integration[bot] 5d200a1
fix: don't take mutation lock/snapshot for read-only `numan use list`
devin-ai-integration[bot] 6f842c4
fix: rustfmt and update injected-installer test for versioned layout
devin-ai-integration[bot] 193fbb1
test: assert `numan use list` takes no snapshot while switch does
devin-ai-integration[bot] aedf804
Wire destructive-op TTY guard and clear active-version marker on mana…
devin-ai-integration[bot] 23c0e31
Apply 1 edit across 1 file
devin-ai-integration[bot] 993acea
fix(mirror-dry-run): capture drift-check exit code under set -e
devin-ai-integration[bot] 4f3f478
chore: remove one-off apply_install_from_archive_fix.py (already appl…
devin-ai-integration[bot] 1331ecf
fix: allow injected confirm seam to bypass TTY guard in tests
devin-ai-integration[bot] 8245978
Merge branch 'master' into feature/numan-use
tonythethompson File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,81 @@ | ||
| # Cross-repo mirror for `check-roadmap-drift` | ||
|
|
||
| This directory holds **drop-in artifacts** that complete the cross-repo | ||
| roadmap-drift guardrail started in PR 67 of `numan`. Each subdirectory | ||
| mirrors both the local-roadmap file and the GitHub Actions workflow | ||
| that runs `scripts/check-roadmap-drift.py` against the consolidated | ||
| roadmap hosted in `numan@master`. | ||
|
|
||
| ## What ships | ||
|
|
||
| ``` | ||
| cross-repo-mirror/ | ||
| ├── README.md ← you are here | ||
| ├── numan-plugins/ | ||
| │ ├── docs/roadmap.md ← the local pointer | ||
| │ └── .github/workflows/roadmap-drift.yml ← the CI job snippet | ||
| ├── numan-registry/ | ||
| │ ├── docs/roadmap.md ← the local pointer | ||
| │ └── .github/workflows/roadmap-drift.yml ← the CI job snippet | ||
| └── snapshot-tests/ | ||
| └── mirror_dry_run.sh ← local sanity check | ||
| ``` | ||
|
|
||
| ## Why three repos, one source of truth | ||
|
|
||
| Numan's product spans three repos; trust is cross-cutting and drift is | ||
| silent. PR 67 shipped `numan use` while the consolidated roadmap still | ||
| called it post-1.0. The drift script lives in `numan/scripts/`, but a | ||
| script only one side knows about isn't a guardrail — both sibling repos | ||
| need to run it. | ||
|
|
||
| The CI workflow in each sibling repo `curl`s the consolidated roadmap | ||
| straight from `numan@master/docs/plans/consolidated-multi-repo-roadmap.md` | ||
| into a temp file at the start of the job, then runs the exact same | ||
| `scripts/check-roadmap-drift.py` against that fetched copy. There is | ||
| never a stale copy in a sibling repo: the source of truth is the | ||
| published URL. | ||
|
|
||
| ## Installation | ||
|
|
||
| In each sibling repo: | ||
|
|
||
| ```bash | ||
| mkdir -p scripts | ||
| curl -sSfL \ | ||
| https://raw.githubusercontent.com/tonythethompson/numan/master/scripts/check-roadmap-drift.py \ | ||
| -o scripts/check-roadmap-drift.py | ||
| chmod +x scripts/check-roadmap-drift.py | ||
|
|
||
| # Then drop the contents of the relevant subdirectory into the sibling repo: | ||
| # cross-repo-mirror/numan-plugins/docs/roadmap.md → <sibling>/docs/roadmap.md | ||
| # cross-repo-mirror/numan-plugins/.github/workflows/roadmap-drift.yml | ||
| # → <sibling>/.github/workflows/roadmap-drift.yml | ||
|
|
||
| mkdir -p docs .github/workflows | ||
| cp cross-repo-mirror/<sibling>/docs/roadmap.md docs/roadmap.md | ||
| cp cross-repo-mirror/<sibling>/.github/workflows/roadmap-drift.yml \ | ||
| .github/workflows/roadmap-drift.yml | ||
|
|
||
| # Smoke-test locally before pushing: | ||
| python scripts/check-roadmap-drift.py | ||
| # expect: 0 errors, optionally a warning about the consolidated roadmap | ||
| # being fetched URL-side. The warning is informational only. | ||
| ``` | ||
|
|
||
| ## Mirror contract | ||
|
|
||
| When `numan/scripts/check-roadmap-drift.py` evolves (new forbidden | ||
| phrases, new SHIPPED_MARKERS, stronger structural checks), the mirror | ||
| artifacts in this directory MUST stay in sync. The recommended | ||
| workflow: | ||
|
|
||
| 1. Update `scripts/check-roadmap-drift.py` in `numan` and run its tests | ||
| (the negative-test proves it still bites). | ||
| 2. Update each sibling's local CI workflow to mirror the change — most | ||
| changes are confined to the script itself; the workflow is just a | ||
| thin courier that `curl`s the consolidated roadmap and runs the script | ||
| with `CONSOLIDATED_ROADMAP=<path>`. | ||
| 3. Bump the pinned `commit` SHA the workflow fetches (currently | ||
| `tonythethompson/numan@master`; the URL can be pinned to a tag for | ||
| reproducibility once a roadmap release cadence exists). |
53 changes: 53 additions & 0 deletions
53
cross-repo-mirror/numan-plugins/.github/workflows/roadmap-drift.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| name: Roadmap drift | ||
|
|
||
| # Mirror of numan/scripts/check-roadmap-drift.py runner. Fetches the | ||
| # canonical consolidated roadmap from numan@master so the sibling repo | ||
| # never holds a stale copy. Pinned actions-commit SHA matches | ||
| # numan/.github/workflows/ci.yml so future audit passes change in lockstep. | ||
|
|
||
| on: | ||
| pull_request: | ||
| branches: [master, main] | ||
| push: | ||
| branches: [master, main] | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| roadmap-drift: | ||
| name: Roadmap drift against numan consolidated roadmap | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| - name: Fetch consolidated roadmap from numan@master | ||
| run: | | ||
| mkdir -p docs/plans | ||
| curl --fail-with-body --silent --show-error --location \ | ||
| https://raw.githubusercontent.com/tonythethompson/numan/master/docs/plans/consolidated-multi-repo-roadmap.md \ | ||
| -o docs/plans/consolidated-multi-repo-roadmap.md | ||
| # Sanity check: the file must not be empty AND must mention this | ||
| # repo by path so we know we didn't grab a placeholder document. | ||
| test -s docs/plans/consolidated-multi-repo-roadmap.md | ||
| grep -q "numan-plugins/docs/roadmap.md" docs/plans/consolidated-multi-repo-roadmap.md | ||
| env: | ||
| # Pin via tag once a roadmap release cadence exists; master is OK | ||
| # for the first cut because the consolidated doc is the canonical | ||
| # cross-repo authority referenced by all three repos. | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| - name: Pull check-roadmap-drift.py from numan@master | ||
| run: | | ||
| mkdir -p scripts | ||
| curl --fail-with-body --silent --show-error --location \ | ||
| https://raw.githubusercontent.com/tonythethompson/numan/master/scripts/check-roadmap-drift.py \ | ||
| -o scripts/check-roadmap-drift.py | ||
| chmod +x scripts/check-roadmap-drift.py | ||
| - name: Run drift check | ||
| env: | ||
| CONSOLIDATED_ROADMAP: docs/plans/consolidated-multi-repo-roadmap.md | ||
| LOCAL_ROADMAP: docs/roadmap.md | ||
| run: python scripts/check-roadmap-drift.py | ||
| - name: Verify repo-local roadmap cross-link (defense in depth) | ||
| run: | | ||
| test -f docs/roadmap.md | ||
| grep -q "consolidated-multi-repo-roadmap" docs/roadmap.md |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| # Repo-local roadmap for numan-plugins | ||
|
|
||
| This repo owns CI-built plugin binaries for upstreams without compliant | ||
| release assets. The roadmap that covers the entire three-repo plan — | ||
| catalog intake, signing, plugin backfills, client compat, lifecycle | ||
| evidence, and the active-plugin gate — lives in the consolidated | ||
| cross-repo plan: | ||
|
|
||
| [**`numan/docs/plans/consolidated-multi-repo-roadmap.md`**](https://github.com/tonythethompson/numan/blob/master/docs/plans/consolidated-multi-repo-roadmap.md) | ||
|
|
||
| The cross-repo drill is enforced by | ||
| [`scripts/check-roadmap-drift.py`](https://github.com/tonythethompson/numan/blob/master/scripts/check-roadmap-drift.py), | ||
| which CI runs at `.github/workflows/roadmap-drift.yml` and which fails | ||
| this PR if the local roadmap drifts from the consolidated truth. | ||
|
|
||
| ## Repo-local detail | ||
|
|
||
| Use this page for **operational** detail that belongs only to | ||
| `numan-plugins`: | ||
|
|
||
| - Workflow manifests under `.github/workflows/` (`build-plugins.yml`, | ||
| `release.yml`, `windows-recheck.yml`). | ||
| - Per-upstream build matrix decisions (`docs/upstream-build-decisions.md`). | ||
| - Backlog triage notes (`docs/backlog.json` schema + review log). | ||
|
|
||
| Promote any cross-repo claim back into the consolidated roadmap via a | ||
| PR against `numan/docs/plans/consolidated-multi-repo-roadmap.md` | ||
| alongside the matching code change, so the three repos stay aligned. |
46 changes: 46 additions & 0 deletions
46
cross-repo-mirror/numan-registry/.github/workflows/roadmap-drift.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| name: Roadmap drift | ||
|
|
||
| # Mirror of numan/scripts/check-roadmap-drift.py runner. Fetches the | ||
| # canonical consolidated roadmap from numan@master so the sibling repo | ||
| # never holds a stale copy. Pinned actions-commit SHA matches | ||
| # numan/.github/workflows/ci.yml so future audit passes change in lockstep. | ||
|
|
||
| on: | ||
| pull_request: | ||
| branches: [main, master] | ||
| push: | ||
| branches: [main, master] | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| roadmap-drift: | ||
| name: Roadmap drift against numan consolidated roadmap | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| - name: Fetch consolidated roadmap from numan@master | ||
| run: | | ||
| mkdir -p docs/plans | ||
| curl --fail-with-body --silent --show-error --location \ | ||
| https://raw.githubusercontent.com/tonythethompson/numan/master/docs/plans/consolidated-multi-repo-roadmap.md \ | ||
| -o docs/plans/consolidated-multi-repo-roadmap.md | ||
| test -s docs/plans/consolidated-multi-repo-roadmap.md | ||
| grep -q "numan-registry/docs/roadmap.md" docs/plans/consolidated-multi-repo-roadmap.md | ||
| - name: Pull check-roadmap-drift.py from numan@master | ||
| run: | | ||
| mkdir -p scripts | ||
| curl --fail-with-body --silent --show-error --location \ | ||
| https://raw.githubusercontent.com/tonythethompson/numan/master/scripts/check-roadmap-drift.py \ | ||
| -o scripts/check-roadmap-drift.py | ||
| chmod +x scripts/check-roadmap-drift.py | ||
| - name: Run drift check | ||
| env: | ||
| CONSOLIDATED_ROADMAP: docs/plans/consolidated-multi-repo-roadmap.md | ||
| LOCAL_ROADMAP: docs/roadmap.md | ||
| run: python scripts/check-roadmap-drift.py | ||
| - name: Verify repo-local roadmap cross-link (defense in depth) | ||
| run: | | ||
| test -f docs/roadmap.md | ||
| grep -q "consolidated-multi-repo-roadmap" docs/roadmap.md |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| # Repo-local roadmap for numan-registry | ||
|
|
||
| This repo owns the signed official catalog, intake evidence, staging, | ||
| and production signing. The roadmap that covers the entire three-repo | ||
| plan — catalog intake, signing, plugin backfills, client compat, | ||
| lifecycle evidence, and the active-plugin gate — lives in the | ||
| consolidated cross-repo plan: | ||
|
|
||
| [**`numan/docs/plans/consolidated-multi-repo-roadmap.md`**](https://github.com/tonythethompson/numan/blob/master/docs/plans/consolidated-multi-repo-roadmap.md) | ||
|
|
||
| The cross-repo drill is enforced by | ||
| [`scripts/check-roadmap-drift.py`](https://github.com/tonythethompson/numan/blob/master/scripts/check-roadmap-drift.py), | ||
| which CI runs at `.github/workflows/roadmap-drift.yml` and which fails | ||
| this PR if the local roadmap drifts from the consolidated truth. | ||
|
|
||
| ## Repo-local detail | ||
|
|
||
| Use this page for **operational** detail that belongs only to | ||
| `numan-registry`: | ||
|
|
||
| - Stage gate evidence under `stage-evidence/` and `scripts/lifecycle-prove.py`. | ||
| - Intake state machine and candidate promotion rules. | ||
| - Signing key ceremony and protected-branch disclosure. | ||
|
|
||
| Promote any cross-repo claim back into the consolidated roadmap via a | ||
| PR against `numan/docs/plans/consolidated-multi-repo-roadmap.md` | ||
| alongside the matching code change, so the three repos stay aligned. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| #!/usr/bin/env bash | ||
| # Local sanity check that each sibling-repo CI job will pass against the | ||
| # current state of numan/scripts/check-roadmap-drift.py and the | ||
| # consolidated roadmap. Mimics what each .github/workflows/roadmap-drift.yml | ||
| # step does, but entirely offline by using the local files. | ||
| # | ||
| # Usage: bash cross-repo-mirror/snapshot-tests/mirror_dry_run.sh | ||
| # Expected: exit 0 with "pass" line for both numan-plugins and numan-registry. | ||
|
|
||
| set -euo pipefail | ||
|
|
||
| ROOT=$(cd "$(dirname "$0")/../.." && pwd) | ||
| TMP=$(mktemp -d) | ||
| trap 'rm -rf "$TMP"' EXIT | ||
|
|
||
| for sibling in numan-plugins numan-registry; do | ||
| echo "==> mirror dry-run for $sibling" | ||
| # Map the sibling name to the corresponding repo-local roadmap content. | ||
| local_roadmap="$ROOT/cross-repo-mirror/$sibling/docs/roadmap.md" | ||
| test -f "$local_roadmap" \ | ||
| || { echo "FAIL: missing $local_roadmap"; exit 2; } | ||
|
|
||
| # Stub ci.sh here: stage the consolidated roadmap, the local roadmap, and | ||
| # the script into the temp dir the way the GitHub workflow will. | ||
| cp "$ROOT/docs/plans/consolidated-multi-repo-roadmap.md" \ | ||
| "$TMP/consolidated.md" | ||
| cp "$local_roadmap" "$TMP/local.md" | ||
| cp "$ROOT/scripts/check-roadmap-drift.py" "$TMP/check.py" | ||
|
|
||
| CONSOLIDATED_ROADMAP="$TMP/consolidated.md" \ | ||
| LOCAL_ROADMAP="$TMP/local.md" \ | ||
| python "$TMP/check.py" | ||
| rc=$? | ||
| if [ "$rc" -eq 0 ]; then | ||
| echo " pass: drift check exits 0" | ||
| else | ||
| echo "FAIL: drift check exited $rc" | ||
| exit "$rc" | ||
| fi | ||
| echo | ||
| done | ||
|
|
||
| echo "ALL MIRRORS PASS" |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔍 New CI job's second step is a no-op echo, and the drift script only checks the repo it runs in
The
Mirror to numan-plugins/numan-registrystep only prints a URL; nothing is mirrored, so the job name overstates what runs. Alsoscripts/check-roadmap-drift.pyauditsdocs/roadmap.mdin the current repo, which does not exist innuman—audit_localthen emits only a warning, so the job effectively validates the consolidated roadmap alone. Note also the dead heading-pop branch in the script: the firstif HEAD_RE.match(line): heading_stack.append(line); continueatscripts/check-roadmap-drift.py:159-161makes the depth-aware pop logic at:168-174unreachable, so headings are never popped and any deferral heading permanently exempts the rest of the document.Was this helpful? React with 👍 or 👎 to provide feedback.