Skip to content

Commit f96e109

Browse files
committed
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
1 parent e10a412 commit f96e109

1 file changed

Lines changed: 22 additions & 6 deletions

File tree

packages/cli/test/build-multi-package-artifact.e2e.test.ts

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -149,12 +149,28 @@ export default {
149149
*
150150
* ⚠️ The top level carries `probe_account`, so `objects` is PRESENT and
151151
* `authoringRuleUnionStack` folds nothing into it — it only ever fills ABSENT
152-
* keys. The union run therefore never sees `probe_order`'s fields at all, and
153-
* whatever this build reports about them was produced by the per-package leg
154-
* and by nothing else. That is what makes this a pin on `compile.ts`'s half
155-
* rather than a second copy of `packages/lint`'s rule test, whose input is a
156-
* local three-key REPLICA of `packageBodyAsStack` (`perPackageStack`) and stays
157-
* green if this command stops building that shape.
152+
* keys, which `src/utils/stack-collections.test.ts` pins BY IDENTITY on exactly
153+
* this shape (a stack carrying both its collections and `packages[]`). So the
154+
* union run never sees `probe_order`'s fields, and this is a pin on
155+
* `compile.ts`'s half rather than a second copy of `packages/lint`'s rule test,
156+
* whose input is a local three-key REPLICA of `packageBodyAsStack`
157+
* (`perPackageStack`) and stays green if this command stops building that
158+
* shape.
159+
*
160+
* ⭐ That last claim is MEASURED rather than argued. Three ablations, each
161+
* reddening THIS case alone and leaving the other six in this file green:
162+
*
163+
* 1. drop `packages[]` from `packageBodyAsStack` (the pre-#16611 shape) — the
164+
* equality below receives BOTH paths, `account` first;
165+
* 2. hand the per-package leg no `objects` at all, i.e. the "skip the site per
166+
* package" option the ruling rejected — `os build` exits **0** with
167+
* `success: true`, so the union run is NOT a second reporter for these
168+
* paths and nothing else in the command catches the dangling reference
169+
* either;
170+
* 3. add `probeOrder` to the TOP-LEVEL `objects` — the union run does report
171+
* it, and `error` reads `author-time rules failed`. That is why the error
172+
* string is asserted BEFORE the paths are read: it is the only thing that
173+
* tells the two exits apart from outside.
158174
*/
159175
const CONFIG_PKG_REFS = `
160176
const coreManifest = { id: 'com.example.probe.core', name: 'core', version: '1.0.0', type: 'app', namespace: 'probe' };

0 commit comments

Comments
 (0)