Commit f22dee4
arq/fsm: anchor the CALL retry to PTT-OFF, not to enqueue
fsm_calling had no ARQ_EV_TX_COMPLETE handler, so the 8 s retry deadline was
set when the CALL was QUEUED. A CALL spends ~3.8 s modulating (DATAC16), and
the peer cannot even start its ACCEPT until our PTT drops — its own ACCEPT then
takes another ~3.8 s. The retransmission therefore fired at t~8.0 s while the
ACCEPT was still arriving at t~8.1 s: a collision on essentially every connect,
costing a fourth transmission on a channel that had lost nothing.
fsm_accepting already anchors ACCEPT exactly this way (its TX_COMPLETE resets
the RX window from PTT-OFF); CALLING never got the same treatment.
Measured with tests/sim/connect_bench, 24 seeds per point:
PER connects frames censored time
0.00 24/24 -> 24/24 4.0 -> 3.0 13.1 s -> 13.1 s
0.10 24/24 -> 24/24 4.6 -> 3.9 19.5 s -> 22.2 s
0.20 23/24 -> 24/24 5.4 -> 4.6 32.3 s -> 28.7 s
0.30 21/24 -> 22/24 5.9 -> 5.3 49.4 s -> 48.2 s
0.50 10/24 -> 15/24 6.5 -> 6.9 121.8 s -> 101.5 s
A clean connect now costs three transmissions for a three-frame handshake,
which is the point. Reliability improves where it matters most: at PER 0.5 the
success rate goes 10/24 to 15/24 and censored time drops 20 s.
Reported honestly: PER 0.10 censored time is ~2.7 s worse. The buggy early
retransmission was accidentally acting as a fast retry, so a genuinely lost
CALL now waits the full interval. I checked whether the interval should shrink
to compensate and it should not — at 6.5 s and 5.5 s the success rate FALLS
(12/12 -> 11/12 at PER 0.2, and worse at 0.5), because the four retry slots are
consumed sooner. 8 s stays.
The censored column counts a failure as the 180 s cap. Means over successes
alone are survivor-biased: when a change makes previously-hopeless connects
succeed, those slow successes inflate the success-only mean while the link has
actually improved. An earlier 12-seed run showed a PER 0.20 "regression" that
reversed at 24 seeds — small-sample means on this metric are not trustworthy.
Test verified to fail without the fix. Full C suite green (36 FSM tests).
Integration: one failure observed when the suite was started immediately after
a full parallel rebuild, then four consecutive passes (three at 203.6 s
identical); treated as load-related flake, not reproducible.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>1 parent e4e6da5 commit f22dee4
3 files changed
Lines changed: 65 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
839 | 839 | | |
840 | 840 | | |
841 | 841 | | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
842 | 859 | | |
843 | 860 | | |
844 | 861 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
932 | 932 | | |
933 | 933 | | |
934 | 934 | | |
| 935 | + | |
| 936 | + | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
| 946 | + | |
| 947 | + | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
| 963 | + | |
| 964 | + | |
| 965 | + | |
| 966 | + | |
| 967 | + | |
935 | 968 | | |
936 | 969 | | |
937 | 970 | | |
| |||
972 | 1005 | | |
973 | 1006 | | |
974 | 1007 | | |
| 1008 | + | |
975 | 1009 | | |
976 | 1010 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
79 | | - | |
80 | | - | |
| 79 | + | |
| 80 | + | |
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | | - | |
| 86 | + | |
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
90 | 96 | | |
91 | 97 | | |
92 | 98 | | |
93 | 99 | | |
94 | 100 | | |
95 | 101 | | |
96 | 102 | | |
97 | | - | |
| 103 | + | |
98 | 104 | | |
99 | 105 | | |
100 | | - | |
| 106 | + | |
101 | 107 | | |
102 | | - | |
103 | | - | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
104 | 111 | | |
105 | 112 | | |
106 | 113 | | |
| |||
0 commit comments