Commit cd4e692
committed
test(rfc): fix three polarities and prove the MP_UNREACH wire leg
Three independent audits of RFC7606-3.g-1 each found something the last
did not.
This commit acts on the second and third.
POLARITY. Three tags read `positive` while their tests drive a duplicate
MP
attribute, which IS the violation Section 3.g names, and assert that Ze
rejects it.
By ai/skills/ze-rfc.md polarity is fixed on the input, and its worked
example tags
"valid ORIGIN length 1 is accepted" positive against "ORIGIN length 2 is
treated as
withdraw" negative. The repository already agreed with itself elsewhere:
message/rfc7606_test.go tags "a second MP_REACH_NLRI selects session
reset" negative.
The three reactor tests contradicted their siblings for identical
semantics, so the
row's positive side claimed four proofs where it has one. Corrected to
negative. No
assertion, fixture or input changed, which the audit verified by
reconstruction: it
deleted the new comment blocks, reverted the polarity word, and
recomputed the exact
unit shas recorded before the edit. The row is now 1 positive and 7
negative, and the
single positive, TestRFC7606MPReachIPv4NextHopValid, is untouched.
THE WIRE. Every unit that read a NOTIFICATION off the wire for this
requirement used
a duplicate MP_REACH. The MP_UNREACH leg reached the same notification
only because
both funnel through Session.rfc7606SessionReset. That was true and
nothing pinned it:
a change routing the MP_UNREACH leg to a different notification, or to
silence, would
have left every cited unit green. The second audit named this as the one
remaining
gap that could hide a defect.
TestSessionRFC7606DuplicateMPUnreachNotificationOnTheWire closes it. It
reads the
bytes off the client end of the session and asserts header type
NOTIFICATION, code 3
and subcode 1.
TWO mutants were needed, and one was not enough. Sending
NotifyUpdateMissingAttr in
place of NotifyUpdateMalformedAttr reddens it, which proves it reads the
wire. That
alone does NOT prove Section 3.g is what produced the reset, because
that helper
sends code 3 subcode 1 for EVERY reset, so a fixture reaching a reset
through a
neighbouring rule would assert the same two bytes and prove nothing. The
audit ran
the second mutant: with the Section 3.g check disabled the test fails
with "An error
is expected but got nil", no reset and no NOTIFICATION, because the
fixture's ORIGIN,
empty AS_PATH and two well-formed MP_UNREACH attributes record no other
error and the
walk returns ActionNone. The duplicate check is the only rule that turns
that input
into a NOTIFICATION.
Left open, and it needs the owner. The corrected twin and
TestRFC7606Section3gDuplicateMPUnreachResetsWithRoutesPresent now carry
byte-identical
fixtures and assertions, verified by diffing with comments stripped. The
ledger counts
one proof twice. Folding them deletes a tracked test, which is Thomas's
call, so both
are kept and the surviving file records that it is a fold-back candidate
rather than
the workaround it began as.
make ze-rfc-check exits 0.1 parent 02e8892 commit cd4e692
5 files changed
Lines changed: 152 additions & 17 deletions
File tree
- ai
- internal/component/bgp/reactor
- rfc/audit
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4132 | 4132 | | |
4133 | 4133 | | |
4134 | 4134 | | |
4135 | | - | |
| 4135 | + | |
4136 | 4136 | | |
4137 | 4137 | | |
4138 | 4138 | | |
| |||
Lines changed: 98 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
Lines changed: 30 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
49 | 60 | | |
50 | 61 | | |
51 | 62 | | |
| |||
76 | 87 | | |
77 | 88 | | |
78 | 89 | | |
79 | | - | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
80 | 95 | | |
81 | 96 | | |
82 | 97 | | |
83 | | - | |
84 | | - | |
| 98 | + | |
| 99 | + | |
85 | 100 | | |
86 | 101 | | |
87 | 102 | | |
| 103 | + | |
88 | 104 | | |
89 | 105 | | |
90 | 106 | | |
91 | 107 | | |
92 | 108 | | |
93 | 109 | | |
94 | 110 | | |
95 | | - | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
96 | 121 | | |
97 | 122 | | |
98 | 123 | | |
| |||
Lines changed: 12 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
45 | | - | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
46 | 50 | | |
47 | | - | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
48 | 57 | | |
49 | 58 | | |
50 | 59 | | |
| |||
0 commit comments