Repository navigation
refactor(scripts): the argon2 measurement signs in through Plane's route - #146
Merged
Merged
Conversation
scripts/measure-argon2.sh (spike 0003 K4, run by hand against a deployed Worker) posted to the slice's sign-in, which goes when the slice does (issue #58). It posts to Plane's `POST /auth/sign-in/` now, with the same seed body and the same `?run=` label. The move changes what a miss is. Plane's route looks the email up before it hashes and answers an unknown one with a 400, where the slice's route hashed anyway, so the script's assumption that a miss costs the same one hash no longer holds. Measured on the native server at m=19456 t=2, 20 sign-ins each: right password 15.9 ms (200), wrong password 15.8 ms (400), unknown email 0.9 ms (400); the slice's unknown email 16.0 ms (401). The summary therefore counts CPU, wall and client time over the 200s only, and shows the CPU of the rest as a control column. On a synthetic output directory of five cases the old summary printed the burst's CPU p50 as 1.0 ms, which is the misses'. Not run on a deployed Worker: that needs an account and creates a KV namespace and two Workers. The figures recorded in research/0012 section 4 were taken against the slice's route and stand; the note and G-26 say so. Refs: #58 Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
This was referenced Nov 13, 2026
aRustyDev
added a commit
that referenced
this pull request
Nov 14, 2026
The owner reopened D-023 to check the Cloudflare cpuTime of the first strength check, the one figure #170 left as a local proxy. This records it, and changes no behaviour. On Cloudflare, with the #146 harness (a tail consumer writes cpuTime to KV), the first zxcvbn call in a fresh isolate costs a median 60.5 ms of CPU above a cold start of about 25 ms (95% interval 54.5 to 64.0). A warm check is 1 to 2 ms. 666 requests over 18 fresh Workers, two requests that are both refused before any hashing, three arms (baseline build, variant build, variant build with zxcvbn); all six variant-Z rounds lie above all twelve S rounds. The 2 MiB bigger module costs a cold start nothing measurable (cold medians 26 and 25 ms). That misses the bar set before measuring (no more than one argon2 hash, about 45 ms p50) by about 15 ms at the median. A first call blocks its isolate, so concurrent requests start more isolates and each builds the dictionaries again. The local figures understated the platform by 2 to 8 times. One control did not behave as pre-registered: the first request of a same-connection sequence on the S arms cost 0 to 45 ms where 0 was expected, because the new connection sometimes reaches a fresh isolate. The sequences are therefore not used for the figure, and the note says why. A first pilot also showed that a redeploy leaks traffic to the previous version for seconds, so the run uses a new Worker per round. The 19 Workers and the KV namespace were deleted and checked. The D-023 row and the doc comment on password_is_strong carry the figure. D-023 is not changed: the rule stays as confirmed until the owner decides. Refs: #44 Co-authored-by: Claude Sonnet 5.5 <[email protected]>
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.
Summary
scripts/measure-argon2.sh(spike 0003 K4, run by hand against a deployed Worker) posted to the slice's sign-in, which goes when the slice does. It now posts to Plane'sPOST /auth/sign-in/, with the same seed body and the same?run=label. This is step 5a of moving off/api/_slice; it was the last caller outside the contract suite.What changes besides the path
A miss is a different thing on Plane's route. It looks the email up before it hashes and answers an unknown one with a 400, where the slice's route hashed anyway, so the script's assumption that a miss costs the same one hash no longer holds. Measured on the native server at m=19456 t=2, 20 sign-ins each:
So
scripts/measure-argon2-summary.pycounts CPU, wall and client time over the 200s only, and shows the CPU of the rest in ap50 misscolumn, which is a control (about a millisecond, not a hash). A request-1 miss prints-in thefirstcolumn instead ofnan.Docs: G-26 in
docs/src/testing/status.mdrecords the move and drops the "still has to move" clause.research/0012-auth-slice.md§4 gets an "Amended 2026-11-13" note: the recorded table was taken against the slice route and stands un-re-run.Verification
sh -nanddash -non the script.Not verified
CLOUDFLARE_ACCOUNT_IDand creates a KV namespace and two Workers on an account, so it was not run. The curl-config assembly was checked for syntax only; the one thing that changed in it is the URL path.Part of #58; this PR does not close it.
🤖 Generated with Claude Code