You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
qn stream delete-all and qn webhook delete-all are gone. A one-line
account-wide wipe is a disproportionate blast radius for a CLI command;
that operation belongs behind the API where callers script it
deliberately.
Newly confirmation-gated (Mild: --yes skips, TTY prompts, scripts get
exit 5 before any request is sent):
- endpoint bulk pause — prompt includes the endpoint count
- endpoint security token delete — notes that clients lose access
- endpoint rate-limit delete-override — notes the revert to plan limits
bulk resume stays ungated (it restores service). Existing prompts now
state the blast radius (archive is irreversible from the CLI, tag
delete is account-wide). The kv-local confirm_mild helper moved to
confirm::confirm_mild for reuse. Severity::Severe and prompt_typed
remain for future wide-blast-radius gates.
CLAUDE.md now records the severity policy; README documents the
confirmation model. Tests: each gated command verifies exit 5 with
zero requests reaching the mock without --yes, and exit 0 with it.
Copy file name to clipboardExpand all lines: CLAUDE.md
+7-1Lines changed: 7 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -73,7 +73,13 @@ Things to verify for each new endpoint:
73
73
-**Negative numbers**: any `i64` flag that accepts `-1` (`--end`, etc.) needs `#[arg(long, allow_hyphen_values = true)]` or clap will read it as another flag.
74
74
-**Multi-value flags**: prefer repeatable `--method foo --method bar` (clap `Vec<String>` with `#[arg(long = "method")]`). Optionally also accept `--methods foo,bar` via a second field with `value_delimiter = ','`. The command body extends one into the other.
75
75
-**Large `Args` structs**: clippy's `large_enum_variant` will reject an enum variant whose payload is > ~200 bytes. Box it: `Create(Box<CreateArgs>)` (we hit this on `StreamCmd::Create` and `WebhookCmd::Create`).
76
-
-**Destructive operations**: route through `confirm::decide_without_prompt(Severity::Mild|Severe, ConfirmCfg)`. Mild = single `--yes` skips, TTY prompts otherwise. Severe = `--yes --yes` skips OR user types a literal word (`delete-all`). Non-TTY without enough `--yes` returns `CliError::NeedsConfirmation` (exit 5).
76
+
-**Destructive operations**: the policy is non-negotiable —
77
+
- Anything that deletes, revokes, or loosens protection (delete/archive verbs, token revocation, removing a rate-limit override, pausing many endpoints) gets **at least `Severity::Mild`**: single `--yes` skips, TTY prompts otherwise, non-TTY without `--yes` returns `CliError::NeedsConfirmation` (exit 5). Use the `confirm::confirm_mild(&ctx, msg)` helper.
78
+
- Prompts must name the resource and the blast radius: "Pause 47 endpoint(s)? They will stop serving requests", not "Are you sure?". Include counts for bulk operations.
79
+
-**Account-wide wipe verbs (delete-all style) are not offered by the CLI at all.** Don't add one; point users at the API instead.
80
+
- Commands that restore service (`resume`, `activate`) are not gated.
81
+
-`Severity::Severe` (typed-word + `--yes --yes`) exists in `confirm.rs` for future wide-blast-radius operations; nothing uses it today.
82
+
- Every gated command needs both tests: no `--yes` non-TTY ⇒ exit 5 **and zero requests reach the mock** (`.expect(0)`); `--yes` ⇒ exit 0.
77
83
-**Args that span multiple subcommands**: for things like rate-limits where both account-level and method-level CRUD exists, use a single `RateLimitCmd` enum with `MethodList/MethodCreate/...` variants — don't fight clap by trying to nest a third level.
0 commit comments