Skip to content

Commit 8c9a2f6

Browse files
committed
test(bridge): close four cp4b.2 blind spots the campaign found (#259 cp4b.2)
The first bridge campaign caught 24 of 28 and named four things the controls could not see. Every one was real: * **first-wins was rescued by dedup.** The two duplicate `Dup` records named the SAME barrier, so keeping both produced two byte-identical findings that BR-V7 collapsed — the rule was unobservable through its own control. The second record now names a different barrier, so keeping it adds a finding at a different line. * **the malformed-method skip only proved the easy half.** The bad record was last, so a port that stopped at the first bad entry behaved identically. It is now first. * **the non-list-block control was vacuous.** With no protocols there is nothing to report either way; the rule is observable only through a SCOPED protocol, where an empty method list makes the rule dead and a silenced family says nothing. The control now carries both twins and says why. * **the rendered surfaces reached two of the five codes.** The render case had no exit leak and a single-entry scope list, so neither exit wording nor the `, ` CPython puts between scope entries was in the compared bytes. Both are now. The fifth finding was a broken mutation, not a gap: the "drop the opened step" rewrite did not compile, so it measured nothing. It now anchors that step at line 0 and lets the BR-V5 guard do the dropping. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WbgYFv2UW3iRJ3L33naVC3
1 parent 59ef80e commit 8c9a2f6

8 files changed

Lines changed: 754 additions & 65 deletions

File tree

‎docs/evidence/p022-cp4b-2.json‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,10 +123,10 @@
123123
{
124124
"id": "M11",
125125
"rule": "BR-V5",
126-
"description": "the opened step is dropped from every protocol slice",
126+
"description": "the opened step of every protocol slice is anchored at 0, so the BR-V5 line guard drops it",
127127
"target": "rust/crates/own-bridge/src/verdict.rs",
128-
"pattern": " let mut flow: Vec<\\(i64, String\\)> = vec!\\[\\(",
129-
"replacement": " let mut flow: Vec<(i64, String)> = Vec::new();\n let _unused = (",
128+
"pattern": "\\n v\\.open_line,\\n",
129+
"replacement": "\n 0,\n",
130130
"expected_catchers": [
131131
"own-bridge/tests/verdicts.rs::replays_every_case_to_its_golden",
132132
"own-bridge/tests/renders.rs::replays_every_rendered_surface_byte_for_byte"
Lines changed: 264 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,264 @@
1+
{
2+
"schema": 1,
3+
"comment": "Recorded mutation-campaign run (scripts/mutate_campaign.py --run). Raw facts only: outcomes, catchers, provenance. Counts are derived by scripts/render_checkpoint_status.py; regenerate this file by re-running the campaign, never by hand.",
4+
"campaign": "p022-cp4b-2",
5+
"definition": "docs/evidence/p022-cp4b-2.json",
6+
"definition_sha256": "79f3cbb77839e4e72027ab1ae50f830650cd501b09cf4a6247ed80de9d556f5c",
7+
"source_commit": "59ef80ea2740cc538742f685933b393b91c288d6",
8+
"dirty": false,
9+
"recorded_at": "2026-09-06T20:53:07Z",
10+
"packages": [
11+
"own-analysis",
12+
"own-bridge",
13+
"own-cfg",
14+
"own-diagnostics",
15+
"own-ir",
16+
"own-lowered",
17+
"own-shadow",
18+
"own-syntax"
19+
],
20+
"command": "cargo test -p <package> --no-fail-fast, for every workspace member",
21+
"control": {
22+
"id": "M00",
23+
"outcome": "survived",
24+
"catchers": [],
25+
"elapsed_seconds": 3.9
26+
},
27+
"mutations": [
28+
{
29+
"id": "M01",
30+
"outcome": "caught",
31+
"catchers": [
32+
"own-bridge/tests/renders.rs::replays_every_rendered_surface_byte_for_byte",
33+
"own-bridge/tests/verdicts.rs::replays_every_case_to_its_golden",
34+
"own-shadow/tests/engine.rs::this_engine_reproduces_its_committed_capture"
35+
],
36+
"elapsed_seconds": 3.5
37+
},
38+
{
39+
"id": "M02",
40+
"outcome": "caught",
41+
"catchers": [
42+
"own-bridge/src/lib.rs::verdict::tests::protocol_blocks_that_are_not_lists_yield_nothing",
43+
"own-bridge/tests/verdicts.rs::replays_every_case_to_its_golden"
44+
],
45+
"elapsed_seconds": 3.4
46+
},
47+
{
48+
"id": "M03",
49+
"outcome": "caught",
50+
"catchers": [
51+
"own-bridge/tests/verdicts.rs::replays_every_case_to_its_golden"
52+
],
53+
"elapsed_seconds": 3.3
54+
},
55+
{
56+
"id": "M04",
57+
"outcome": "caught",
58+
"catchers": [
59+
"own-bridge/tests/renders.rs::replays_every_rendered_surface_byte_for_byte",
60+
"own-bridge/tests/verdicts.rs::replays_every_case_to_its_golden",
61+
"own-shadow/tests/engine.rs::this_engine_reproduces_its_committed_capture"
62+
],
63+
"elapsed_seconds": 3.3
64+
},
65+
{
66+
"id": "M05",
67+
"outcome": "caught",
68+
"catchers": [
69+
"own-bridge/tests/verdicts.rs::replays_every_case_to_its_golden"
70+
],
71+
"elapsed_seconds": 3.1
72+
},
73+
{
74+
"id": "M06",
75+
"outcome": "caught",
76+
"catchers": [
77+
"own-bridge/tests/verdicts.rs::replays_every_case_to_its_golden"
78+
],
79+
"elapsed_seconds": 3.1
80+
},
81+
{
82+
"id": "M07",
83+
"outcome": "caught",
84+
"catchers": [
85+
"own-bridge/tests/verdicts.rs::replays_every_case_to_its_golden"
86+
],
87+
"elapsed_seconds": 3.2
88+
},
89+
{
90+
"id": "M08",
91+
"outcome": "caught",
92+
"catchers": [
93+
"own-bridge/tests/renders.rs::replays_every_rendered_surface_byte_for_byte",
94+
"own-bridge/tests/verdicts.rs::replays_every_case_to_its_golden",
95+
"own-shadow/tests/engine.rs::this_engine_reproduces_its_committed_capture"
96+
],
97+
"elapsed_seconds": 3.5
98+
},
99+
{
100+
"id": "M09",
101+
"outcome": "caught",
102+
"catchers": [
103+
"own-bridge/tests/renders.rs::replays_every_rendered_surface_byte_for_byte",
104+
"own-bridge/tests/verdicts.rs::replays_every_case_to_its_golden",
105+
"own-shadow/tests/engine.rs::this_engine_reproduces_its_committed_capture"
106+
],
107+
"elapsed_seconds": 3.5
108+
},
109+
{
110+
"id": "M10",
111+
"outcome": "caught",
112+
"catchers": [
113+
"own-bridge/tests/renders.rs::replays_every_rendered_surface_byte_for_byte",
114+
"own-bridge/tests/verdicts.rs::replays_every_case_to_its_golden",
115+
"own-shadow/tests/engine.rs::this_engine_reproduces_its_committed_capture"
116+
],
117+
"elapsed_seconds": 3.5
118+
},
119+
{
120+
"id": "M11",
121+
"outcome": "compile-error",
122+
"catchers": [],
123+
"elapsed_seconds": 1.3
124+
},
125+
{
126+
"id": "M12",
127+
"outcome": "caught",
128+
"catchers": [
129+
"own-bridge/tests/verdicts.rs::replays_every_case_to_its_golden"
130+
],
131+
"elapsed_seconds": 3.3
132+
},
133+
{
134+
"id": "M13",
135+
"outcome": "caught",
136+
"catchers": [
137+
"own-bridge/tests/renders.rs::replays_every_rendered_surface_byte_for_byte",
138+
"own-bridge/tests/verdicts.rs::replays_every_case_to_its_golden",
139+
"own-shadow/tests/engine.rs::this_engine_reproduces_its_committed_capture"
140+
],
141+
"elapsed_seconds": 3.5
142+
},
143+
{
144+
"id": "M14",
145+
"outcome": "caught",
146+
"catchers": [
147+
"own-bridge/tests/verdicts.rs::replays_every_case_to_its_golden"
148+
],
149+
"elapsed_seconds": 3.3
150+
},
151+
{
152+
"id": "M15",
153+
"outcome": "caught",
154+
"catchers": [
155+
"own-bridge/tests/renders.rs::replays_every_rendered_surface_byte_for_byte",
156+
"own-bridge/tests/verdicts.rs::replays_every_case_to_its_golden",
157+
"own-shadow/tests/engine.rs::this_engine_reproduces_its_committed_capture"
158+
],
159+
"elapsed_seconds": 3.4
160+
},
161+
{
162+
"id": "M16",
163+
"outcome": "caught",
164+
"catchers": [
165+
"own-bridge/tests/renders.rs::replays_every_rendered_surface_byte_for_byte",
166+
"own-bridge/tests/verdicts.rs::replays_every_case_to_its_golden"
167+
],
168+
"elapsed_seconds": 3.4
169+
},
170+
{
171+
"id": "M17",
172+
"outcome": "caught",
173+
"catchers": [
174+
"own-bridge/tests/renders.rs::replays_every_rendered_surface_byte_for_byte",
175+
"own-bridge/tests/verdicts.rs::replays_every_case_to_its_golden"
176+
],
177+
"elapsed_seconds": 3.5
178+
},
179+
{
180+
"id": "M18",
181+
"outcome": "caught",
182+
"catchers": [
183+
"own-bridge/tests/verdicts.rs::replays_every_case_to_its_golden"
184+
],
185+
"elapsed_seconds": 3.3
186+
},
187+
{
188+
"id": "M19",
189+
"outcome": "caught",
190+
"catchers": [
191+
"own-bridge/tests/verdicts.rs::replays_every_case_to_its_golden"
192+
],
193+
"elapsed_seconds": 3.4
194+
},
195+
{
196+
"id": "M20",
197+
"outcome": "caught",
198+
"catchers": [
199+
"own-bridge/tests/verdicts.rs::replays_every_case_to_its_golden"
200+
],
201+
"elapsed_seconds": 3.4
202+
},
203+
{
204+
"id": "M21",
205+
"outcome": "survived",
206+
"catchers": [],
207+
"elapsed_seconds": 3.7
208+
},
209+
{
210+
"id": "M22",
211+
"outcome": "caught",
212+
"catchers": [
213+
"own-bridge/tests/verdicts.rs::replays_every_case_to_its_golden"
214+
],
215+
"elapsed_seconds": 3.6
216+
},
217+
{
218+
"id": "M23",
219+
"outcome": "survived",
220+
"catchers": [],
221+
"elapsed_seconds": 3.4
222+
},
223+
{
224+
"id": "M24",
225+
"outcome": "survived",
226+
"catchers": [],
227+
"elapsed_seconds": 3.5
228+
},
229+
{
230+
"id": "M25",
231+
"outcome": "caught",
232+
"catchers": [
233+
"own-bridge/tests/renders.rs::replays_every_rendered_surface_byte_for_byte",
234+
"own-bridge/tests/verdicts.rs::replays_every_case_to_its_golden",
235+
"own-shadow/tests/engine.rs::this_engine_reproduces_its_committed_capture"
236+
],
237+
"elapsed_seconds": 3.4
238+
},
239+
{
240+
"id": "M26",
241+
"outcome": "caught",
242+
"catchers": [
243+
"own-bridge/tests/verdicts.rs::replays_every_case_to_its_golden"
244+
],
245+
"elapsed_seconds": 3.6
246+
},
247+
{
248+
"id": "M27",
249+
"outcome": "caught",
250+
"catchers": [
251+
"own-bridge/tests/renders.rs::replays_every_rendered_surface_byte_for_byte"
252+
],
253+
"elapsed_seconds": 3.2
254+
},
255+
{
256+
"id": "M28",
257+
"outcome": "caught",
258+
"catchers": [
259+
"own-bridge/tests/verdicts.rs::replays_every_case_to_its_golden"
260+
],
261+
"elapsed_seconds": 3.0
262+
}
263+
]
264+
}

‎docs/generated/p022-cp4-census.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,6 @@ A second family, and a different kind of comparison: its replay compares the **b
3232
|-----------------------------------------------------------------------|------:|
3333
| cases — one per BR-V9 rule group, listed exhaustively in the manifest | 9 |
3434
| … whose golden is a bridge refusal (nothing to render) | 1 |
35-
| rendered lines compared byte-for-byte (4 formats, 2 host severities) | 120 |
36-
| SARIF results compared byte-for-byte (both host severities) | 30 |
35+
| rendered lines compared byte-for-byte (4 formats, 2 host severities) | 136 |
36+
| SARIF results compared byte-for-byte (both host severities) | 34 |
3737
| BR-V9 ledger rows pinned by at least one case | 31 |

‎rust/crates/own-bridge/src/verdict.rs‎

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1537,7 +1537,19 @@ mod tests {
15371537
"name": "VM.Go", "file": "VM.cs",
15381538
"events": [{"ev": "assign", "target": "x", "value": false, "line": 3}]
15391539
});
1540-
// The control twin first: as LISTS these same records do report.
1540+
// The rule is only OBSERVABLE through a SCOPED protocol: with the
1541+
// methods gone, "the block is not a list" and "the block is empty"
1542+
// differ by exactly one thing — an empty method list makes a scoped
1543+
// rule dead, and a silenced family says nothing at all. Measured, not
1544+
// guessed: an earlier version of this control used an unscoped rule
1545+
// and a mutation reading a non-list block as empty survived it.
1546+
let scoped = json!({
1547+
"name": "P",
1548+
"opens": {"kind": "assign", "target": "x", "value": false},
1549+
"closes": {"kind": "assign", "target": "x", "value": true},
1550+
"scope": {"methods": ["VM.Go"]}
1551+
});
1552+
// The control twins first: as LISTS these same records do report.
15411553
let live = obj(&json!({
15421554
"protocols": [&rule], "protocol_functions": [&method]
15431555
}));
@@ -1549,20 +1561,37 @@ mod tests {
15491561
vec!["OBL003"],
15501562
"the twin must report, or the assertions below prove nothing"
15511563
);
1564+
let dead = obj(&json!({"protocols": [&scoped], "protocol_functions": []}));
1565+
assert_eq!(
1566+
protocol_findings(&dead)
1567+
.iter()
1568+
.map(|f| f.code.as_str())
1569+
.collect::<Vec<_>>(),
1570+
vec!["OBL005"],
1571+
"an EMPTY method list makes a scoped rule dead — which is what the \
1572+
silenced family below must NOT do"
1573+
);
15521574
for root in [
15531575
json!({"protocols": "nope", "protocol_functions": [&method]}),
15541576
json!({"protocols": [&rule], "protocol_functions": "nope"}),
1577+
json!({"protocols": [&scoped], "protocol_functions": "nope"}),
15551578
json!({"protocols": {"name": "P"}, "protocol_functions": []}),
15561579
] {
15571580
assert!(
15581581
protocol_findings(&obj(&root)).is_empty(),
15591582
"a non-list protocol block must silence the family: {root}"
15601583
);
15611584
}
1562-
// Absent is not "not a list": both blocks default to empty.
1585+
// Absent is not "not a list": both blocks default to empty, so the
1586+
// scoped rule is dead rather than silenced.
15631587
assert!(protocol_findings(&obj(&json!({}))).is_empty());
15641588
assert!(protocol_findings(&obj(&json!({"protocols": [&rule]}))).is_empty());
15651589
assert!(protocol_findings(&obj(&json!({"protocol_functions": [&method]}))).is_empty());
1590+
assert_eq!(
1591+
protocol_findings(&obj(&json!({"protocols": [&scoped]}))).len(),
1592+
1,
1593+
"an ABSENT protocol_functions block is an empty one"
1594+
);
15661595
}
15671596

15681597
/// BR-P1 on the raw document: `disposable` counts only as the JSON `true`,

‎tests/fixtures/repro/digests.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -546,8 +546,8 @@
546546
{
547547
"case": "verdict_protocol_tolerant_door_rules",
548548
"corpus": "verdicts",
549-
"digest": "50d53ee22fde12a7eba63615a856bf9b6fd2de75d2e5eee22d892dad3bb40c1d",
550-
"bytes": 1688
549+
"digest": "d98ab7fa30b2680cf0dbb605fec21bf62a44cd824b6bee6d98a27d23c3994edc",
550+
"bytes": 2018
551551
},
552552
{
553553
"case": "verdict_same_site_distinct_events",

0 commit comments

Comments
 (0)