Improve Whitaker test-helper quality - #334
Conversation
Use Whitaker installer 0.2.7 so CI recognises helpers inside test-only modules and reports genuine lint violations rather than false positives.
Replace helper-level `expect` calls with the shared `ExpectValid` assertion boundary so Whitaker can distinguish intentional test failures from production error handling.
Parameterize equivalent cases, remove tests that only restate their premises, and move the legacy libSQL schema into a named fixture. Keep assertions focused on observable behaviour and make migration input easier to inspect independently.
Reviewer's GuideIntroduces a shared Flow diagram for the legacy libSQL test fixtureflowchart LR
LegacySchema[legacy_wasm_wit_schema.sql]
MigrationTest[libsql_wit_defaults migration test]
MigrationLogic[Existing migration logic]
LegacySchema --> MigrationTest
MigrationTest --> MigrationLogic
File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Warning Your free Security trial is over. An organization admin can activate billing to continue. Comment |
Pull Request
Summary
This branch makes test-only assertion boundaries explicit for Whitaker and
removes test quality debt without changing runtime behaviour.
ExpectValidassertion boundary for test-only helpers.test failures.
tautological no-panic tests that only restated their premises.
scoped in-process environment-mutation migration and its Clippy guardrail.
Change Type
Linked Issue
None; this is a targeted CI lint-regression repair and test-quality sweep.
Review walkthrough
for the named
ExpectValidboundary used by test helpers.and src/safety/leak_detector/tests.rs
for the readable
rstestcase consolidation.for the remaining deterministic doctor assertions after ambient no-op smoke
tests were removed.
and its legacy SQL fixture.
Validation
make check-fmtmake lintmake typecheckmake test— 4,247 passed, 8 skipped; GitHub tool tests: 5 passedgit diff --checkSecurity Impact
None. This changes test assertion boundaries, test structure, fixture placement,
and CI lint tooling only.
Database Impact
None. The moved SQL fixture preserves the legacy schema used by the existing
libSQL migration test; it adds no runtime schema, migration, query, or data
change.
Blast Radius
Limited to test helpers compiled by the Whitaker CI lint job and test-source
organization.
Rollback Plan
Revert the shared assertion boundary, test-quality commit, and installer update
if they prove incompatible.
Review track: C (CI)
References
Summary by Sourcery
Improve Whitaker compatibility and test quality without changing runtime behavior.
Enhancements:
CI:
Tests: