fix(cli): clarify Server removal inputs and upgrade outcomes #3181
All Vouch review confidence checks passed
Residual risk 0.21 = Change Risk (0.50) × (1 − Review Confidence (0.57)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.50 · 565 lines diff across 7 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.379
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #3181"
general
weight: 0.35
nick-potts
Summary
Clarify Server lifecycle CLI input and outcome reporting for #2861 and #2849.
Direct upgrade JSON adds the observed
from_versionand, when known,change. Existing fields, RPC, and schemas keep their meaning. Repeated Volume acceptances remain harmless. The user guide describes the new output.The CLI has no shared release resolver. It maps both current and older daemon missing-release responses, so direct upgrades do not require a separate CLI connection to GitHub.
Evidence
The committed regression tests ran before the fix. Removal process tests failed 3 of 3 on the empty list, missing Volume sentence, and absent approval warning. Upgrade process tests failed 4 of 4 on same-version and downgrade wording, missing JSON metadata, and the
internalmissing-release code.Focused after-checks passed in
core/withCARGO_BUILD_JOBS=4and the sharedCARGO_TARGET_DIR:cargo test -p ployz --test cli_shape server_rm_empty_name_uses_server_wording -- --nocapture: 1 passed.cargo test -p ployz --test connect server_rm_ -- --nocapture: 3 passed.cargo test -p ployz --test connect upgrade_cli_ -- --nocapture: 5 passed.cargo test -p ployz --lib handlers::server::upgrade::tests:: -- --nocapture: 19 passed.cargo test -p ployz --lib handlers::verbs::tests::a_verb_the_docs_show_names_its_page -- --nocapture: 1 passed.cargo clippy -p ployz --all-targetsandcargo fmt --check: passed.The built
ployzbinary and process tests produced these before and after observations. The before cases are from #2861 and #2849, except the isolated empty-name run recorded before this fix.| Case | Before | After |
| --- | --- | --- |
| Empty Server name | Isolated CLI exited 1 with
Not signed in to Cloud.before validation; the connected issue run exited 2 withinvalid Machine Targetwording. | Built CLI exits 2 withinvalid_argumentandName a Server by name or ID.|| Extra Volume acceptance on a Server with no Volumes | Exit 2,
Actual affected volumes: .| Exit 2,Server machine-1 holds no Volumes; drop --accept-volume-loss. No changes made.|| First removal refusal for a Volume holder | Exit 2, only asked for the Server name. | Exit 2,
Server machine-1 holds Volumes: data.in the refusal and JSON error. || Standalone
--approval xyz| Removal succeeded with no warning. | Removal succeeds, exit 0, with--approval applies only when Ployz Cloud manages the Server.in stderr and JSONwarnings. || Missing release
9.9.9| Exit 3, daemonno checksums.txtwording and JSONinternal. | Exit 1,No Ployz release 9.9.9.and JSONfollow_up_error.code: not_found. || Same version and downgrade | Both said
UpgradedandEverything is up to date. |Server machine-1 already runs 1.2.3.orDowngraded Server machine-1 from 1.2.4 to 1.2.3.The direct upgrade tests assert the old note is absent. |Merge Danger
Door: Two-way. This changes CLI reporting only. It changes no Machine operation, wire format, or persisted schema.
Blast Radius: CLI. The shared removal handler also gives
server forgetearly Server wording and the standalone approval warning. The infrastructure no-op text also appears during server setup.Empty names now exit 2 before connection lookup; the isolated before run exited 1. Connected invalid-name and no-Volume acceptance refusals remain exit 2. The issue's upgrade exit 3 to exit 1 correction already exists on main and is preserved; a definitive first missing-release failure exits 1, while partial or uncertain runs stay 3. The new
ui::warnadds JSONwarningswithout changing the exit code. No new refusal applies to valid input.Bets touched in
core/DESIGN.md: Stable promise keeps JSON additive; 4. Partial results are outcomes preserves failed versus partial exits; 7. Cloud drives, never owns warns when Cloud approval has no role; 8. Evidence over claims reports observed versions and Volume names; 10. Client-first, daemon when forced keeps the fix in the CLI. No red flag is crossed.Closes #2861.
Closes #2849.