Repository navigation
Commit 4262dda
committed
fix(engine-doubles): close the two defects the recovered findOne sweep left, and alias metadata-core in service-datasource
Supersedes the "NOT REVIEWED" disclaimer on 88784b7: the gate half and the
211-file adoption below it have now been run, ablated and re-measured. Three
things this commit changes, all of them found by running what that commit never
ran.
1. TS2345 in service-messaging. `delivery-headers-at-rest.integration.test.ts`
passed the fake's `q: unknown` straight into the predicate, whose parameter is
`EngineFindOneQueryInput | null | undefined`. vitest never type-checks, so the
suite was green and `tsc --noEmit` was red — the one direction a test-only
sweep can go wrong invisibly. Cast at the call, matching the sibling
`assertEngineUpdateDispatch(d as any, q as any)` pin three lines below it.
2. service-datasource's engine double reached `@objectstack/metadata-core`
through `dist/`. `check:test-source-alias` names the repair and refuses the
alternative: alias the specifier in the package's own vitest config, never
widen the shrink-only registry. A pin resolved through a build artifact is
pinned to whatever was last built rather than to the predicate beside it,
which is the single failure a contract pin exists to prevent.
3. Import order in that same test file is now load-bearing, and says so.
Aliasing metadata-core to source pulls its import graph into the package's
resolution domain, which switches on the clocked-window rule for the whole
package — and that rule then misreported a file that has paid its
`@objectstack/spec/kernel` load at module top since #10120. Cause is a
detector defect filed as #12555: the gate's import regex swallows a bare
side-effect import whenever an `import … from …` follows it later in the
file. Not worked around in the gate — the fix there needs its own
`--self-test` cases — so the statement is placed where the detector reads it
correctly, with a comment naming the constraint and the card that removes it.1 parent ad4203d commit 4262dda
3 files changed
Lines changed: 20 additions & 3 deletions
File tree
- packages/services
- service-datasource
- src/__tests__
- service-messaging/src
Lines changed: 7 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
11 | 13 | | |
12 | 14 | | |
13 | 15 | | |
14 | 16 | | |
15 | 17 | | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
16 | 23 | | |
17 | | - | |
18 | 24 | | |
19 | 25 | | |
20 | 26 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
41 | 52 | | |
42 | 53 | | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
288 | 288 | | |
289 | 289 | | |
290 | 290 | | |
291 | | - | |
| 291 | + | |
292 | 292 | | |
293 | 293 | | |
294 | 294 | | |
| |||
0 commit comments