Repository navigation
Commit db91b88
committed
fix(test): stop asserting a scheduling race in the forged-identity test
daemon_runtime_rejects_forged_identity_extension failed on the
macos-15-intel CI leg. The suite is untouched by this branch and no
daemon production code changed here; the leg flakes on main too, so this
is a pre-existing defect the lane surfaced rather than a regression.
The test asserted that transmitting the forged frame SUCCEEDS. It cannot
be relied on to. The forged HELLO is 149 bytes against the 137-byte
first-frame envelope cap, so the worker rejects it from the header and
closes without ever reading the payload -- deliberately, so that no
attacker-controlled bytes are read. send_frame writes the header and the
payload as two separate writes, so whether the payload write lands before
that close is pure scheduling: it wins on an idle host and loses on a
loaded 4-vCPU runner. Both outcomes ARE the rejection, so the transmit
result is now recorded and not asserted.
Anti-vacuousness is preserved rather than dropped: the test now asserts
it connected at all, and the drain check waits for the state it asserts
(wait_for_clients 0) instead of sampling the count once, so the bound is
a liveness backstop and never the verdict.
Verified by mutation, not just by passing: with the envelope cap raised
to 512 and the exact-length check removed -- a daemon that accepts the
forged identity -- the repaired test goes RED on ASSERT(rejected). The
mutation was reverted and the suite is 43/43 green.
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>1 parent b3fb668 commit db91b88
1 file changed
Lines changed: 20 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2666 | 2666 | | |
2667 | 2667 | | |
2668 | 2668 | | |
| 2669 | + | |
2669 | 2670 | | |
2670 | 2671 | | |
2671 | 2672 | | |
| |||
2679 | 2680 | | |
2680 | 2681 | | |
2681 | 2682 | | |
| 2683 | + | |
2682 | 2684 | | |
| 2685 | + | |
| 2686 | + | |
| 2687 | + | |
| 2688 | + | |
| 2689 | + | |
| 2690 | + | |
| 2691 | + | |
| 2692 | + | |
| 2693 | + | |
2683 | 2694 | | |
2684 | 2695 | | |
2685 | | - | |
2686 | | - | |
2687 | | - | |
| 2696 | + | |
| 2697 | + | |
| 2698 | + | |
| 2699 | + | |
| 2700 | + | |
| 2701 | + | |
| 2702 | + | |
| 2703 | + | |
2688 | 2704 | | |
2689 | 2705 | | |
2690 | 2706 | | |
| |||
2715 | 2731 | | |
2716 | 2732 | | |
2717 | 2733 | | |
2718 | | - | |
| 2734 | + | |
2719 | 2735 | | |
2720 | 2736 | | |
2721 | 2737 | | |
| |||
0 commit comments