Quality
How liberps is verified
Six kinds of evidence, each aimed at a different way an implementation of a ring protocol goes wrong: a row transcribed incorrectly, a scenario the spec describes, a race nobody thought of, malformed input, the real kernel, and a reader with fresh eyes.
Checks
| Check | What it covers | Result | Run it |
|---|---|---|---|
| Unit tests | Every Table 10-2 row and both branches of each conditional row, against an independently re-derived row map; priority logic, timers, transmission, flush logic, validity check, FOP, manager, command layer, review regressions | 86 pass | make test |
| Scenario tests | Written from the Recommendation by a separate author: Appendix III scenarios A–D, manual and forced switch rules, compatible-version 1, two-node ring, node failures, the guard-timer race of Appendix IV, one hour of stability, hold-off, cold start | 24 pass | make test |
| Chaos property test | Rings of 2–16 nodes with random roles, timers, delay, jitter and loss, driven by random link failures (both directions or one), node failures and commands. Asserts no forwarding loop at any instant, convergence to Idle with only the RPL blocked, and no platform errors | 300,000 seeds | ERPS_CHAOS_SEEDS=300000 |
| Compiler and sanitizer matrix | gcc and clang, each plain and with AddressSanitizer and UndefinedBehaviorSanitizer, with -Wall -Wextra -Wpedantic -Wconversion -Werror | all green | make check |
| Line coverage | Protocol core and command layer | 95.4 % / 91.2 % | make cov |
| Fuzzing | PDU decoder; the instance receive path with fuzz-chosen configuration, frames, time, commands and injected platform failures, checking invariants after every step; simulator event sequences with the loop check; the command layer | ~403 M runs | make fuzz |
| Linux end-to-end | Four erpsd on four kernel bridges in a ring: convergence, no storm, failure, reversion, clean shutdown; also under AddressSanitizer | pass | make e2e |
CI runs the compiler matrix, a 20,000-seed chaos run, the simulator demo, the coverage gate and short fuzzing on every push.
What the reviews and tests found
Two independent conformance reviews read the code against the Recommendation, one with GPT-6 through Codex and one with Gemini through Antigravity. Both confirmed the Table 10-2 transcription. Their findings, and those of the chaos test and the kernel run, are listed with their outcome; each fix has a regression test.
| Source | Finding | Outcome |
|---|---|---|
| Review 1 | A port block that failed in hardware could still be advertised, letting a peer unblock and close a loop | fixed new R-APS information waits for confirmed blocks |
| Review 1 | Destroying an instance from inside a callback; a non-revertive switch leaving WTR armed; lost flushes; deadline wrap near the clock limit; Stop Tx leaving an event burst; out-of-spec Tx rates; software forwarding tied to local validity; restart keeping receive state | fixed |
| Review 1 | FOP-TO off by default, lenient TLV offset on receive, version 0 in compatible-version 1 | documented deliberate choices |
| Chaos test | A Clear at the RPL owner while another node held a forced switch left the owner Pending with no timer, and the ring never reverted | fixed Clear is not applicable at an owner in C or D |
| Kernel run | Bridge VLAN filtering was read from sysfs, which reflects the wrong network namespace | fixed read over rtnetlink |
| Own review | A packet socket could queue frames from other interfaces before its bind; a send on a downed port counted as a platform fault | fixed |
| Review 2 | Long VLAN lists were truncated in running-config; erps_set_timers lacked the re-entrancy guard | fixed |
| Review 2 | Proposed restricting row 71 to non-RPL nodes | kept literal the change leaves two blocks and splits the ring |
Reproduce a failure
- A chaos failure prints its seed and the command that replays it with the full event script and simulator log:
ERPS_CHAOS_SEED0=<seed> ERPS_CHAOS_SEEDS=1 ERPS_CHAOS_VERBOSE=1 build/gcc/test-chaos. - Scenario tests log every simulator event with
ERPS_TEST_LOG=4and write a capture withERPS_TEST_PCAP=file.pcap. - Fuzzer crashes are saved as
fuzz-corpus/<target>-crash-*; run the target binary on that file to replay it. - On a live system,
show erps ring <name> historylists the last 128 Table 10-2 rows executed, anddebug erps level debuglogs each one as it runs.