mirror of
https://github.com/jmcorgan/fips.git
synced 2026-07-30 19:46:15 +00:00
Assert mixed-technology's sound criterion, and correct the one that never was
With the root pinned, n08's test subject is assertable for the first time: its two candidates sit at equal depth with fiber-grade default netem on one side and Bluetooth on the other, which is exactly the preference this scenario exists to test, and it takes the fiber parent in four of four runs. Encoded as written rather than calibrated from the runs, since "should pick n03" is the spec and the runs merely confirm it is met. n06 is deliberately absent, and its documented criterion is corrected rather than left standing. The header called n03 a fiber parent for n06; the netem policies in the same file say that link is WiFi and the other candidate is Bluetooth, so n06 chooses between two impaired links. Its only fiber-grade link reaches a node at depth 3 that is never a good parent. There was never a reason to expect it to prefer n03, and the two-of-four split observed is correct behaviour: in a run where it took the Bluetooth peer, the fiber-labelled candidate measured a link cost of 3 against the other's 1, so the daemon chose the cheaper effective depth as it should. Validated by replaying the assertion against all four archived runs, then breaking it three ways to confirm it can fail, then one live run for the wiring. One of the breaks expects n06 to take n03 and reports that it chose n02, which is the direct demonstration of why n06 is not encoded. cost-reeval records that its subject now fires in two runs of three, against zero of five when it was structurally impossible, and why that rate is still not one an assertion can rest on.
This commit is contained in:
@@ -50,10 +50,19 @@
|
|||||||
# `topology.pin_root` (default true) now assigns identities in NodeAddr order
|
# `topology.pin_root` (default true) now assigns identities in NodeAddr order
|
||||||
# so n01 is root and n04 is the depth-1 subject this file describes.
|
# so n01 is root and n04 is the depth-1 subject this file describes.
|
||||||
#
|
#
|
||||||
# STILL TO DO: this scenario has no assertion about its own subject, and that
|
# MEASURED after the fix, 2026-07-23: the periodic switch now happens, in 2 of
|
||||||
# was a consequence rather than an omission — none could have passed. With the
|
# 3 runs on n04 (0, 1, 1 occurrences). Before the fix it was 0 in 5 of 5, and
|
||||||
# subject now reachable, decide whether the switch is reliable enough across
|
# structurally impossible rather than merely rare. So the subject is exercised
|
||||||
# seeds to assert, and encode it if so. Tracked in ISSUE-2026-0085.
|
# for the first time.
|
||||||
|
#
|
||||||
|
# STILL NOT ASSERTED, deliberately. A "at least one periodic switch" assertion
|
||||||
|
# would red roughly one run in three on this evidence, and a single run reading
|
||||||
|
# zero is an argument against asserting rather than for it. Two ways forward,
|
||||||
|
# neither taken here: gather enough runs to know whether 2-in-3 is the real
|
||||||
|
# rate, or reduce the variance -- the mutation is stochastic with fraction=0.5,
|
||||||
|
# so a deterministic link-degradation schedule would make the asymmetry this
|
||||||
|
# scenario needs occur every run and the outcome assertable.
|
||||||
|
# Tracked in ISSUE-2026-0085.
|
||||||
|
|
||||||
scenario:
|
scenario:
|
||||||
name: "cost-reeval"
|
name: "cost-reeval"
|
||||||
|
|||||||
@@ -26,8 +26,21 @@
|
|||||||
# Fiber: n03-n08, n06-n10
|
# Fiber: n03-n08, n06-n10
|
||||||
#
|
#
|
||||||
# Test subjects:
|
# Test subjects:
|
||||||
# - n06 has fiber (n03) and Bluetooth (n02) parents — should pick n03
|
# - n08 has fiber (n03) and Bluetooth (n04) parents — should pick n03.
|
||||||
# - n08 has fiber (n03) and Bluetooth (n04) parents — should pick n03
|
# ASSERTED below. Holds in 4 of 4 runs under the pinned root.
|
||||||
|
# - n06 was documented as having "fiber (n03) and Bluetooth (n02) parents".
|
||||||
|
# CORRECTED 2026-07-23: that is wrong, and the netem block below is the
|
||||||
|
# evidence rather than the ASCII art above. `n03-n06` is a **WiFi** link
|
||||||
|
# (5-20ms, 1-3% loss) and `n02-n06` is Bluetooth (15-40ms, 2-8% loss), so
|
||||||
|
# n06 chooses between two impaired links, not between fiber and Bluetooth.
|
||||||
|
# n06's only fiber-grade link is `n06-n10`, and n10 sits at depth 3 so it
|
||||||
|
# is never a good parent. There is therefore no reason to expect n06 to
|
||||||
|
# prefer n03, and the mutation block (fraction 0.2, degraded 50-100ms)
|
||||||
|
# moves the two costs run to run: across four runs n06 took n03 twice and
|
||||||
|
# n02 twice. NOT asserted, and the observed split is the correct outcome
|
||||||
|
# rather than a defect — in the run checked, n03 measured a link cost of 3
|
||||||
|
# against n02's 1, so effective depth 1+3 beat by 1+1 and the daemon chose
|
||||||
|
# the cheaper path exactly as it should.
|
||||||
#
|
#
|
||||||
# Netem mutation shifts fiber-only links between normal and degraded.
|
# Netem mutation shifts fiber-only links between normal and degraded.
|
||||||
#
|
#
|
||||||
@@ -142,6 +155,19 @@ assertions:
|
|||||||
max_roots: 1
|
max_roots: 1
|
||||||
min_nodes_parented: 9
|
min_nodes_parented: 9
|
||||||
min_sessions: 3
|
min_sessions: 3
|
||||||
|
# The scenario's own subject, assertable for the first time now that the
|
||||||
|
# root is pinned to n01 and the topology above describes the tree that
|
||||||
|
# forms. n08's two candidates sit at equal depth, so the choice is decided
|
||||||
|
# by link cost alone: n03 over fiber-grade default netem against n04 over
|
||||||
|
# Bluetooth. That is the fiber-versus-Bluetooth preference this scenario
|
||||||
|
# exists to test.
|
||||||
|
#
|
||||||
|
# The criterion is encoded as written rather than calibrated from runs:
|
||||||
|
# "should pick n03" is the spec, and four of four runs agree. n06 is
|
||||||
|
# deliberately absent — see the corrected note in the header for why its
|
||||||
|
# documented criterion was never founded on this topology.
|
||||||
|
tree_parents:
|
||||||
|
n08: n03
|
||||||
|
|
||||||
logging:
|
logging:
|
||||||
rust_log: "info"
|
rust_log: "info"
|
||||||
|
|||||||
Reference in New Issue
Block a user