Skip to content

chore: typescript 7, test tier split, on-demand rule docs - #46

Open
zaxovaiko wants to merge 19 commits into
devfrom
chore/rules-and-test-split
Open

chore: typescript 7, test tier split, on-demand rule docs#46
zaxovaiko wants to merge 19 commits into
devfrom
chore/rules-and-test-split

Conversation

@zaxovaiko

@zaxovaiko zaxovaiko commented Jul 30, 2026

Copy link
Copy Markdown
Member

Summary

Tooling, test, and documentation improvements - no runtime product behavior changes. TypeScript 7, Docker-free unit tests, migration-byte safety, and on-demand rule docs improve the local development loop.

Why

Typechecks were slow, routine tests required infrastructure, and all agent guidance was loaded by default. More importantly, formatting generated Drizzle migrations could change their hashes and cause already-applied migrations to run again.

Alternatives considered

  • Keep one test tier - rejected because it makes fast local testing depend on Docker and leaves infrastructure requirements unclear.
  • Let formatters rewrite migration SQL - rejected because Drizzle identifies applied migrations by file bytes.
  • Keep the full rule set always loaded - rejected because focused, on-demand standards preserve the guidance while reducing default context.

Risks

Existing local test databases with a stale migration hash need recreation through the fresh setup path. The e2e suite now runs after core integration tests to avoid their shared Redis logical databases colliding.

zaxovaiko added 18 commits July 30, 2026 15:03
Files using createTestDb/createTestRedis are renamed *.int.test.ts and run in
test:integration (docker pg + redis); test:unit is the infra-free suite and
drops to ~4s. A new oss-module-shape/int-test-file-naming lint rule keeps the
split from rotting. vite-tsconfig-paths makes @openora/core/* resolve to src in
core's suites, so vitest related/watch see cross-module edges.
Appending a final newline changes a migration file's bytes, and drizzle hashes
those bytes to decide what is already applied - an applied migration then
re-runs and fails. db:setup:test gains a --fresh flag to recover a local test db
that already recorded a stale hash.
…nd detail

conventions.md drops from 236 to ~60 lines - philosophy, a hard Never list, a
hard Always list, and a table routing to the file that covers the change.
clean-architecture.md folds into docs/standards/module-structure.md. The nine
docs/standards files live outside .rulesync, so they are read on demand instead
of being injected into every agent context.
Core's suite flushes Redis logical DBs 0-15 (VITEST_POOL_ID % 16) while a
bootTestApp e2e claims its own downward from 15, so running both concurrently
lets one wipe the other's cache, streams and job queue mid-test. Verify runs
them back to back instead.
tsc 7.0.2 miscompiles a ternary's numeric-literal branch in the linux CI build:
analytics' `dropOffRate: previousStage ? rate(...) : 0` lands in dist as
`: null`, so the funnel route serves null and the analytics e2e fails. The mac
build of the same version emits 0 correctly, so it is platform-dependent - not
worth carrying until it is understood upstream.
167ea67 made the first funnel stage return null and the contract nullable but
left the e2e asserting 0. Nothing caught it because verify never ran this suite
until test:integration joined the gate. Restores typescript 7.0.2 too - the null
came from dev, not from the compiler.
@zaxovaiko zaxovaiko self-assigned this Jul 31, 2026
@zaxovaiko
zaxovaiko marked this pull request as ready for review July 31, 2026 12:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant