Include pg tests in root test gate#133
Conversation
commit: |
|
i don't want a bazillion test scripts just pnpm test |
|
🤖 Addressed the review comments in 51e1c7b. Root |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 51e1c7b. Configure here.
| "astro": "astro", | ||
| "test": "node --test test/*.test.mjs" | ||
| "test": "pnpm --filter @sqlfu/ui build && pnpm build", | ||
| "test:dist": "node --test test/*.test.mjs" |
There was a problem hiding this comment.
Website test/build scripts one rename from infinite recursion
Low Severity
The website test script calls pnpm build, and build ends with pnpm test:dist. This works today only because test:dist is a separate script from test. Previously, build called pnpm test directly (where test was just node --test ...). Now that test calls build, the separation between test and test:dist is the sole guard against infinite recursion. A future developer reverting test:dist back to test in the build command—a seemingly benign rename given it was literally pnpm test before this PR—would create an infinite loop: test → build → test → build → …
Reviewed by Cursor Bugbot for commit 51e1c7b. Configure here.


Summary
Makes the root
pnpm testgate discover workspace package tests directly instead of maintaining a separate list of roottest:*scripts:That pulls in
@sqlfu/pgthrough its package-leveltestscript and also makessqlfu-websitepart of the root test surface. The customscripts/workspace-package-scripts.test.mjsguard is removed; recursive workspace execution is the guard now.The review follow-up also makes the newly discovered package tests runnable:
sqlfu-websitenow has a self-contained packagetestthat builds the UI and website before running its dist assertions.buildscript callstest:distto avoid recursively callingtest.Before / after
Before this PR, root
pnpm testskipped@sqlfu/pgentirely.The first branch version fixed that with several root scripts and a custom script parser. After review, the net behavior is simpler:
pnpm testasks every workspace package with a test script to run its own tests.Clawpatch
Finding fixed:
fnd_sig-feat-config-7528cb5b98-913b2_958e290eccShared state directory used locally:
/Users/mmkal/src/sqlfu/.clawpatchRevalidation result:
fixedValidation
Passing:
Local
CI=1 pnpm testnow runs the website and pg package tests successfully, then stops in the existingsqlfupackage failures:pnpm typecheckalso still hits the pg test fixturegenerate.casinggap that the stacked root-lint PR fixes.Package size — packed 239.4 kB (no change)
Package size
dist/vendor/*.jsbundlesvendor/sha256.jsvendor/sql-formatter/*.jsvendor/sqlfu-sqlite-parser/*.jsvendor/standard-schema/*.jsvendor/typesql/*.jsMeasured with
npm pack --dry-run --jsononsqlfu(0.0.3-7 on main vs 0.0.3-7 on this PR).