mirror of
https://github.com/jmcorgan/fips.git
synced 2026-10-05 11:08:25 +00:00
The heartbeat was recorded as sent before the send was attempted, so a peer
whose heartbeat could not go out was treated as heartbeated and was not tried
again for a whole heartbeat_interval_secs, although it had heard nothing and
its own link-dead timer was running.
Record the attempt and the delivery separately. The interval that paces a
healthy peer now advances only on a send that returned cleanly, and a peer
whose send failed is retried after a shorter fixed interval instead of after a
full heartbeat interval.
The retry interval gates only a peer whose last attempt failed. On a healthy
peer the two timestamps are equal, so consulting it there would clamp a
heartbeat_interval_secs configured below the retry interval, and that setting
has no validation floor.
The due-or-not decision moves into a small pure function so it can be tested
without driving a send. The tests cover both halves and both were checked
against the defect rather than only against the fix: restoring the old ordering
fails the integration test on the recorded-as-landed assertion, and removing
the retry gate fails it on the not-retried-every-tick assertion.
Also widen the generated-config ignore glob. The rule matched
generated-configs/ exactly, while the scripts write
generated-configs${FIPS_CI_NAME_SUFFIX}, so every suffixed run left an
untracked directory behind.
19 lines
349 B
Plaintext
19 lines
349 B
Plaintext
# Staged binaries (copied from target/release/ for test runs)
|
|
fips
|
|
fipsctl
|
|
fipstop
|
|
fips-gateway
|
|
|
|
# Generated test configs. The suffixed form is what a run with
|
|
# FIPS_CI_NAME_SUFFIX set writes, so the glob has to cover both.
|
|
generated-configs*/
|
|
|
|
# Simulation results
|
|
sim-results/
|
|
|
|
# Python caches
|
|
__pycache__/
|
|
|
|
# Staged binary directory
|
|
static/bin/
|