Repository navigation
Commit ddda5ce
committed
test(webview): pin what each store holds when a registration write fails
The existing case already proves the rolled-back id and the later retry. It did not say anything
about what the two stores hold in the interval, which is the half that a compensating-write
question turns on. Three assertions now pin it: the durable record still keys the entry under the
temporary id with its mode intact, the stable key was never created durably, and the payload
ContextProxy holds for viewStates is the same map the durable store holds - so a registration that
was rolled back cannot be visible through one store and invisible through the other.
Control for the new assertions, run rather than described: make the failing write partially
durable - apply the value to globalState, then reject - and exactly one test in core/webview
fails, at Test Files 1 failed | 33 passed (34), Tests 1 failed | 955 passed (956), and it is this
case, so the pins have teeth. The removal control on the behaviour itself: delete the rollback
line at ClineProvider.ts:973 and core/webview goes red at Test Files 1 failed | 33 passed (34),
Tests 13 failed | 943 passed (956), thirteen cases, which is the rollback being load-bearing
rather than this assertion being fussy. With production restored: 34 files, 956 tests, 0 failures;
tsc exit 0; eslint --max-warnings=0 exit 0; prettier --check exit 0; suppressions untouched.
Test-only, and excluded from the mutation bucket by scripts/stryker-diff.mjs:85.
Note for whoever reads this next: this PR has no compensating write on the re-key path at all
(rekeyPersistedViewStateEntry at ClineProvider.ts:813-857 issues one write and rolls nothing
back), so these pins hold the interval on the shape that exists here rather than claiming the
shape of #2226's fix, which is tracked separately on the board.1 parent 0a77cf8 commit ddda5ce
1 file changed
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5785 | 5785 | | |
5786 | 5786 | | |
5787 | 5787 | | |
| 5788 | + | |
| 5789 | + | |
| 5790 | + | |
| 5791 | + | |
| 5792 | + | |
| 5793 | + | |
| 5794 | + | |
| 5795 | + | |
| 5796 | + | |
5788 | 5797 | | |
5789 | 5798 | | |
5790 | 5799 | | |
| |||
0 commit comments