Commit 305d86f
committed
fix(rest): pin the test double's write verbs and drop two test-layer type errors (#7134)
Two CI gates on the previous head, both in the test file added by this PR:
`check:engine-double-contract` — the stub engine's `delete()` / `update()` did
not route through the producer's own dispatch predicates, so the double was
free to accept calls `ObjectQL` itself refuses. A fake looser than the real
implementation is a defect generator (#4434 shipped a dead REST route with a
green suite that way), which is the exact failure mode this card is about.
Both verbs now open with `assertEngineDeleteDispatch` / `assertEngineUpdateDispatch`
from `@objectstack/metadata-core` — already a dependency of this package, and
the right side of the edge: importing them from `@objectstack/objectql` would
invert a dependency turbo refuses.
`check:type-check-debt --re-measure` — `@objectstack/rest`'s TEST_DEBT records
155 and the branch measured 157. Both new errors came from ONE cause: the
extensionless `./rest-server` import does not resolve under
`moduleResolution: nodenext`, so `RestServer` became `any` and the callback over
it reported TS7006. Adding the `.js` extension takes the package back to exactly
155 — the ledger is untouched, which is what a shrink-only ratchet requires.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LBDWUuXmTrHe1o13eik3bT1 parent 161f5ec commit 305d86f
1 file changed
Lines changed: 25 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
47 | 59 | | |
48 | | - | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
49 | 65 | | |
50 | 66 | | |
51 | 67 | | |
| |||
64 | 80 | | |
65 | 81 | | |
66 | 82 | | |
67 | | - | |
68 | | - | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
69 | 91 | | |
70 | 92 | | |
71 | 93 | | |
| |||
0 commit comments