SmartTest

Risks

Reviewed when a version ships (last review: 0.9.0). Probability and impact on a 1 to 5 scale.

IDRiskPIMitigationState after 0.9.0
R1A finer graph (method level, mocks, env keys, routes) misses a real dependency and a failing test is skipped35Every edge type ships with a fixture in the regression harness; unresolved relationships are uncertainty and select the test; Shadow Mode and history replays on real repositoriesMitigated so far: 9 harness fixtures, LeadsIt and four public repositories at 0 missed failures. Two misses were found by new fixtures (fluent this, node --test directory globs) and fixed before release
R2Type-aware analysis is too slow for a pre-commit hook34Local inference instead of a type checker; class-level fallbackAvoided: type-checker resolution moved after 1.0.0
R3Runtime tracing slows test runs33Traces collected on demand (smarttest trace, --stale), not on hook runsMitigated: LeadsIt traces all 100 files in 23 s
R4Framework conventions (Next.js, Wasp, NestJS) change between versions33Conventions in one place each (routes.ts, Wasp spec reader); unmatched visits are uncertaintyOpen
R5No hosted CI, so Windows and macOS regressions go unnoticed33Run pnpm verify on all three systems before a release; POSIX-normalised pathsOpen: only Linux validated; carried to 1.0.0
R6The npm name smarttest is not available (happened: published as @tkmremi/smarttest)23Decide (ADR-0007); assets are generated, a rename is mechanicalOpen: decision pending, blocks npm publication
R7The result cache returns a stale result25Content-addressed keys over all inputs; uncacheable tests excluded; cached results always labelled; benchmark checks every cached pass against a full runMitigated: 0 integrity violations on LeadsIt (ADR-0009)
R8Studio exposes the file system to other local processes24Loopback only, session token, origin checks, restricted project rootMitigated by loopback/token/origin/method tests and realpath containment; broader review remains for 1.0.0
R9Analysis overhead exceeds the time saved on small repositories33Adaptive policy; benchmarks per releaseConfirmed on ufo and defu (−6% to −11% in benchmark); adaptive policy covers run
R10TypeScript 7 removes the API the analyzer uses43Analyzer isolated in language-typescript; TypeScript 6 pinnedHappened: TypeScript 7 has no parser API usable from Node; staying on 6, watch item
R11Parallel runner groups compete for a shared resource (port, database)23End-to-end groups run alone; parallelGroups: 1Open, no case seen yet
R12Observed execution rules out a test whose path depends on data24Only in FAST/BALANCED; SAFE only adds; traces dropped when any loaded file changes; Shadow Mode (ADR-0008)Mitigated so far

Assumptions #

IDAssumptionChecked
A1Node 22.12+ and 24 remain the supported runtimes until 1.0.0each release
A2Jest, Vitest and Node expose per-file coverage without private APIsconfirmed in 0.5.0 (NODE_V8_COVERAGE; Vitest in worker-thread mode)
A3Five external repositories are available for the 0.6.0 gateconfirmed in 0.6.0

Dependencies #

IDDependencyNeeded by
D1typescript 6.x programmatic APInow; TypeScript 7 when it has a parser API
D2npm name and scope1.0.0 (publication)

Edit this page on GitHub