Skip to content

test(browser): constrain semantic observation evidence schema - #129

Open
seonghobae wants to merge 6 commits into
test/agent-task-observation-boundfrom
test/agent-task-semantic-observation-schema
Open

test(browser): constrain semantic observation evidence schema#129
seonghobae wants to merge 6 commits into
test/agent-task-observation-boundfrom
test/agent-task-semantic-observation-schema

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Partial implementation of #28, stacked on exact current PR #128 head f60771f7afb23ea4bf63f15d8c6a0d5b507cda5b.

Buyer/security gap

PR #128 bounds the controlled Agent Task semantic-observation bytes, but byte size alone does not constrain evidence meaning. A later runner change could add unreviewed raw page text, hidden prompt-injection content, or arbitrary instruction-like fields while remaining under 4,096 bytes. The controlled compatibility lane therefore needs an exact reviewed evidence-schema contract at the executable construction site without pretending that the generic byte-measurement helper is a semantic validator.

Dependency

This Draft now targets exact current #128 head f60771f7afb23ea4bf63f15d8c6a0d5b507cda5b. GitHub reports the current #129 head as 97b17e79acfce2a0281004a25a6a6093208c6b68 and the current live base SHA exactly matches #128. Descendant ancestry must be re-evaluated independently whenever this head moves; no prerequisite check, review, status, artifact, coverage, mergeability, or synthetic-merge result transfers.

TDD and RCA sequence

  1. Exact test-only head 5791b650ccd7f1f9c40ea49ed565fc051d9f018d initially required the generic _measure_agent_task_semantic_observation_bytes helper to reject extra or malformed fields. CI run 31625916343, Rust contracts job 94212118955, failed in Python repository contracts as expected.
  2. RCA rejected that remedy at the wrong abstraction layer. The helper's contract is canonical byte measurement for an arbitrary non-empty object; hard-coding the controlled fixture schema there would conflate size enforcement with evidence semantics and break feat(browser): fail closed on oversized Agent Task observation #128's reusable exact-limit contract.
  3. Head 46efc3d530494b41f84c25ae50bc8fd1e623e027 moved the fail-closed contract to the actual executable semantic_observation construction. The AST-level repository test requires one exact construction and one exact bounded-helper call.
  4. Later commits preserved the intended schema contract while the stack was realigned to the current feat(browser): fail closed on oversized Agent Task observation #128 prerequisite. Historical heads and their checks remain regression lineage only.

Implemented contract

The repository contract parses the controlled runner AST and requires:

  • exactly one semantic_observation assignment in the executable Agent Task path;
  • exactly two top-level fields: input and submit;
  • exactly two fields inside each object: role and name;
  • values sourced only from the previously browser-computed and exact-checked input_role, input_name, submit_role, and submit_name variables;
  • exactly one _measure_agent_task_semantic_observation_bytes(semantic_observation) call;
  • no alternate positional or keyword object supplied to the measurement helper; and
  • no silent raw page text, hidden content, generic instruction field, arbitrary metadata, or parallel unbounded construction in this controlled evidence path.

The byte helper remains separately responsible only for canonical compact UTF-8 serialization and the finite 4,096-byte ceiling.

Exact-current proof

On unchanged exact head 97b17e79acfce2a0281004a25a6a6093208c6b68 against exact prerequisite f60771f7afb23ea4bf63f15d8c6a0d5b507cda5b:

  • GitHub reports the Draft open and mergeable against its current prerequisite;
  • CI run 31942573962: success;
  • Rust contracts job 95153763034: repository contracts, canonical formatting, locked workspace/all-target check, full tests, strict Clippy, and rustdoc success;
  • Production coverage job 95153763107: exact owned-production function/line/region/branch measurement and enforcement success;
  • current formal reviews returned by fresh refetch: none; and
  • current inline review threads returned by fresh refetch: none.

No current-head SAST, Security Scan, Manifest V3, CodeRabbit, or independent approval is claimed unless separately returned for this exact head. No predecessor-head, prerequisite, skipped, cancelled, queued, absent, stale-body, synthetic-merge, status-only, or model-only evidence is promoted as current proof.

Truth boundary

This lane hardens only the controlled pinned-browser compatibility evidence shape. It does not define the final product-wide semantic observation schema, authenticate browser semantics, make accessible names trusted instructions, authorize model context, expose raw HTML, grant capabilities, inspect all browser channels, or complete the end-to-end browser adapter. A trusted production adapter still needs versioned structured-observation contracts and immediate authority checks at its real browser boundary.

Passing automation is not independent approval. This scheduled actor does not merge, self-approve, alter workflows, add secrets, weaken checks, tag, or publish.


Open in Devin Review

@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 4462433d-461b-47de-99ab-9629f334a349

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@seonghobae
seonghobae marked this pull request as ready for review August 26, 2026 22:07

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant