Repository navigation
Commit 7f9ebb4
test+fix(checkpoints): correct the delete-ordering mock, kill the handoff-count vacuity, make the move recovery write owner-only
Three review rows on fc11d6d measured true and are addressed here:
1. applyPatchTool.execute.spec - unlink is one shared double and mockRejectedValueOnce orders by
call, not by path, arming the rejection on the FIRST delete while the case comment claimed the
second. Armed after a resolved call now, and the case asserts both paths were attempted and that
exactly two unlinks happened - a first-delete failure stops the loop before the second path.
2. Same file - a handoff that never happened used to be the strongest pass: `invocationCallOrder[0] ??
Infinity` makes any checkpoint order beat an absent handoff. The call count is asserted before the
order in both cases (a comparison against Infinity cannot fail when the call never happens).
3. ApplyPatchTool.ts recovery write now uses { encoding: "utf8", mode: 0o600, flag: "wx" } to match
the staging write in the same function: a recovery copy holds private content, and truncating
whatever already stands at that name would destroy a file instead of preserving it.
4. ClineProvider.spec gained a handler-side round trip for perWriteCheckpoints (updateSettings through
the message handler, then globalState.update and getState). Every other per-write assertion in
that file drives contextProxy directly, so a handler that dropped the key left them all green.
Control (pinned node v22.23.4, .tmp-node22): with the parent impl blob 14ad81b on disk - parent
blob verified by git hash-object - a mode/flag assertion on the recovery write fails; with 0827272
it passes. The recovery branch itself still has no test: driving it needs the staging rename, a
failing source unlink and a failing destination removal through doubles that are shared and not reset
between cases, and two attempts to arm that combination through the execute harness did not reach the
branch (logs 1404-recovery-*-node22.log). git grep shows zoo-recovery appears once in the tree - the
write site - so no existing assertion covered it before and none was altered. The behavioural change
therefore lands with the row left answered-and-open pending a test.
Gates: applyPatchTool.execute.spec 31/31 and ClineProvider.spec 322/322 on pinned v22.23.4;
vitest.core.config.ts and vitest.misc.config.ts green (core 4158 passed / 9 skipped, misc 2014 passed
/ 15 skipped) on the same pinned runtime; tsc --noEmit and knip clean on box node v25.9.0; eslint
--prune-suppressions --max-warnings=0 clean on all three touched files with .eslintcache cleared after
the last prettier write; src/eslint-suppressions.json byte-identical to the parent 32555c4; the
new handler test uses no cast because that file sits at its suppressed no-explicit-any budget of 195.
No locale file touched: check-translations compares keys across locales and all 18 settings.json files
already carry perWriteCheckpoints, so the wording clarification is a translator-visible change left
answered-and-open rather than 17 machine-translated strings pushed on a maintainer's behalf.
Co-Authored-By: Claude <[email protected]>1 parent fc11d6d commit 7f9ebb4
3 files changed
Lines changed: 43 additions & 3 deletions
File tree
- src/core
- tools
- __tests__
- webview/__tests__
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
642 | 642 | | |
643 | 643 | | |
644 | 644 | | |
645 | | - | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
646 | 653 | | |
647 | 654 | | |
648 | 655 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
323 | 323 | | |
324 | 324 | | |
325 | 325 | | |
326 | | - | |
327 | | - | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
328 | 332 | | |
329 | 333 | | |
330 | 334 | | |
| |||
338 | 342 | | |
339 | 343 | | |
340 | 344 | | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
341 | 349 | | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
342 | 356 | | |
343 | 357 | | |
344 | 358 | | |
| |||
362 | 376 | | |
363 | 377 | | |
364 | 378 | | |
| 379 | + | |
| 380 | + | |
365 | 381 | | |
366 | 382 | | |
367 | 383 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4214 | 4214 | | |
4215 | 4215 | | |
4216 | 4216 | | |
| 4217 | + | |
| 4218 | + | |
| 4219 | + | |
| 4220 | + | |
| 4221 | + | |
| 4222 | + | |
| 4223 | + | |
| 4224 | + | |
| 4225 | + | |
| 4226 | + | |
| 4227 | + | |
| 4228 | + | |
| 4229 | + | |
| 4230 | + | |
| 4231 | + | |
| 4232 | + | |
| 4233 | + | |
4217 | 4234 | | |
4218 | 4235 | | |
4219 | 4236 | | |
| |||
0 commit comments