feat(cli): warn when aube update --depth is set#473
Conversation
`--depth` was parsed for pnpm parity and silently swallowed. aube only refreshes direct deps (pnpm's `--depth 0` default), so any other value is a no-op the user has no way to discover. Emit a one-line warning pointing at `rm aube-lock.yaml && aube install` for the genuine refresh-transitives case. Triaged won't-support in test/PNPM_TEST_IMPORT.md (update.ts:599): intermediate values (`--depth 1`, `--depth 2`) have semantics that even pnpm users get tripped up on; the only useful value is `--depth Infinity`, served by the workaround above. Regression-guarded by a new bats case asserting both the warning's shape and that bare `aube update` stays silent. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Greptile SummaryAdds a one-line Confidence Score: 5/5Safe to merge — change is limited to emitting a warning on an already-ignored flag; no resolution, lockfile, or manifest write logic is altered. All changes are additive: a single eprintln! guarded by an Option check, a targeted None-clear on the per-package clone, and documentation/test updates. No existing code paths are modified beyond the ignored-flag suppression block. No files require special attention. Important Files Changed
Reviews (4): Last reviewed commit: "fix(cli): emit --depth warning once acro..." | Re-trigger Greptile |
clap merges multi-line `///` doc comments into one paragraph for short help (`-h`), and only splits on the first blank `///` line to produce a separate first-line summary. The `--latest` doc was written as one continuous paragraph, so `aube update -h` rendered it as a 200+ char line that wrapped awkwardly. Move the qualifier into a second paragraph so the short-help line stays at "Update past the manifest range" — same shape every other multi-paragraph flag in this file already uses (`--exact`, `--global`, `--interactive`, `--depth`, …). Regenerated `aube.usage.kdl` and `docs/cli/*` via `mise run render`. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 530fdee. Configure here.
Benchmark changesPublic ratios: warm installs vs Bun 4x -> 6x; warm installs vs pnpm 9x -> 9x.
90bbef6 vs 7d7ded0 | aube/bun/pnpm | 3 scenarios | 3 runs | 500mbit/50ms | generated by Codex. |
`run_filtered` clones the args for each matched workspace package and re-invokes `run`, which would emit the `--depth ignored` warning once per project on top of the top-level emission (1 + N). Clear `depth` on the per-pkg clone so only the outermost call warns. Regression-guarded by a new bats case that runs `aube -r update --depth Infinity` across a 3-project workspace and asserts exactly one occurrence of the warning in stderr. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Addressed Cursor Bugbot's low-severity finding: `--depth` warning was firing 1 + N times in workspace mode (`aube -r update --depth Infinity` against an N-project workspace) because `run_filtered` re-invokes `run` with the same `args` per project. Cleared `per_pkg.depth = None` on the cloned args before each recursive call so only the outermost `run` emits the warning. Regression-guarded by a new bats case that fans out across a 3-project workspace and asserts exactly one occurrence of the warning in stderr. PR #478 (the codebase-wide doc-comment audit) had no inline review issues — only Greptile's summary. Written with Claude. |
## Summary clap merges multi-line `///` doc comments into one paragraph for short help (`-h`) and only splits on the first blank `///` line to produce a separate first-line summary. Several flags across the CLI were written as one continuous paragraph, so `aube <cmd> -h` rendered them as 120+ char lines that wrapped awkwardly on standard terminals. This PR splits each offender's doc comment into a short summary line + blank `///` separator + the longer prose — same shape `update --latest` already uses (precedent: #473). ## Flags fixed - `add -g, --global`, `--no-save`, `--save-catalog`, `--save-catalog-name`, `-w, --workspace` - `approve-builds [PKG]...` (positional doc), plus the subcommand summary on `aube --help` - `audit --ignore-unfixable` - `check` subcommand summary on `aube --help` - `clean -l, --lockfile` (also reflects to `purge`) - `config list --all`, `--json` - `dlx -c, --shell-mode` - `find-hash --json` - `init --init-package-manager` - `install --fix-lockfile`, `--force`, `--lockfile-dir`, `--merge-git-branch-lockfiles`, `--resolution-mode`, `--verify-store-integrity` - `link -g, --global` - `list --long` - `patch --ignore-existing` - `patch-remove [PACKAGES]...` - `publish --force`, `--ignore-scripts`, `--json` - `query <SELECTOR>` - `remove -w, --workspace` - `run --parallel` - `store status` subcommand summary - `update -L, --latest` (same fix as #473, included here since that PR is still open) - `version [NEW_VERSION]` - `view <PACKAGE>`, `[FIELD]` ## Validation - `cargo build --workspace` — clean - `cargo clippy --all-targets -- -D warnings` — clean - `cargo fmt --check` — clean - Audit before/after: lines >120 chars went from 6 to 0; lines >115 from 1 to 0 - Sample audit script: `for cmd in $(aube --help | grep -E '^ [a-z]' | awk '{print $1}'); do aube "$cmd" -h 2>&1 | awk 'length > 120'; done | grep -vE '\[possible values:|\[aliases:'` CLI docs regenerated via `mise run render` (`aube.usage.kdl`, `docs/cli/commands.json`, `docs/cli/*.md`). ## Test plan - [x] `cargo build --workspace` - [x] `cargo clippy --all-targets -- -D warnings` - [x] `cargo fmt --check` - [x] Re-ran `aube <cmd> -h` for every fixed subcommand to confirm short help is now one clean summary line and `aube <cmd> --help` still shows the full prose 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Pure CLI help-text/doc updates plus regenerated docs/command metadata; no behavior or parsing logic changes, so risk is low aside from potential wording/regeneration drift. > > **Overview** > Tightens CLI `-h` output by splitting many commands/flags’ descriptions into a short first-line summary plus separate long help, avoiding overly long wrapped lines in terminal help. > > Updates the usage spec (`aube.usage.kdl`), clap doc comments across multiple command arg structs, and regenerates the derived CLI docs (`docs/cli/*.md`) and `docs/cli/commands.json` to reflect the new short/long help text (including `approve-builds`, `check`, `publish`, `install`, `run`, etc.). > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 3e243a3. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY --> Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

Summary
aube update --depth Nwas parsed for pnpm parity and silently ignored. Now it emits a one-line warning pointing atrm aube-lock.yaml && aube installfor the only useful semantic case (--depth Infinity/ refresh transitives).aube updatestays silent.Why now
Triaged won't-support in #471: intermediate values (
--depth 1,--depth 2) have semantics that even pnpm users get tripped up on. aube only ever refreshes direct deps (pnpm's--depth 0default), so any other value is a no-op the user has no way to discover. The warning closes that loop.Test plan
cargo build --workspace— greencargo clippy --all-targets -- -D warnings— cleancargo fmt --check— cleanmise run test:bats test/pnpm_update.bats— 23/23 pass (+1 newaube update --depth: parsed-but-warn)Note
Low Risk
Low risk: behavior is unchanged except when
--depthis provided, where an extra stderr warning could affect scripts that assert on exact output.Overview
aube updatenow prints a one-line warning when--depthis provided, clarifying that the flag is ignored and pointing users torm aube-lock.yaml && aube installfor a full transitive refresh.The warning is emitted only once even under recursive workspace fanout, and CLI/help text + generated docs are updated accordingly; new bats tests assert the warning behavior and that plain
aube updatestays silent.Reviewed by Cursor Bugbot for commit 90bbef6. Bugbot is set up for automated code reviews on this repo. Configure here.