Validate scroll deltas and live-screen input on the Bot computer - #488
Merged
davidmckayv merged 2 commits intoSep 11, 2026
Merged
Conversation
Ayush7614
requested review from
MikeRyanDev,
davidmckayv,
guidovizoso,
mxmzb and
tylerslaton
as code owners
September 11, 2026 09:58
# Conflicts: # CHANGELOG.md
davidmckayv
approved these changes
Sep 11, 2026
davidmckayv
left a comment
Contributor
There was a problem hiding this comment.
Deep-reviewed clean (validation, no secret leak, fail-closed, agrees with existing layers). CI green.
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.
What this changes
Two related holes on the Bot computer, both the same bug class already fixed for navigate URLs and exec timeouts (400 naming the field, not a 502 reading as a broken computer):
/scroll,/human/scroll(and the internal fallbacks) accepted anytypeof === number.Infinity(valid JSON:1e999) travelled intomouse.wheeland came back as a 502. NewparseScrollDelta(mirroringparseExecTimeout) requires a finite number; absent still means the endpoint default (600 Bot / 400 human). Edge returns 400 with the same message the server gateway uses; the performers also refuse defensively.Input.insertText({ text: undefined }), or forwarded wrong-typedx/y/key/codeinto CDP. NewparseInputMessagediscriminates mouse/wheel/key/text, requires events, finite coordinates/deltas, and non-empty key/code/text; malformed frames get an error reply and never reach CDP.Where it runs
The computer process holding one Bot browser. No shared state: each computer validates its own requests.
Postgres is already there and is the default answer to all of the above: nothing here needs it.
Boundary and audit
Changelog
CHANGELOG.mdunderUnreleased: scroll/input validation entry.Proof
bun test agent-computer/tests/request-validation.test.ts: 44 pass (scroll absent/finite/infinite/string/null/boolean/object; mouse/wheel/key/text well-formed and malformed cases).bun run format:check: clean.bun run lint: clean.embla-carousel-reactfailure identical on clean upstream main.