Repository navigation
Commit 28eed29
test(cli): parse suites onto hermetic::try_parse (T56) (#1978)
* Start T56: parse suites onto hermetic::try_parse
Assisted-by: Claude Code:claude-opus-5-5
* Parse suites onto hermetic::try_parse
The cli_parse_* suites and cli_global_args kept four ways to keep
ambient SOCKET_* vars out of a parse: four copies of EnvScrub with
drifted hand lists, scan's with_clean_env, global_args' save/restore,
and nothing at all in list, remove and main (SOCKET_JSON=true failed
them). Every parse now goes through hermetic::try_parse, which drops
every SOCKET_* var once per process. Tests that set a var use the new
common/clap_parse.rs try_parse_with_env and stay #[serial]; get, list,
remove and main need no #[serial] at all.
The four hand Snap mirrors of GlobalArgs (get and repair missed four
fields, vendor nine, vex one) are replaced by one hand-written
GlobalArgs literal compared through Debug, so a new global field fails
to compile instead of going unchecked. The scrub self-tests, which
only tested the deleted lists, are gone.
Fixes #1956
Assisted-by: Claude Code:claude-opus-5-5
* Keep forced opt-outs in list and remove parses
cli_parse_list and cli_parse_remove call list::run and remove::run
in-process on parallel threads. The once-per-process SOCKET_* scrub
removed SOCKET_TELEMETRY_DISABLED and SOCKET_NO_CONFIG under them, so
those runs could read a developer's socket login and send telemetry.
Their parses now go through try_parse_keeping_opt_outs, which keeps
and forces hermetic::FORCED_OPT_OUTS on; their default oracle expects
no_telemetry true accordingly.
cli_global_args' last hand set_var/remove_var pairs move onto
try_parse_with_env, so a failed assert no longer leaks a var into
later tests, and scan's defaults test compares the whole GlobalArgs
against the shared oracle.
Assisted-by: Claude Code:claude-opus-5-5
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 7ee8452 commit 28eed29
10 files changed
Lines changed: 418 additions & 1471 deletions
File tree
- crates/socket-patch-cli/tests
- common
Large diffs are not rendered by default.
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | 16 | | |
18 | 17 | | |
| 18 | + | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | | - | |
22 | | - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
23 | 26 | | |
24 | 27 | | |
25 | 28 | | |
| |||
31 | 34 | | |
32 | 35 | | |
33 | 36 | | |
34 | | - | |
| 37 | + | |
35 | 38 | | |
36 | 39 | | |
37 | 40 | | |
| |||
44 | 47 | | |
45 | 48 | | |
46 | 49 | | |
| 50 | + | |
| 51 | + | |
47 | 52 | | |
48 | | - | |
49 | | - | |
50 | | - | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
51 | 56 | | |
52 | 57 | | |
53 | 58 | | |
| |||
70 | 75 | | |
71 | 76 | | |
72 | 77 | | |
73 | | - | |
| 78 | + | |
74 | 79 | | |
75 | 80 | | |
76 | 81 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | 10 | | |
12 | | - | |
| 11 | + | |
13 | 12 | | |
14 | 13 | | |
| 14 | + | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
18 | 22 | | |
19 | 23 | | |
20 | 24 | | |
21 | | - | |
| 25 | + | |
22 | 26 | | |
23 | 27 | | |
24 | 28 | | |
25 | 29 | | |
26 | 30 | | |
27 | 31 | | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
28 | 40 | | |
29 | 41 | | |
30 | 42 | | |
| |||
33 | 45 | | |
34 | 46 | | |
35 | 47 | | |
36 | | - | |
37 | | - | |
38 | 48 | | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
| 49 | + | |
43 | 50 | | |
44 | 51 | | |
45 | 52 | | |
| |||
49 | 56 | | |
50 | 57 | | |
51 | 58 | | |
52 | | - | |
53 | | - | |
54 | 59 | | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
| 60 | + | |
59 | 61 | | |
60 | 62 | | |
61 | 63 | | |
| |||
153 | 155 | | |
154 | 156 | | |
155 | 157 | | |
156 | | - | |
| 158 | + | |
157 | 159 | | |
158 | 160 | | |
159 | 161 | | |
| |||
163 | 165 | | |
164 | 166 | | |
165 | 167 | | |
166 | | - | |
| 168 | + | |
167 | 169 | | |
168 | 170 | | |
169 | 171 | | |
| |||
0 commit comments