|
23 | 23 | * |
24 | 24 | * What each mode is worth is stated explicitly below, because the honest answer |
25 | 25 | * differs per mode and a vacuous pass must not read as coverage. |
| 26 | + * |
| 27 | + * ## Why this suite lives in `packages/qa/dogfood` and not in the driver (#13513) |
| 28 | + * |
| 29 | + * It used to be `packages/drivers/driver-turso/src/date-bucket-parity.test.ts`, |
| 30 | + * and the `@objectstack/verify` devDependency it needed was the ONE edge that |
| 31 | + * made this workspace's manifest graph cyclic: |
| 32 | + * |
| 33 | + * runtime --peerDependencies(optional)--> driver-turso |
| 34 | + * driver-turso --devDependencies--------> verify |
| 35 | + * verify --dependencies-----------------> runtime |
| 36 | + * |
| 37 | + * pnpm walks all four declaration classes when it computes a `PKG^...` / |
| 38 | + * `PKG...` closure, so that cycle left `pnpm --filter '<pkg>^...' build` with no |
| 39 | + * topological order to build in. pnpm does not refuse a cyclic selection — it |
| 40 | + * schedules the members CONCURRENTLY, so `verify`'s DTS leg reads a `dist` that |
| 41 | + * a sibling is still emitting, and the run dies with `TS2307`/`TS7016` naming a |
| 42 | + * module the author never touched. Seven seats paid for that misattribution on |
| 43 | + * unmodified trees before it was traced. Measured on 78 workspace manifests, |
| 44 | + * this was the ONLY single edge whose removal makes the whole graph acyclic. |
| 45 | + * |
| 46 | + * Nothing about this suite wanted to live in the driver: the repo's convention |
| 47 | + * for `@objectstack/verify`-based cross-package conformance is already this |
| 48 | + * package — `date-bucket-parity-conformance.test.ts` next door runs the very |
| 49 | + * same `checkDateBucketParity` over `driver-sql` and `driver-sqlite-wasm`, both |
| 50 | + * of which are `@objectstack/dogfood` devDependencies for exactly this reason. |
| 51 | + * TursoDriver was the outlier, and it is the outlier that closed the loop. |
| 52 | + * |
| 53 | + * ⭐ The move is semantics-preserving on the one axis that could have changed |
| 54 | + * silently. In its old home this suite imported `./turso-driver.js` — the |
| 55 | + * driver's SOURCE — so its verdict was about the checkout. A bare |
| 56 | + * `@objectstack/driver-turso` specifier would instead resolve through the |
| 57 | + * package's `exports` map to the BUILT `dist`, turning a source pin into a |
| 58 | + * verdict about the last `pnpm build`. Two declarations keep it a source pin, |
| 59 | + * and each is enforced by its own gate: an anchored `resolve.alias` entry in |
| 60 | + * this package's `vitest.config.ts` (`check:test-source-alias`) and a `paths` |
| 61 | + * rule in its `tsconfig.json` (`check:type-source-resolution`). Both carry the |
| 62 | + * reasoning at the site. |
26 | 63 | */ |
27 | 64 |
|
28 | 65 | import { describe, it, expect } from 'vitest'; |
29 | 66 | import { checkDateBucketParity } from '@objectstack/verify'; |
30 | | -import { TursoDriver } from './turso-driver.js'; |
| 67 | +import { TursoDriver } from '@objectstack/driver-turso'; |
31 | 68 |
|
32 | 69 | describe('TursoDriver date-bucket parity (framework#3773)', () => { |
33 | 70 | describe('local mode — the real check', () => { |
|
0 commit comments