Repository navigation
Commit f2f785d
committed
test(guarded-write): bind the FIFO chain to blocked publishes and a pending reset
Three review asks on src/core/tools/__tests__/guardedWrite.spec.ts were about assertions
this file did not carry, so they are landed as executable rows rather than as code:
- a third write is now queued behind a *blocked* second write on the same path, which the
shipped eviction row (two rapid writes behind an idle tail) does not cover.
- the independence row now holds the first path's publish open and requires the second
path to settle while it is held, releasing the gate in finally. As shipped it ran both
writes against a writer that resolves immediately, so a single global queue passed it.
- a pending-link row: resetChain() runs while a publish is in flight and the later write
must reach safeWriteText anyway, which is detachment rather than ordering.
Answers review roots PRRT_kwDOSK-bwM61KUmV, 607 (…61KUml) and PRRT_kwDOSK-bwM61KUmq.
These rows bind behavior the head already had, so their controls are negations of that
behavior, run against src/core/tools/guardedWrite.ts as it stands at 6b7d45e with the
probe reverted before commit:
- PROBE N1 (enqueue ignores any pending tail): row "keeps a third write queued behind a
blocked second write on the same path" exit 1 - "expected [ 'start:second',
'start:third', …(1) ] to deeply equal [ 'start:second' ]".
- PROBE N2 (one queue for every path): row "writes on different paths are independent
(no cross-path serialization)" exit 1 - "Test timed out in 20000ms."
- PROBE N3 (resetChain does nothing): row "detaches a pending link so a later write runs
while the blocked one is still held" exit 1 - "Test timed out in 20000ms."
With the implementation as shipped the file is exit 0: Tests 44 passed (44).1 parent 6b7d45e commit f2f785d
1 file changed
Lines changed: 109 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
469 | 469 | | |
470 | 470 | | |
471 | 471 | | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
472 | 512 | | |
473 | 513 | | |
474 | 514 | | |
475 | 515 | | |
476 | 516 | | |
477 | 517 | | |
478 | 518 | | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
479 | 535 | | |
480 | 536 | | |
481 | | - | |
482 | 537 | | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
483 | 550 | | |
484 | 551 | | |
485 | 552 | | |
| |||
636 | 703 | | |
637 | 704 | | |
638 | 705 | | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
639 | 747 | | |
640 | 748 | | |
641 | 749 | | |
| |||
0 commit comments