1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
//! Integration test crate entry point for `claude_profile`.
//!
//! Includes all integration test modules. Tests invoke the compiled binary
//! via subprocess using `CARGO_BIN_EXE_clp`.
//!
//! ## Coverage Summary
//!
//! This file wires together all CLI integration submodules. Each module covers
//! one functional domain of the `clp` binary:
//!
//! | Module | Domain | Test Series |
//! |--------|--------|-------------|
//! | `accounts_test` | help, `.accounts` command | H, ACC |
//! | `account_mutations_test` | account save, use, delete, relogin | AS, AW, AD, AR |
//! | `token_paths_test` | token status, paths | TS, P |
//! | `cross_cutting_test` | idempotency, param order, exit codes, env | X, E |
//! | `usage_test` | .usage live quota (all accounts) | IT |
//! | `usage_feature_test` | .usage feature AC coverage | FT |
//! | `persist_test` | `PersistPaths` resolution | P |
//! | `credentials_test` | .credentials.status | cred |
//! | `credentials_status_help_test` | .credentials.status.help descriptions | csh |
//! | `account_limits_test` | .account.limits error paths | lim |
//! | `account_rotate_test` | .account.rotate redirector (DEPRECATED) | ROT |
//! | `usage_rotate_test` | Feature 038 `.usage rotate::1` strategy-driven rotation | FT |
//! | `dot_test` | `.` / `.help` help output | dot |
//! | `param_help_test` | convenience closure param descriptions + optionality | phd, pho |
//! | `account_inspect_test` | .account.inspect diagnostic command | AI |
//! | `account_assign_test` | `.accounts assign::1` marker write | AA |
//! | `set_model_test` | `set_model::` explicit session model override | FT, EC |
//! | `model_test` | `.model` get/set command (Feature 035) | FT |
//! | `type_test` | CLI type boundary contracts (`AccountName`, `OutputFormat`, `WarningThreshold`, `AccountSelector`) | TC |
//! | `invariant_test` | Architectural invariant assertions (zero deps, cross-platform, clear errors, atomic, etc.) | IN |
//! | `command_verb_test` | Command-verb behavioral contracts (save, use, delete, limits, relogin, rotate, renewal, inspect, assign, status) | BV |
//! | `command_noun_test` | Command-noun contracts (account, token, credentials) | NC |
//! | `user_story_test` | User acceptance tests — account rotation, onboarding, quota monitoring, automation, diagnostics | UA |
//!
//! ## Parallel Execution Note
//!
//! These tests spawn the `claude_profile` binary as a subprocess. Under heavy
//! workspace-wide parallel nextest execution, process spawning resource contention
//! can cause intermittent failures (e.g. `x06_param_order_independence_token`).
//! If a test fails here while passing in isolation, run with
//! `cargo nextest run -p claude_profile --no-fail-fast` to distinguish contention
//! from a genuine logic regression. The tests themselves are deterministic.