feat: exercise the Fastify starter in the verify harness - #162
Merged
Conversation
The scaffold has offered a Fastify API since the templates bump, but the conformance harness only drove the Express adapter, so a green run said nothing about whether a Fastify-scaffolded project worked. Adds verify/adapter-fastify-app on port 3001, a twin of the Express adopter backend: same routes, same env contract, same capture transport, so a spec cannot tell which one answered and any difference in behaviour is a real one. Two differences the framework forces: the Fastify adapter takes no issuer option, and Fastify binds loopback by default, which is unreachable from outside the container. The adapter specs are not duplicated. Both projects run the same files from ./adapter and differ only in the adapterUrl project option, so adding an adopter framework is a project entry plus a compose service. Because the projects share a directory, matrixReporter now takes the layer from the Playwright project name rather than the spec path, and sizes each column to its own header. --local builds and packs @seamless-auth/fastify alongside core and express, with core packed into both vendor dirs since each image installs it beside its own adapter. --api-only and --no-react are unchanged. Closes #147
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.
Closes #147.
The scaffold has offered a Fastify API since the templates bump in #146, but the conformance harness only ever drove the Express adapter. A green
seamless verifysaid nothing about whether a Fastify-scaffolded project actually worked.Result
Verified locally against the real stack (
seamless verify --no-react, exit 0, 24 passed):Fastify passes the same five cookie-path flows as Express, and a regression in either is attributable to that framework.
How
verify/adapter-fastify-app(port 3001) is a deliberate twin of the Express adopter backend: same routes, same env contract, same capture transport, so a spec cannot tell which one answered. Two differences the framework forces, both commented in place:issueroption (the Express one does);audienceis what both check API-signed tokens against.0.0.0.0.The specs are not duplicated. Both adapter projects run the same files from
./adapterand differ only in anadapterUrlproject option (lib/fixtures.ts). Adding an adopter framework is a project entry plus a compose service, never a copy of the suite.matrixReporternow takes the layer from the Playwright project name, not the spec's path. The two projects share a directory, so the path can no longer identify the layer. Columns size to their own headers soadapter-fastifydoesn't collide with the next one.--localbuilds and packs@seamless-auth/fastifyalongside core and express, with core packed into both vendor dirs since each image installs it beside its own adapter. That fan-out is asserted in a unit test rather than left to the next--localrun to discover.--api-onlyand--no-reactare unchanged.Notes
@seamless-auth/fastify@^0.3.1, above the 0.2.0 floor the issue called for (console proxy support). The summary output reports the pin alongside the Express one.DISABLE_AUTH_RATE_LIMITS=true, and the adapter suite already prefers magic-link over a second email-OTP round trip.betain the registry; this does not change that, it just means the beta is now conformance-tested.Checks
npm run build,npx tsc --noEmitin the harness, andnpm test(815 passed, 4 skipped) all pass. The live run above is the meaningful one. Rebased onto 0.11.0.