Goal / finish line
bun run type-check:tests (root tsconfig.tests.json, added with the verify-verdict PR) reports zero errors, and tsconfig.typecheck.json references it so bun run type-check covers every test file in core, backend, sync, and scripts.
Acceptance
bun run type-check exits 0 with tsconfig.tests.json in its references.
bun run type-check:tests is deleted (folded into type-check).
- No test was weakened or deleted to get there; fixes are typings, fixtures, and helper signatures.
Context
Until now the build graph excluded **/*.test.ts and **/__tests__/** for the node packages, so about 60,000 lines of tests were never type-checked. With Bun's test globals typed (bun-types/test-globals) the remaining errors are real: 420 TS2322 (wrong fixture shapes, often branded TimeZone/DateOnly strings), 173 TS2769, 117 TS4111 (index-signature access on env/config objects), 101 TS2532, 91 TS2741. The heaviest files: packages/sync/src/domain/provider-command.service.db.test.ts (135), packages/sync/src/storage/repositories/event.repository.db.test.ts (77), packages/sync/src/domain/cloud-command.service.db.test.ts (75), packages/backend/src/common/middleware/supertokens.middleware.test.ts (63).
Split by package (core, backend, sync/domain, sync/storage, sync/providers, scripts) so each PR stays inside the merge-guard rails. A shared fixture factory for branded types will remove most TS2322 hits at once.
Package scope
core, backend, sync, scripts
Verify commands
bun run type-check:tests
bun test:core
bun test:backend
bun test:sync
bun test:scripts
Approval boundary
allow
Untrusted input
Goal / finish line
bun run type-check:tests(roottsconfig.tests.json, added with the verify-verdict PR) reports zero errors, andtsconfig.typecheck.jsonreferences it sobun run type-checkcovers every test file in core, backend, sync, and scripts.Acceptance
bun run type-checkexits 0 withtsconfig.tests.jsonin itsreferences.bun run type-check:testsis deleted (folded intotype-check).Context
Until now the build graph excluded
**/*.test.tsand**/__tests__/**for the node packages, so about 60,000 lines of tests were never type-checked. With Bun's test globals typed (bun-types/test-globals) the remaining errors are real: 420 TS2322 (wrong fixture shapes, often brandedTimeZone/DateOnlystrings), 173 TS2769, 117 TS4111 (index-signature access on env/config objects), 101 TS2532, 91 TS2741. The heaviest files:packages/sync/src/domain/provider-command.service.db.test.ts(135),packages/sync/src/storage/repositories/event.repository.db.test.ts(77),packages/sync/src/domain/cloud-command.service.db.test.ts(75),packages/backend/src/common/middleware/supertokens.middleware.test.ts(63).Split by package (core, backend, sync/domain, sync/storage, sync/providers, scripts) so each PR stays inside the merge-guard rails. A shared fixture factory for branded types will remove most TS2322 hits at once.
Package scope
core, backend, sync, scripts
Verify commands
Approval boundary
allow
Untrusted input