Repository navigation
Commit 19089ee
committed
fix(ref): let the frame model report which tree a ref's node was read from (#3471)
`measureRefObservation` re-derived the adoption rule that
`reconcileFreshObservation` had already applied: it looked the ref up in the
capture again and required the dispatched node to match it on rect and local
identity. Two implementations of one ADR 0014 step 5 decision, so the day
reconciliation gains or drops a rule, the gate can call a look "measured" on an
adoption the rule no longer grants — or refuse one it does grant.
`reconcileFreshObservation` now states what it chose, on every branch:
`adoptedFrom: 'observation' | 'authorized-frame'`. The value rides the ref's
`ResolvedInteractionTarget`, which is where a caller reads the node, rect and
`preAction` it dispatched, so the provenance travels with the evidence it
describes rather than being inferred from it afterwards. The gate reads that
field: a look measured the target exactly when the resolution says it read the
dispatched node out of the observation, and the look's surface now comes from
that same capture through `surfaceScopedNodes` — the way the selector branch
reads its resolution's `preAction` — instead of reaching for
`snapshot.iosSystemSurfaceBundleId` directly.
The two refusal tests are the ones that pay for this, and they are the reason
rect agreement is still not enough: a different control that took over the ref
at the frame's own coordinates produces two agreeing rects, and only the
reported provenance says the dispatch read them from the authorized frame.
Verified by mutating the reported value on each branch: reporting
'authorized-frame' where the observation was adopted reddens `the @ref path
takes its own observations, because its resolution spends none`; reporting
'observation' on either keep-the-frame branch reddens `a ref the second
observation cannot re-measure is refused, never self-agreed` and `a replacement
that took the ref at the frame coordinates is refused, not agreed`.1 parent 3d8e3ff commit 19089ee
3 files changed
Lines changed: 53 additions & 33 deletions
File tree
- packages/contracts/src
- src/commands/interaction/runtime
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
153 | 156 | | |
154 | 157 | | |
155 | 158 | | |
| |||
168 | 171 | | |
169 | 172 | | |
170 | 173 | | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
171 | 184 | | |
172 | 185 | | |
173 | 186 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
12 | | - | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
| 22 | + | |
26 | 23 | | |
27 | 24 | | |
28 | | - | |
29 | | - | |
| 25 | + | |
| 26 | + | |
30 | 27 | | |
31 | 28 | | |
32 | 29 | | |
| |||
233 | 230 | | |
234 | 231 | | |
235 | 232 | | |
236 | | - | |
| 233 | + | |
237 | 234 | | |
238 | 235 | | |
239 | 236 | | |
240 | | - | |
241 | | - | |
| 237 | + | |
242 | 238 | | |
243 | 239 | | |
244 | 240 | | |
245 | 241 | | |
246 | | - | |
247 | | - | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
248 | 247 | | |
249 | 248 | | |
250 | | - | |
251 | | - | |
| 249 | + | |
252 | 250 | | |
253 | 251 | | |
254 | 252 | | |
255 | | - | |
256 | | - | |
257 | | - | |
258 | | - | |
259 | | - | |
260 | 253 | | |
261 | | - | |
262 | | - | |
263 | | - | |
264 | | - | |
265 | | - | |
| 254 | + | |
266 | 255 | | |
267 | | - | |
| 256 | + | |
268 | 257 | | |
269 | 258 | | |
270 | 259 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| |||
43 | 44 | | |
44 | 45 | | |
45 | 46 | | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
46 | 52 | | |
47 | 53 | | |
48 | 54 | | |
| |||
90 | 96 | | |
91 | 97 | | |
92 | 98 | | |
| 99 | + | |
93 | 100 | | |
94 | 101 | | |
95 | 102 | | |
| |||
100 | 107 | | |
101 | 108 | | |
102 | 109 | | |
103 | | - | |
| 110 | + | |
104 | 111 | | |
105 | 112 | | |
106 | 113 | | |
| |||
128 | 135 | | |
129 | 136 | | |
130 | 137 | | |
| 138 | + | |
131 | 139 | | |
132 | 140 | | |
133 | 141 | | |
| |||
138 | 146 | | |
139 | 147 | | |
140 | 148 | | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
141 | 156 | | |
142 | 157 | | |
143 | 158 | | |
144 | 159 | | |
145 | | - | |
| 160 | + | |
146 | 161 | | |
147 | 162 | | |
148 | 163 | | |
| |||
180 | 195 | | |
181 | 196 | | |
182 | 197 | | |
183 | | - | |
| 198 | + | |
184 | 199 | | |
185 | 200 | | |
186 | | - | |
187 | | - | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
188 | 206 | | |
189 | 207 | | |
190 | 208 | | |
| |||
194 | 212 | | |
195 | 213 | | |
196 | 214 | | |
197 | | - | |
| 215 | + | |
198 | 216 | | |
199 | | - | |
| 217 | + | |
200 | 218 | | |
201 | 219 | | |
202 | 220 | | |
| |||
0 commit comments