fix(captcha): report response token state - #512
Merged
esokullu merged 1 commit intoJul 26, 2026
Merged
Conversation
|
@alectimison-maker is attempting to deploy a commit to the esokullu's projects Team on Vercel. A member of the Team first needs to authorize it. |
This was referenced 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.
Summary
responseTokenPresentfor each detected CAPTCHA candidate after resolving its exact response fieldMotivation
Issue #505 notes that CAPTCHA verification currently infers solve state from dialog wording and disappearance even though the widget response field provides a language-neutral signal. This lands the issue's suggested Step 2 as a standalone detection primitive.
Design
The page-side detector reads
field.valueonly afterresponseFieldIdentityhas bound a candidate to its exact field. It immediately reduces that value to a boolean. Empty or unreadable values fail closed asfalse; the raw value is never placed on a candidate, summary, diagnostic, or trace-facing object.hCaptcha treats either its canonical
h-captcha-responsefield or its compatibilityg-recaptcha-responsefield as token-present. Duplicate observations preserve a positive boolean without changing candidate ranking.Chrome and Firefox keep byte-identical frame runtimes, now enforced by a regression assertion.
Testing
node test/run.js— 1,329 passed; 1 inherited baseline failure (package.jsonis 25.9.7 while the newest changelog entry is 25.9.0)npm run test:security— 60/60 passednpm run test:fixtures— 125/125 passednpm run test:webmcp— passed against Chrome 150npm run test:ci— passednode --check src/{chrome,firefox}/src/agent/captcha-frame-runtime.js— passedCompatibility and risks
This is an additive detection field. It does not change tool arguments, candidate ranking, token injection, paid solving, or the CAPTCHA gate state machine. A response token means the widget produced a token; it does not claim that the site accepted it.
Scope
This intentionally defers the remaining #505 work: classifying vendor challenge frames, consuming the boolean in gate transitions, and demoting English dialog regexes.
Refs #505