Repository navigation
Commit c550baf
* test(cli): ledger the four `@objectstack/verify` option-B losses (#15229)
Step 1 of the card's ordered pair: make the loss visible BEFORE fixing it, so
the fix has something to be checked against. The by-shape sweep (#15210) found
these four reads; neither `@objectstack/verify` site had a row in the #15004
acceptance pin, which is why the sweep and not the pin is what found them.
Four rows, all at B2 (`os verify` has one door — `loadConfig` — and never opens
a compiled artifact, so a B1 twin would measure a path no command drives):
- `deriveCrudCases` · objects — zero CRUD round-trip cases derived
- `deriveCrudCases` · datasources — the ADR-0015 double write gate
- `declaredPositionNames` · positions — no persona for any declared position
- `rlsProbePermissionSet` · objects — an empty probe permission set
Every row calls a reader the package SHIPS; none re-implements one.
The datasource row needed a fixture member the zoo lacked: the datasource-by-
name map decides exactly one thing — whether a federated object's probe insert
clears ADR-0015's double opt-in — so watching it requires a federated object.
It is declared in the module package while the datasource that gates it is in
the App package, which makes the row a cross-package resolution. The control's
registry list grows by that object; the control itself is untouched.
RED, with only the rows added and the ledger lines absent:
A subsystem lost a collection that the ledger does not carry — this is the
failure #15004 exists to make loud.
B2 · verify declaredPositionNames (one RLS persona per declared position) · positions
B2 · verify deriveCrudCases (CRUD round-trip case derivation) · objects
B2 · verify deriveCrudCases federated write gate (ADR-0015 double opt-in) · datasources
B2 · verify rlsProbePermissionSet (RLS probe grants + owner narrowing) · objects
The BASELINE (additive shape) stayed green in that same run, so the red is a
discrimination and not a broken fixture. The four lines are then added to
OPTION_B_LOSSES, which is what this commit leaves in the tree; the next commit
fixes the readers and deletes them.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UHvF5hyiZjnCyExFnfQB8m
* fix(verify): resolve objects, datasources and positions from `packages[]` (#15229)
Step 2 of the card's ordered pair: the readers the previous commit ledgered now
see a multi-package app, and the four ledger lines are deleted in this commit.
`os verify` derives its entire proof set from the app's metadata, so a
collection it cannot see is not a missing feature — it is a run that asserts
nothing and still prints `✓ verify passed`. Under an option-B artifact
`deriveCrudCases` derived ZERO cases and `rlsProbePermissionSet` built an EMPTY
probe permission set: the persona that makes an RLS run a probe granted nothing
and narrowed nothing, and no persona was minted for any declared position.
The four reads go through one resolver (`declaredCollection`), which answers the
caller's ORIGINAL expression first and consults `packages[]` only where that
came back falsy:
- the top level is returned untouched when truthy, so today's additive
artifact answers bit-identically and this card is revertible on its own;
- `objects: []` is TRUTHY, so a declared-empty collection stays empty — the
behaviour a re-expression as `resolve(...).length > 0` would have changed
(measured on the sibling card #15006);
- package order comes from `resolveArtifactPackageOrder` (`@objectstack/core`,
ADR-0130 D4+D5), never from a second traversal of `config.packages`;
- a malformed `packages` now raises that function's ADR-0112 refusal instead
of reading as "this app declares nothing".
Both `deriveCrudCases` reads move together on purpose. Objects alone would leave
ADR-0015's double write gate judging against an empty datasource map, which
reports a write-opted-in federated object as read-only — a verifier silently
skipping an object the app explicitly opted into writes for.
The pin's RED before this commit named exactly the four rows to delete:
A ledgered subsystem now SEES its collections under option B — the reader
program moved forward. Delete these lines from OPTION_B_LOSSES:
B2 · verify declaredPositionNames (one RLS persona per declared position) · positions
B2 · verify deriveCrudCases (CRUD round-trip case derivation) · objects
B2 · verify deriveCrudCases federated write gate (ADR-0015 double opt-in) · datasources
B2 · verify rlsProbePermissionSet (RLS probe grants + owner narrowing) · objects
`composeStacks`, `packages/spec/src/stack.zod.ts` and what every command emits
are untouched: the artifact stays additive through this card.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UHvF5hyiZjnCyExFnfQB8m
* tooling(verify,cli): resolve the new cross-package imports to SOURCE (#15229)
Both halves are what `check:test-source-alias` and `check:type-source-resolution`
prescribe for a dep a change newly reaches; neither registry is widened (both are
shrink-only, and widening is never the fix):
- `packages/verify/vitest.config.ts` gains its first `resolve.alias` — one
ANCHORED entry for `@objectstack/core`, which `artifact-collections.ts` now
imports and every test in the package reaches through `derive.ts` / `rls.ts`.
Without it those tests resolve core through its `exports` map to `dist/`, i.e.
they become verdicts about build state, and the dangerous half of that is a
suite that passes GREEN over a stale artifact.
- `packages/verify/tsconfig.json` gains the matching `paths` rule, and the
`rootDir` widening that pulling core's source into the program requires
(`packages/core/tsconfig.json`'s own precedent; emit is unaffected, this
package builds with tsup).
- `packages/cli/tsconfig.test.json` gains a FOURTH bare-name rule beside the
three #15004 added, for the `@objectstack/verify` the probe rows now import.
Bare names, no stars: `@objectstack/core` publishes a `./logger` subpath that
keeps resolving through its own `exports` map, and a starred rule would swallow
it and resolve it THROUGH a file (ENOTDIR).
Measured after: `pnpm check:test-source-alias` OK (72 packages scanned),
`pnpm check:type-source-resolution` OK (121 programs / 78 packages),
`pnpm --filter @objectstack/verify typecheck` and
`pnpm --filter @objectstack/cli typecheck` both clean, and the two suites the
alias re-resolves stay green: verify 58/58, the option-B pin 6/6.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UHvF5hyiZjnCyExFnfQB8m
* test(cli): raise the option-B probe anti-vacuity floor to the measured 35
The merge with main brings #15261's re-anchored floor (a real bound now that
`OPTION_B_LOSSES` is empty) together with this card's four `@objectstack/verify`
rows. Merged, the probe measures 35 rows, so the floor moves 30 -> 35.
35 is measured, not remembered: with the assertion temporarily written
`toBe(-1)` the run reports `expected 35 to be -1`; a floor of 36 goes RED on the
same fixture. The raise also closes an off-by-one it inherited — 30 stood
against a probe that measured 31.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UHvF5hyiZjnCyExFnfQB8m
---------
Co-authored-by: Claude <noreply@anthropic.com>
1 parent c0c07ef commit c550baf
11 files changed
Lines changed: 503 additions & 23 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 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 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
82 | 104 | | |
83 | 105 | | |
84 | 106 | | |
| |||
137 | 159 | | |
138 | 160 | | |
139 | 161 | | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
140 | 175 | | |
141 | 176 | | |
142 | 177 | | |
| |||
199 | 234 | | |
200 | 235 | | |
201 | 236 | | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
202 | 253 | | |
203 | 254 | | |
204 | 255 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
67 | 72 | | |
68 | 73 | | |
69 | 74 | | |
| |||
88 | 93 | | |
89 | 94 | | |
90 | 95 | | |
| 96 | + | |
91 | 97 | | |
92 | 98 | | |
93 | 99 | | |
| |||
476 | 482 | | |
477 | 483 | | |
478 | 484 | | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
479 | 538 | | |
480 | 539 | | |
481 | 540 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
165 | 165 | | |
166 | 166 | | |
167 | 167 | | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
168 | 176 | | |
169 | 177 | | |
170 | 178 | | |
| |||
222 | 230 | | |
223 | 231 | | |
224 | 232 | | |
225 | | - | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
226 | 241 | | |
227 | 242 | | |
228 | | - | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
229 | 246 | | |
230 | 247 | | |
231 | 248 | | |
| |||
248 | 265 | | |
249 | 266 | | |
250 | 267 | | |
251 | | - | |
| 268 | + | |
252 | 269 | | |
253 | | - | |
254 | | - | |
| 270 | + | |
| 271 | + | |
255 | 272 | | |
256 | 273 | | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
257 | 281 | | |
258 | 282 | | |
259 | 283 | | |
260 | 284 | | |
261 | 285 | | |
262 | 286 | | |
263 | | - | |
| 287 | + | |
264 | 288 | | |
265 | 289 | | |
266 | 290 | | |
267 | | - | |
| 291 | + | |
268 | 292 | | |
269 | 293 | | |
270 | 294 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
129 | | - | |
130 | | - | |
131 | | - | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
132 | 133 | | |
133 | 134 | | |
134 | 135 | | |
| |||
142 | 143 | | |
143 | 144 | | |
144 | 145 | | |
145 | | - | |
146 | | - | |
| 146 | + | |
| 147 | + | |
147 | 148 | | |
148 | 149 | | |
149 | 150 | | |
| |||
159 | 160 | | |
160 | 161 | | |
161 | 162 | | |
162 | | - | |
| 163 | + | |
| 164 | + | |
163 | 165 | | |
164 | 166 | | |
165 | 167 | | |
| |||
0 commit comments