Skip to content

feat(core): admin CLI parity — token issue, user create, backup, restore, status (WI-1751) - #1081

Merged
thedancingdeveloper merged 4 commits into
rust-corefrom
wi-1751-core-admin-cli
Oct 17, 2026
Merged

thedancingdeveloper merged 4 commits into
rust-corefrom
wi-1751-core-admin-cli

Conversation

@thedancingdeveloper

Copy link
Copy Markdown
Contributor

Closes the parity and CLI-error gaps in vogt-core's admin verbs (status, user create, token issue, backup, restore) so WI-1078 (I3 image swap) can proceed.

  • argparse-style usage errors (exit 2, usage synopsis on stderr), including a missing required argument reported before any secret file/stdin is read
  • unreadable secret file/stdin is a domain error (exit 1)
  • engine/core/tests/admin_cli.rs: binary-level tests for the five verbs
  • parity script steps + golden 21c95f6 re-recorded from Python

Review (head 9391567): no blockers. fmt, clippy -D warnings, cargo test -p vogt-core (864 + 8 + 4 + 3) pass. Coverage is in-process / local binary only; not run against vogt-dev or vogt-prod.

🤖 Generated with Claude Code

sprooty and others added 4 commits October 17, 2026 08:36
A value the CLI cannot convert (token issue --expires-in-days x, a bad
choice) now prints the usage synopsis and the 'vogt <cmd>: error:' line on
stderr, as argparse does, instead of the full help page on stdout. An
unreadable --password-file or stdin secret is a domain error (exit 1, on
stderr) where Python exits 1 too.

Adds engine/core/tests/admin_cli.rs, which drives status, user create,
token issue, backup and restore through the binary. openapi.rs is
reformatted by cargo fmt (pre-existing drift on rust-core).

Signed-off-by: sprooty <sprooty@sprooty.com>
Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
…1c95f6 from Python (WI-1751)

Adds the CLI token issue step the script lacked (it had only the HTTP one),
a non-positive expiry refusal, a second backup over a non-empty destination,
and restore without --confirm. Golden cli, http and mcp are re-recorded from
the Python core at main 21c95f6; rust-core agrees on all three transports.

Signed-off-by: sprooty <sprooty@sprooty.com>
Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
…(WI-1751)

collect_params read --password-file and --password-stdin before it checked
the required non-secret flags, so a missing file or a waiting stdin came
ahead of the usage error. The required check now runs first, and stdin is
read only after it. Adds a test for user create with no --username and a
missing password file: exit 2 with argparse's usage line.

Signed-off-by: sprooty <sprooty@sprooty.com>
Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
…WI-1751)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: sprooty <sprooty@sprooty.com>
@thedancingdeveloper
thedancingdeveloper merged commit 4dc59e4 into rust-core Oct 17, 2026
8 of 14 checks passed
@thedancingdeveloper
thedancingdeveloper deleted the wi-1751-core-admin-cli branch October 17, 2026 08:51
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