feat(browser): fail closed on oversized Agent Task observation - #128
Draft
seonghobae wants to merge 4 commits into
Draft
feat(browser): fail closed on oversized Agent Task observation#128seonghobae wants to merge 4 commits into
seonghobae wants to merge 4 commits into
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This was referenced Aug 12, 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.
Partial implementation of #28, stacked on unchanged exact PR #105 head
bc1d22d6c4848a173c55fdd18054574299488067.Buyer/security gap
The pinned-Chromium controlled Agent Task measured semantic-observation JSON bytes but previously rejected only the impossible zero-length case. Issue #28 requires oversized observation/text to be truncated or fail closed. Without an explicit ceiling at the executable browser-evidence boundary, later fixture or adapter growth could silently turn a currently small role/name snapshot into unbounded evidence.
Dependency
This Draft targets unchanged exact #105 head
bc1d22d6c4848a173c55fdd18054574299488067and must remain Draft while #105/#100 and their prerequisites remain active. PR #129 already depends on this exact head, so ancestry must be preserved. No prerequisite check, review, status, artifact, coverage, mergeability, or synthetic-merge result transfers.TDD and RCA sequence
71e78784332b2cbe34d3d704b6a03d0d69ff35c2required a finite semantic-observation byte ceiling, a canonical compact UTF-8 measurement helper, exact-limit acceptance, one-byte-over rejection, object/non-empty validation, and use of the helper on the real controlled Agent Task path. CI run31608771377, Rust contracts job94154427922, failed in the Python repository-contract suite because all three production-like runner boundaries were absent. The independent Rust production-coverage job succeeded because this Python runner test did not alter owned Rust production code; that result is not promoted as source GREEN. This is the valid RED.a18730b366fa34d906bbff953876765e0324e218added the finite runner bound and canonical measurement helper and routed the real browser path through it.58917b02f2fe9bc5dc16278a11ca54550d02d092added bounded semantic-locator text coverage while preserving the observation contract.24446c9cacd05bab370d8a636552514d656fcf42restores the bounded observation contract after that refinement and is exact-green.Implemented contract
The controlled Agent Task runner now:
MAX_AGENT_TASK_SEMANTIC_OBSERVATION_BYTES = 4_096as a product-safety budget for this compatibility evidence, not a protocol-validity limit;ensure_ascii=False, sorted keys, and compact separators;_measure_agent_task_semantic_observation_bytesinstead of an unbounded directlen(json.dumps(...))calculation; andThe evidence remains limited to reviewed browser-computed role/name fields for the controlled input and submit elements. It does not include raw HTML, hidden page text, unrestricted script output, credentials, or model-visible page content.
Exact-head proof
On unchanged exact head
24446c9cacd05bab370d8a636552514d656fcf42against unchanged exact prerequisitebc1d22d6c4848a173c55fdd18054574299488067:31621166317: success;94196082737: repository contracts, canonical formatting, locked workspace/all-target check, full tests, strict Clippy, and rustdoc success;94196082724: exact owned production function/line/region/branch enforcement success;31621166484: success;No predecessor-head or prerequisite evidence is promoted as current proof.
Remaining branch-local closure
The implementation and acceptance evidence are exact-green, but this branch's changed-file set does not contain a dedicated truthful Unreleased changelog entry. PR #129 already depends on exact head
24446c9...; moving #128 solely for release-note prose would invalidate descendant ancestry and exact evidence. That release-note debt must be reconciled through dependency-ordered stack alignment rather than silently treated as complete.Truth boundary
This lane bounds only the controlled semantic-observation evidence emitted by the pinned-browser compatibility runner. It does not define the final product-wide semantic snapshot budget, truncate arbitrary browser content, authenticate a browser adapter, authorize model context, expose raw HTML, add unrestricted JavaScript, or complete the end-to-end OriginWeave browser adapter. A later production adapter must apply its own reviewed structured-observation bounds at the real observation boundary.