Repository navigation
Commit e27b693
committed
Re-adopt two upstream cases and replace the fixed 50 ms readiness waits with a verified signal
The .each-inclusive survivor audit of this tree against e943530 flagged 11 rows: 4 declarations
absent and 7 rewrites. Of the absent ones, 1 is re-adopted verbatim, 2 are superseded by stronger
coverage already on this head, and 1 is re-adopted here:
- registerCommands.spec.ts: main's 'creates diagnostics from all provider instances without
requiring a visible provider' (exact-argument pinning of { context, outputChannel, providers });
the head already had a looser ObjectContaining version of the same fan-out, so this adds the
exact shape and the no-visible-provider condition. 54 -> 55 declarations.
- ExtensionStateContext.spec.tsx: main's 'does not intern messages from stale sequenced state
updates' (41 lines, harness already present). 40 -> 41 declarations.
Superseded, reported rather than re-adopted: main's 'plusButtonClicked is a no-op when no visible
provider' (this head asserts 5 things about the registered sidebar provider where main asserted 1,
and the handler resolves the registered provider through postActions()), and main's
'should handle invalid mode gracefully' in ClineProvider.sticky-mode.spec.ts - that case assumed
'the provider actually does switch to invalid modes', while this head rejects invalid modes at
ClineProvider.ts:5026/5078 and asserts it in ClineProvider.spec.ts (Ignoring invalid mode logs),
switchModeTool.spec.ts:105 and CustomModesSettings.spec.ts:61 - lower, stronger layers.
Review thread PRRT_kwDOSK-bwM6z6_R2 (api-task-control.spec.ts, coderabbitai 2026-11-05T04:20:41Z):
the two wall-clock 'await new Promise(setTimeout 50ms)' waits at lines 302 and 648 are replaced
with the fake-clock readiness signal the reviewer described: the bound in src/extension/api.ts:299-
310 arms exactly one setTimeout when the wait is entered, so both cases now advance the clock to
the first tick, assert vi.getTimerCount() === 1 as proof the wait started, and restore real timers
in a finally. Assertions per case: 1 -> 2 and 2 -> 3; no fixed delay remains in the file.
Controls, each reverted to a byte-identical production blob afterwards:
- providers: ClineProvider.getAllInstances() -> [] : catches the re-adopted fan-out case and the
existing looser one, nothing else.
- seq guard '<=' -> '<' (equal sequence treated as fresh): catches the re-adopted stale-sequenced
case.
- api.ts disposal-after-wait throw removed : catches exactly the disposal case.
- api.ts readiness block never entered : catches 4 cases including both rewritten ones via
'expected +0 to be 1' on the timer count.
Gates: prettier --check clean, eslint --prune-suppressions count-neutral (3293, reverted),
check-types clean across 13 packages, misc lane 115 files 2106 pass + 13 skip, webview-ui lane
188 files 2506 pass, and the two touched src specs green per-file (92 cases).1 parent 64ce56b commit e27b693
3 files changed
Lines changed: 84 additions & 12 deletions
File tree
- src
- activate/__tests__
- extension/__tests__
- webview-ui/src/context/__tests__
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
306 | 306 | | |
307 | 307 | | |
308 | 308 | | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
309 | 324 | | |
310 | 325 | | |
311 | 326 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
293 | 293 | | |
294 | 294 | | |
295 | 295 | | |
| 296 | + | |
296 | 297 | | |
297 | 298 | | |
298 | 299 | | |
299 | 300 | | |
300 | 301 | | |
301 | 302 | | |
302 | | - | |
303 | | - | |
304 | | - | |
305 | | - | |
306 | | - | |
| 303 | + | |
307 | 304 | | |
308 | 305 | | |
309 | | - | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
310 | 318 | | |
311 | 319 | | |
312 | 320 | | |
| |||
642 | 650 | | |
643 | 651 | | |
644 | 652 | | |
| 653 | + | |
645 | 654 | | |
646 | 655 | | |
647 | | - | |
648 | | - | |
649 | | - | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
650 | 662 | | |
651 | | - | |
| 663 | + | |
652 | 664 | | |
653 | | - | |
654 | | - | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
655 | 670 | | |
656 | 671 | | |
657 | 672 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
618 | 618 | | |
619 | 619 | | |
620 | 620 | | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
621 | 663 | | |
622 | 664 | | |
623 | 665 | | |
| |||
0 commit comments