fix: re-enable stress-test seeding assertions and allow manual dispatch - #1339
Merged
Merged
Conversation
Re-enable the commented-out result assertions in the 1M-user seeding steps: each non-OK creation result is now counted per step and the run fails at the end if any step had failures, so a silently-erroring step no longer "passes" and invalidates downstream measurements. Add a workflow_dispatch trigger to the stress-tests workflow so it can be run manually against any published dev image. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
porcellus
approved these changes
Aug 2, 2026
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.
Problem / root cause
The 1M-user stress-test suite (
stress-tests/) is meant to make query-pathdurations trustworthy and comparable across runs, but two gaps undermine that:
stress-tests/src/oneMillionUsers/createUsers.tsthe four user-creationsteps had their result assertions commented out
(
// expect(createdUser.status).toBe("OK")) and only kept a user onstatus === 'OK', dropping any non-OK result on the floor. A seeding stepthat partially errored still let the run finish green, which invalidates
every measurement taken downstream of the smaller-than-expected dataset.
(There is no
expect/jest in this plaints-nodeharness, so the literalcommented line could never have run as-is.)
.github/workflows/stress-tests.ymlonly exposed aworkflow_callinterface, so the suite could only run as part of a releaseworkflow — it couldn't be run on demand against a published dev image.
Fix approach
FailureTrackersingleton tostress-tests/src/common/utils.ts(mirroring the existing
StatsCollector). Each of the five creation steps nowrecords a non-OK result against its step name instead of silently dropping it,
and
throwIfAnyFailures()prints a per-step summary and throws at the endof the run. Counting-and-failing-at-the-end (rather than aborting on the first
non-OK) is deliberate: seeding and the read steps still complete and
stats.jsonis still written, but the overall run fails so untrustworthynumbers aren't mistaken for a clean baseline.
workflow_dispatchtrigger tostress-tests.ymlwith the samerequired
tagstring input theworkflow_callinterface takes. The existing${{ inputs.tag }}reference in the compose-image step is populated for bothtrigger types, so no other workflow change was needed.
Scope note (other step files): the issue asked to check the other seeding
step files for the same pattern. I audited all of them
(
accountLinking.ts,addRoles.ts,createSessions.ts,createUserIdMappings.ts,importMillionUsers.ts) — the commented-outassertion pattern exists only in
createUsers.ts. The other steps callvoid-returning recipe methods that throw on hard failure; wiring status
assertions into them would require deciding which non-OK statuses are
acceptable during random linking/mapping and risks spurious run failures, so I
left them unchanged to honor the issue's "no behavior changes otherwise". They
are candidates for the measured-step work in the follow-up unit.
No behavior change to shipped core or to any SDK — this touches only the
stress-test harness and its CI workflow.
Tests / verification run locally
This is a test-harness change; the full suite seeds 1M users against a live
core and is not runnable in the iteration window. What I ran locally in
stress-tests/:npx tsc --noEmit— passes (type-checks the changed TS).npx prettier --checkon the three changed.tsfiles — all match style.FailureTrackerdirectly viats-node: empty tracker →throwIfAnyFailures()is a no-op and logs the all-clear line; afterrecording non-OK results it aggregates per step (e.g.
EmailPassword users creation: 2 non-OK result(s) — {"EMAIL_ALREADY_EXISTS_ERROR":2})and throws with a count summary.
stress-tests.ymlparses and now exposes bothworkflow_callandworkflow_dispatchwith thetaginput.Not verified
dev image and a long-running core; CI / a manual
workflow_dispatchrun isthe place to confirm the wired end-of-run failure path against real data.
Cross-SDK note
N/A for porting: this is CI/test-harness code that lives only in
supertokens-core; it has no counterpart in the supertokens-node / -python /-golang repos and makes no semantic change to core behavior.
Part of PLAN-006.
Fixes #1335