Repository navigation
test(GAT-9592): port the Vitest integration and unit suites - #138
Merged
Merged
Conversation
|
🎉 Great job! Your PR title follows the correct format. 🚀 |
calmacx
added this pull request to stack #139
September 22, 2026 09:17
calmacx
force-pushed
the
feat/GAT-9592-tests
branch
from
September 22, 2026 09:24
c3df7fd to
563ebda
Compare
…fects
Found by replaying the production fixtures under strict equality. Each is a
difference from the Express service that nobody chose.
1. A failing JSONata map returned 400 with the raw jsonata error as `details`
— including a `stack` carrying absolute server paths. Express returned 500
`Failed to execute translation between X and Y` with an empty `details`.
12 of the 104 fixtures trigger this, so it is a live information-disclosure
path rather than a theoretical one. The jsonata error now goes to the server
log and the response matches Express.
2. Output-validation failures gained a top-level `data` key holding the
rejected translation. Express built that object but its catch block returned
only {message, details}, so production never emitted it.
3. /find with a non-JSON content type dropped `value: {}` from its error entry.
express-validator includes the unparsed body there.
4. `Subsection X not found` lost Express's ` in provided metadata.` suffix.
Nothing here changes a success path. The two message and status changes are
restorations, not new behaviour.
Brings the integration suites across from poc/GAT-XXXX — translate, validate, find, get, list, openapi and the contract-regression cases — along with the shared helpers, the global setup that waits on a running server, both vitest configs and the relocated Express fixture inputs under tests/data/. The production replay harness that originally accompanied these suites is not here. It and its ~1MB captured corpus live outside the repo, in an untracked regression-suite/ directory, so the differences it documents are recorded once as prose rather than carried as a megabyte of fixtures through every clone and every review.
/list/datasets and /get/dataset moved to WS4 PR01, so the five cases that exercise them go with the endpoints rather than testing routes this branch no longer serves. Case count drops 63 to 58: three from get.test.ts and two from list.test.ts. Any other movement in that number is a real regression, not this commit. Refs: upgrade-plans/07-strip-admin-surface-from-ws1.md
calmacx
force-pushed
the
feat/GAT-9592-tests
branch
from
September 22, 2026 09:27
563ebda to
b1ae17e
Compare
equinoxmatt
approved these changes
Sep 22, 2026
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Ports the Vitest integration and unit suites from
poc/GAT-XXXX—translate,validate,find,get,list,openapiand the contract-regression cases — with the shared helpers, the global setup that waits on a running server, both vitest configs, and the relocated Express fixture inputs undertests/data/. Also fixes four real defects inapp/lib/schema.server.ts,app/routes/api/find.tsandapp/routes/api/translate.ts.Why
The rewrite had no test suite of its own until this point; PRs below it were gated only on
typecheck,lintandbuild. The four fixes are genuine bugs, not test scaffolding — one of them stopped a broken JSONata map returning a server-side stack trace, absolute filesystem paths included, to any caller of/translate.Testing
npm test— 8 files, 54 tests — andnpm run test:unit— 2 tests — both green against a production build (npm run build && npm start), not dev mode.npm run typecheck,npm run lintandnpm run buildall exit 0.Notes
regression-suite/directory, ignored via.gitignore. The behavioural differences it documented are written up there as prose instead of carried as fixtures through every clone and review.tests/regressions.test.ts(plural) is a normal contract-regression suite and is unrelated to the removed replay harness — easy to confuse by name.🤖 Generated with Claude Code