Commit f123670
The descent from a `views[]` entry down to the records that can actually carry
`sections` had three independent implementations in `packages/lint`:
- `formViewSites` in validate-visibility-predicates.ts (#6248)
- `collectViewSites` in validate-translatable-sections.ts
- `formViewSites` in validate-form-layout.ts (#6251, a verbatim
copy of the first)
The same rung was measured MISSING twice in two consecutive issues (#6128 →
#6248, then #6251), each time fixed in one copy only. Copying the fixed walker
was the cheapest move each time; the copy count is the argument for one source.
`page-walk.ts` (#3583) is the in-package model and is followed here.
`view-walk.ts` yields the UNION of the three ladders as typed sites —
`self` / `form` / `listView` / `formView` — and each consumer filters:
- `viewContainerSites()` — the full ladder. Consumed by
validate-translatable-sections, which needs the `listViews.*` rung to reach
an object's own `listViews` container (declared as part of its section face
in its own module docblock, and pinned by its tests).
- `formViewSites()` — the same ladder minus `listViews.*`, a FILTER and not a
second ladder. Consumed by validate-visibility-predicates and
validate-form-layout, whose tests pin that they do NOT walk list views.
The union, not the intersection, is deliberate. The narrowest common shape would
have deleted the `listViews.*` rung, and a schema proof was NOT sufficient
licence to do so: `ObjectListViewSchema` (view.zod.ts:1864-1865, over
`ListViewSchema` at :1067) declares no `sections` — the only declaration of
`sections`/`groups` in the file is `FormViewSchema`'s at :1649-1650 — so on a
schema-VALID stack that rung reads `undefined`, but `os lint` runs authoring
rules over the NORMALIZED stack, and the third rule documents that surface. The
`form` rung (#5415, the default anchor that is neither a `formViews.*` entry nor
the record's own) is likewise kept and now carries its reasoning in one place.
Binding resolution is deliberately NOT folded in: the three consumers compose
their fallbacks differently and a refactor that changes a verdict is a failed
refactor. One equivalence WAS proven and collapsed, in
validate-translatable-sections: the entry's own site resolved
`recordObject ?? listBinding` while sub-containers resolved
`viewObjectName(sub) ?? recordObject ?? listBinding`; for the entry
`viewObjectName(view)` IS `recordObject`, so the sub-container formula returns
the same answer and the two branches are now one expression.
Refactor-grade evidence: a differential harness (temporary, not committed) ran
both the converged rules and their `origin/main` baselines over 222 generated
stacks covering every rung, both collection shapes, object-embedded views,
unnamed containers, junk rungs and every binding shape — 888 rule runs, 3295
findings compared with JSON.stringify so ORDER counts. Byte-identical
throughout. Emission order is preserved by walking `self → form → listViews.* →
formViews.*`, which the `listView` filter reduces to the two form rules' exact
previous order.
Reverse verification, direction predicted before each run:
- drop the `formViews.*` rung → predicted all three rules red: 22 failures
across all three suites AND all three differential baselines, from one edit.
- drop the `form` rung (#5415) → predicted all three red: 15 failures, same
spread.
- drop the `listViews` rung → predicted ASYMMETRIC: only translatable-sections
red. Measured 6 failures; validate-visibility-predicates.test.ts and
validate-form-layout.test.ts both passed, and only the translatable
differential diverged. That is the filter proving it is a filter, and the
rung proving it is live for exactly one consumer.
No changeset: no verdict, message, path or ordering changes, and `view-walk.ts`
is internal — not exported from index.ts, matching `flow-walk.ts`.
Claude-Session: https://claude.ai/code/session_01F8q5J1MQyocgtNspb15fSn
Co-authored-by: Claude <noreply@anthropic.com>
1 parent 04476e7 commit f123670
5 files changed
Lines changed: 440 additions & 169 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
| 33 | + | |
32 | 34 | | |
33 | 35 | | |
34 | 36 | | |
| |||
93 | 95 | | |
94 | 96 | | |
95 | 97 | | |
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 | | - | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
132 | 106 | | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
141 | 112 | | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | 113 | | |
167 | 114 | | |
168 | 115 | | |
| |||
227 | 174 | | |
228 | 175 | | |
229 | 176 | | |
230 | | - | |
231 | | - | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
232 | 182 | | |
233 | 183 | | |
234 | 184 | | |
| |||
239 | 189 | | |
240 | 190 | | |
241 | 191 | | |
242 | | - | |
| 192 | + | |
243 | 193 | | |
244 | 194 | | |
245 | 195 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
76 | 79 | | |
77 | 80 | | |
78 | 81 | | |
| |||
86 | 89 | | |
87 | 90 | | |
88 | 91 | | |
| 92 | + | |
89 | 93 | | |
90 | 94 | | |
91 | 95 | | |
| |||
181 | 185 | | |
182 | 186 | | |
183 | 187 | | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
189 | 210 | | |
190 | 211 | | |
191 | 212 | | |
192 | 213 | | |
193 | | - | |
194 | | - | |
195 | 214 | | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
| 215 | + | |
206 | 216 | | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
211 | 221 | | |
212 | 222 | | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | 223 | | |
228 | 224 | | |
229 | 225 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
84 | 86 | | |
85 | 87 | | |
86 | 88 | | |
| |||
226 | 228 | | |
227 | 229 | | |
228 | 230 | | |
| 231 | + | |
229 | 232 | | |
230 | 233 | | |
231 | 234 | | |
| |||
650 | 653 | | |
651 | 654 | | |
652 | 655 | | |
653 | | - | |
654 | | - | |
655 | | - | |
656 | | - | |
657 | | - | |
658 | | - | |
659 | | - | |
660 | | - | |
661 | | - | |
662 | | - | |
663 | | - | |
664 | | - | |
665 | | - | |
666 | | - | |
667 | | - | |
668 | | - | |
669 | | - | |
670 | | - | |
671 | | - | |
672 | | - | |
673 | | - | |
674 | | - | |
675 | | - | |
676 | | - | |
677 | | - | |
678 | | - | |
679 | | - | |
680 | | - | |
681 | | - | |
682 | | - | |
683 | | - | |
684 | | - | |
685 | | - | |
686 | | - | |
687 | | - | |
688 | | - | |
689 | | - | |
690 | | - | |
691 | | - | |
692 | | - | |
693 | | - | |
694 | | - | |
695 | | - | |
696 | | - | |
697 | | - | |
698 | | - | |
699 | | - | |
700 | | - | |
701 | | - | |
702 | | - | |
703 | | - | |
704 | | - | |
705 | 656 | | |
706 | 657 | | |
707 | 658 | | |
| |||
743 | 694 | | |
744 | 695 | | |
745 | 696 | | |
746 | | - | |
| 697 | + | |
747 | 698 | | |
748 | 699 | | |
749 | 700 | | |
| |||
0 commit comments