Repository navigation
Commit 8cde997
committed
fix(guards): close the core/Lab directory bypass and the release dry-run dead end
Two false-confidence defects found while auditing main..dev. Neither
came from that range; both are mechanisms the range is relying on.
The core/Lab guard matched only specifiers containing "/lab/". Since
src/lab/index.ts exists, `import("../lab")` resolves to the Lab
entrypoint while matching none of its three patterns:
source : void import("../lab");
Guard 1 detects : false
The self-test that claims to protect the guard re-declared its own copy
of the regex, so it proved a local literal behaved rather than that the
guard did -- a copy cannot fail when the original drifts. The predicate
is now a single shared function that both the guard and its self-test
call, and it matches the bare directory specifier.
The release helper's documented "re-run with --publish" path could never
complete. A dry run bumps, commits, and pushes the version deliberately,
so the second invocation hits `npm version <same>` and exits "Version
not changed" before dispatching anything. The bump and the push are now
treated as a desired end state rather than as actions that must happen
every time, so the second run reuses the release commit the first one
made.1 parent c5fc969 commit 8cde997
2 files changed
Lines changed: 59 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
380 | 380 | | |
381 | 381 | | |
382 | 382 | | |
383 | | - | |
384 | | - | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
385 | 397 | | |
386 | | - | |
387 | | - | |
388 | | - | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
389 | 406 | | |
390 | | - | |
391 | | - | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
392 | 413 | | |
393 | 414 | | |
394 | 415 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
103 | 122 | | |
104 | 123 | | |
105 | 124 | | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
| 125 | + | |
113 | 126 | | |
114 | 127 | | |
115 | 128 | | |
| |||
156 | 169 | | |
157 | 170 | | |
158 | 171 | | |
159 | | - | |
160 | | - | |
161 | | - | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
162 | 182 | | |
163 | | - | |
| 183 | + | |
164 | 184 | | |
165 | 185 | | |
166 | 186 | | |
| |||
0 commit comments