Repository navigation
Commit d29b7a3
committed
test: intercept the commit rename by identity, not by spelling
The windows leg at a06845b came back 13 failed instead of 20, and the two clusters split apart
cleanly. job 128591015715 (run 42434722070) shows zero StagingPathError: the eight staging-guard
failures are gone, so the guard fix works on the runner. What is left is one file and one payload
AssertionError: expected 'WRITE_COMPLETED\n' to contain 'EXIT_AT_REPLACEMENT_RENAME'
at safeWriteJson.interruption.test.ts:215 for the twelve recovery cases and :328 for the junction
case. WRITE_COMPLETED means the child's fault hook never recognised the commit rename at all, so
the write finished. ubuntu passed the same file, and it passes locally here, because neither box
presents the condition; the runner does.
The hook decided by text plus fs.realpath: compare the resolved destination against the parent's
path and against realpathSync(target), and otherwise compare realpathSync(destination) with
realpathSync(target). That cannot work where one directory answers under two spellings. Measured
on a real 8.3 alias pair on this box, feeding the shipped matcher both spellings:
target spelled LONG, destination spelled through the alias: committed matcher false
target spelled SHORT, destination spelled the long way: committed matcher false
a file in another directory, either spelling: false (correct)
and the runner's own data says the same thing from the other side: the staging-guard message that
used to appear there expected the long spelling of the temp directory and got RUNNER~1 for the
same directory, which is what its canonicaliser handed back. Two canonicalisations that do not
agree, so no amount of canonicalising on one side matches the other. fs.stat reports one identity
for both spellings, so the interception decision is now taken on identity: same path text, or same
case-insensitive path text on win32, or the same dev+ino, or - when the destination is not on disk
yet and has no identity of its own - the same directory identity plus the same basename. The
negative case is unchanged: a staging file under another directory's alias is still not the commit.
Pinned by a test instead of by a platform that cannot show the condition. The child now answers a
matcher self-check (INTERRUPTION_MODE=matcher) without building or writing anything, and
'recognises the commit rename through a short-name alias, and refuses another directory' creates
two long-named directories, asks cmd for their 8.3 spellings, and asserts the decisions from both
spellings. Against the shipped matcher it fails with 'alias: false' (S268: 1 failed | 13 passed);
after the change all 14 pass (S270, S272). It returns early on non-win32 and when a volume
generates no short names, so it cannot fail the way the alias spec did on ubuntu.
Gates (pinned v22.23.4): vitest.misc.config.ts on this file 14 passed; src tsc --noEmit exit 0;
eslint --prune-suppressions --max-warnings=0 on the file exit 0 with no count delta (265 entries
both sides) and eslint-suppressions.json left at blob 42be144; prettier clean; knip exit 0.
Note for whoever reads the next windows run: this leg aborted at test:misc, so the services shard -
and with it safeWriteText.alias.spec.ts - has not executed on windows yet at any head.
Mutation preflight skipped and said out loud: the unit is far over the advisory cap.
Refs: #19111 parent a06845b commit d29b7a3
1 file changed
Lines changed: 141 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
47 | 48 | | |
48 | | - | |
49 | | - | |
50 | | - | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
51 | 53 | | |
52 | 54 | | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
57 | 73 | | |
58 | 74 | | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
59 | 80 | | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
60 | 89 | | |
61 | 90 | | |
62 | 91 | | |
| |||
79 | 108 | | |
80 | 109 | | |
81 | 110 | | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
82 | 122 | | |
83 | 123 | | |
84 | 124 | | |
| |||
346 | 386 | | |
347 | 387 | | |
348 | 388 | | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
349 | 476 | | |
0 commit comments