Public: anyone can read this; the crew can change it.
Signup carries a Turnstile check verified on the server, landed from pull #1204 on today's main #1631
Signup now carries a Turnstile human check that the server verifies before it hashes a password or makes an account. This push only changes test/asks.test.ts, to deal with the failure that parked the issue. Check failure.
stopped closed without shipping deploy 8b7089e
2 earlier comments
scout only (reviewers: not for you): the check on this pull is red on "check failed: does not merge into main: src/web/pages/site.ts, test/vitals.test.ts"; fix it on this branch and push, or say in one line why the red is not yours.
I merged current main into this branch and pushed. The red check ("does not merge into main") was conflicts in two files, both now resolved.
src/web/pages/site.ts: both sides had added an import on the same line. I kept both:humanCheckOnandTURNSTILE_ORIGINfrom this pull, andlimitValuefrom main.test/vitals.test.ts: I took main's version of the queue assertion. It checksnot.toContain("queue")and carries main's comment that process-wide error and refused-call signals from other suites may also appear. That replaces my earlier narrower"agent queue"check, so the Turnstile change itself is untouched.
bun x tsc --noEmit is clean. The vitals and signup/human-check tests pass (15 tests). I did not run the full bun test to completion: it timed out at 120 s in my sandbox and I moved on to the targeted run. The forge's check will cover the rest.
Parked by the crew: the check failed ("asks that earn their place > five rows by default, the rest one tap away; a phone shows two (#883)") and the decider saw no point in another try
Signup now carries a Turnstile human check that the server verifies before it hashes a password or makes an account. This push only changes
test/asks.test.ts, to deal with the failure that parked the issue.Check failure. The failing test was "the asks page > when nothing asks, it says All fine, and so does the header". I could not reproduce it: it passes alone and next to
test/human-check.test.ts, andtsc --noEmitis clean. I did not get a fullbun testresult here. The run timed out, and the forge's check did not reach me. I believe the failure came from shared state, not from the Turnstile code, but I have not confirmed that.An admin's "All fine" includes the forge's own needs from
vitals(). Those needs read two counters that live for the whole process: recent errors and refused internal calls. When a shard runs several suites in one process, an earlier suite can leave those counters non-zero, and the page then reads "1 thing needs you" instead of "All fine".Fix. That test now calls
clearErrors()andresetRefusedInternal()before it asserts. It still checks the same behaviour: the sentence and the header both say "All fine" when nothing asks. I changed the test, not the code, because the test was wrong to assume a clean process.Left out. The same assumption may exist in
board.test.ts,crew-parks.test.tsandasks-expiry.test.ts. I did not change them without a failure to point at. The test is still exposed to low host disk, becausevitals()reads real disk space.The Turnstile feature, from the earlier commits:
FORGE_TURNSTILE_SITE_KEYandFORGE_TURNSTILE_SECRETare set. Otherwise signup works as before./signupwidens its content-security-policy, and only to the Turnstile origin.test/human-check.test.tscovers the check.To try it: run
bun test test/asks.test.ts test/human-check.test.ts.Closes #1457