Skip to content

feat(publish): add npm stage fallback#762

Merged
jdx merged 3 commits into
mainfrom
feat/npm-stage
May 25, 2026
Merged

feat(publish): add npm stage fallback#762
jdx merged 3 commits into
mainfrom
feat/npm-stage

Conversation

@jdx

@jdx jdx commented May 21, 2026

Copy link
Copy Markdown
Owner

Summary

  • add visible stage command wiring through the existing npm fallback path
  • generate the public CLI docs/usage entry for aube stage
  • cover fallback errors and npmPath delegation for aube stage

Tests

  • cargo fmt --check
  • mise run render
  • mise x node@24 -- ./test/bats/bin/bats test/npm_fallback.bats test/guardrails.bats

Note: stage is intentionally visible in help/docs so users get an explicit npm-compat fallback instead of an implicit script-run path.


Note

Low Risk
CLI parity only—reuses the established npm_fallback path with no new publish or auth logic.

Overview
Adds aube stage as another npm-only CLI stub so the name is claimed at the surface (like whoami / set-script) instead of falling through to implicit script execution.

The command is wired through the existing npm_fallback path: without npmPath it exits non-zero with a “not implemented — use npm stage” message; with npmPath it delegates to the configured npm binary (including --registry and trailing args). Usage spec, generated docs/cli/stage.md / commands.json, and Bats coverage for both behaviors are included.

Reviewed by Cursor Bugbot for commit 0f0e4f7. Bugbot is set up for automated code reviews on this repo. Configure here.

@jdx jdx force-pushed the feat/npm-stage branch from eab08b2 to 425baf8 Compare May 21, 2026 15:04
@greptile-apps

greptile-apps Bot commented May 21, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds stage as an npm-passthrough stub command, routing aube stage through the existing npm_fallback::run path (same as whoami, set-script, etc.) with either an error message or delegation to npmPath. Tests cover both the error-path and the npmPath delegation case.

  • CLI wiring: Commands::Stage(FallbackArgs) is registered in main.rs and dispatched to npm_fallback::run("stage", …); the KDL spec and commands.json are updated in parallel.
  • Missing hide attribute: Both main.rs (#[command(hide = true)]) and aube.usage.kdl (hide=#true) omit the hidden flag that every sibling fallback stub carries, causing stage to appear in aube --help output and in the public CLI index — contradicting the PR's stated intent of a hidden command.
  • Tests: npm_fallback.bats and guardrails.bats are well-structured and consistent with the existing fallback-test pattern.

Confidence Score: 4/5

The change is safe to merge functionally, but the stage command will be unintentionally visible in aube --help until the missing hide attributes are added.

Both main.rs and aube.usage.kdl omit the hide attribute that every other npm-fallback stub carries. This means stage surfaces in the public help output and the auto-generated CLI index, contrary to the PR's stated intent. The functional passthrough and test coverage are correct; only the visibility flag was dropped from both the Rust enum and the KDL spec.

crates/aube/src/main.rs and aube.usage.kdl both need the hide attribute added; docs/cli/index.md should drop the stage entry once those are fixed.

Important Files Changed

Filename Overview
crates/aube/src/main.rs Adds Stage variant and dispatch to npm_fallback::run("stage", …), but omits #[command(hide = true)] present on every other fallback stub, making the command visible in aube --help.
aube.usage.kdl Adds cmd stage spec mirroring sibling fallback stubs, but is missing hide=#true that set-script and others carry, so the command surfaces in generated help/docs.
test/npm_fallback.bats Adds aube stage fallback test asserting non-zero exit, "aube stage", "is not implemented", and "npm stage" — consistent with the pattern used by all other fallback stubs.
test/guardrails.bats Extends the existing npmPath delegation test to cover aube stage list @scope/pkg --json --registry=… forwarding to the fake npm binary.
docs/cli/index.md Adds stage to the public CLI index; set-script and other hidden fallback stubs are absent from this index, so this entry should be removed once hide is applied.
docs/cli/commands.json Auto-generated metadata for the new stage command; reflects "hide": false consistent with the missing hide attribute in the KDL spec and Rust enum.
docs/cli/stage.md New auto-generated doc page for stage; content is correct and consistent with sibling fallback doc pages.

Fix All in Claude Code

Reviews (6): Last reviewed commit: "fix: show npm stage fallback" | Re-trigger Greptile

Comment thread test/npm_fallback.bats
@jdx jdx force-pushed the feat/npm-stage branch 2 times, most recently from a2f306e to 9f2d891 Compare May 21, 2026 15:31

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 9f2d891. Configure here.

Comment thread crates/aube/src/main.rs
@jdx jdx force-pushed the feat/npm-stage branch from 9f2d891 to b3c7035 Compare May 25, 2026 19:37
@jdx jdx changed the title feat: add npm stage passthrough feat(publish): add npm stage fallback May 25, 2026
@jdx jdx merged commit d8afd4e into main May 25, 2026
18 checks passed
@jdx jdx deleted the feat/npm-stage branch May 25, 2026 20:33
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