Commit 6fa2a8a
test(cli): pin the per-package leg's resolution context, both directions (#17724)
* test(cli): pin the per-package leg's resolution context, both directions
`compile.ts`'s `packageBodyAsStack` hands each package's body the artifact's
own `packages[]` as resolution context, so a reference into an object a
SIBLING package of the same artifact ships resolves while one no entry
provides still errors. Neither half had an in-package pin: the firing
direction was held only by `examples/app-multi-package`, and the
non-degeneracy direction by a `packages/lint` control whose input is a local
three-key replica of `packageBodyAsStack` -- green even if this command stops
building that shape.
One fixture measures both, because the discriminating fact is WHICH of two
lookups on the package's object is reported. The top level carries the sibling
object alone, so `objects` is present, `authoringRuleUnionStack` folds nothing
(it fills absent keys only), and the union run never sees the referencing
object's fields -- whatever the build reports about them comes from the
per-package leg and nowhere else.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TSf4DV7ziu4V5j73e46b7c
* test(cli): record the union-leg reading the pin rests on, measured
The case's docblock argued that the union author-time rule run cannot be the
reporter for `probe_order`'s two lookups. That argument is now three readings,
each reddening only this case and leaving the other six in the file green:
1. drop `packages[]` from `packageBodyAsStack` -> the equality receives BOTH
paths, `objects[0].fields.account.reference` first;
2. hand the per-package leg no `objects` -- the "skip the site per package"
option the ruling rejected -- and `os build` exits 0 with `success: true`,
so the union run is not a second reporter for these paths and nothing else
in the command catches the dangling reference either;
3. add `probeOrder` to the TOP-LEVEL `objects` and the union run does report
it, answering `error: 'author-time rules failed'` -- which is why that
string is asserted before the paths are read.
The fold-skip premise the fixture's placement relies on is not re-derived here
either: `src/utils/stack-collections.test.ts` already pins it BY IDENTITY on
this exact shape, so the docblock cites that pin instead of re-arguing it.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TSf4DV7ziu4V5j73e46b7c
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 0641640 commit 6fa2a8a
1 file changed
Lines changed: 91 additions & 1 deletion
Lines changed: 91 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
132 | 132 | | |
133 | 133 | | |
134 | 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 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
135 | 206 | | |
136 | 207 | | |
137 | 208 | | |
| |||
147 | 218 | | |
148 | 219 | | |
149 | 220 | | |
150 | | - | |
| 221 | + | |
151 | 222 | | |
152 | 223 | | |
153 | 224 | | |
| |||
217 | 288 | | |
218 | 289 | | |
219 | 290 | | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
220 | 310 | | |
221 | 311 | | |
222 | 312 | | |
| |||
0 commit comments