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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
//! AR-1 row 1 — the control fixtures for `ordering_detector.py`.
//!
//! This module ships no behaviour. It exists so the accumulator-rooting
//! lane's **ordering-sensitive** detector at
//! `docs/design/beamr/briefs/evidence/accumulator-rooting/ordering_detector.py`
//! carries, on every run, one committed site it must FLAG and one it must
//! CLEAR — the gate's row-1 break-it arm and control, held live in the tree
//! rather than constructed once and forgotten.
//!
//! # Why ordering, not presence
//!
//! Row 1's finding: the eleven accumulator crossings **already contain a
//! rooting call** — the terminal `alloc_list`/`alloc_tuple` roots its
//! elements. It roots values that are already stale, and rooting a stale
//! pointer does not recover it. A presence-sensitive instrument passes all
//! eleven while they are still broken. The detector must therefore key on
//! WHERE the rooting call sits relative to the first collecting call on the
//! carrier's live range:
//!
//! * [`fixtures::ord_bad_root_after_collect`] — a rooting call is present
//! (`with_rooted`, naming the carrier) but sits AFTER a collecting call
//! made while the carrier is live. **The detector must flag it.** If it
//! clears, the instrument is measuring presence and certifies nothing.
//! * [`fixtures::ord_good_rooted_before_collect`] — the rooting scope opens
//! before any collecting call. **The detector must clear it.** If it
//! flags, "flags everything" is being read as a pass.
//!
//! # Fixture design constraints (all load-bearing)
//!
//! * **Local types only** ([`fixtures::OrdHeap`], [`fixtures::OrdTerm`]):
//! the detector is syntactic, so these are indistinguishable from the
//! real allocator to the instrument — and untouchable by any type-level
//! remedy the lane lands, so the controls survive the lane succeeding.
//! * **Zero `shape_hunt.py` hits, by construction.** That instrument's
//! S3a–S3e classes key on `Vec` binds, `match`/`if` binds, literal binds,
//! `let`-less reassignment, and its `ALLOC` spelling list. These fixtures
//! use none of those shapes and collect via the spelling
//! `alloc_fixture_term`, which is outside `ALLOC`. Adding a hit here
//! would put an unruled row in that hunt's ledger reconciliation (gate
//! R10 as amended: a new unruled hit FAILS).
//! * **Markers are binding names** (`ord_bad_tail`, `ord_good_tail`),
//! unique in this file, so no comment reflow can strip them and the
//! detector's uniqueness assert (0 or ≥2 matches = UNUSABLE, never PASS)
//! has something exact to hold.
//! * **`cargo fmt` is the checked hazard**: the detector reads per-line, so
//! a reflow that splits a `with_rooted(&[carrier...])` line kills that
//! fixture's control. The battery runs fmt before the detector, so a
//! reflow turns the control RED on the next run instead of rotting.
//!
//! # Declared coupling
//!
//! ⚠️ These fixtures work because `ordering_detector.py` reads bind syntax
//! and call spellings per line and is blind to `cfg` and to types. If that
//! detector ever becomes AST-based, these controls must be re-sited. The
//! file must also never be renamed to anything ending `_tests.rs` — the
//! sibling hunt's `source_files()` skip-list convention applies to every
//! instrument in this lane's family.
// Load-bearing for the instrument, exactly as in `ar1_shape_control.rs`:
// the attribute-plus-brace is what the labeller keys on, and it is what
// keeps these fixtures out of the shipped binary while the per-line
// detector still sees them.