test(browser): add controlled Agent Task fixture - #65
Conversation
📝 WalkthroughWalkthrough결정적 Agent Task HTML fixture를 추가했습니다. fixture는 입력 제출 결과와 ChangesAgent Task fixture
Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@tests/test_agent_task_fixture_contract.py`:
- Around line 37-41: Update the HTML attribute parsing used by the
hidden-injection contract to retain the complete parsed attributes for each
input element. Increment hidden_injection_markers only when an untrusted marker
also has a hidden attribute, and validate credential inputs from parsed
attribute values rather than raw quoted text: reject type=password and
autocomplete values password or one-time-code regardless of quote style.
- Around line 62-64: HTML 문자열 검사만 수행하는
tests/test_agent_task_fixture_contract.py에 실제 브라우저 제출 검증을 추가하십시오.
scripts/ci/run_mv3_compatibility.py의 기존 Chrome WebDriver 경로에서
agent_task_basic/index.html을 로드하고 task-text를 변경해 제출한 뒤, 제출 전후 URL이 동일하고
task-result의 data-state가 submitted이며 textContent가 변경한 입력값과 정확히 일치하는지 검사하십시오.
.github/workflows/mv3-compatibility.yml의 실행 경로에 해당 fixture와 테스트 변경을 포함하십시오.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 60e1549b-6ea0-49e9-b88e-5e7de0c066c0
📒 Files selected for processing (2)
tests/fixtures/agent_task_basic/index.htmltests/test_agent_task_fixture_contract.py
|
Fresh review-thread revalidation: the remaining CodeRabbit finding asks this fixture-only root to add real pinned-browser submit execution. That requirement is valid for the complete #28 vertical slice, but it is no longer a defect in #65's bounded claim. Exact current #65 head |
Partial implementation of #28.
Buyer-visible gap
The first real Chromium Agent Task slice needs a deterministic local web application whose semantic form, hostile hidden page content, and observable post-condition are stable enough to exercise observation → policy → typed action → verification without production credentials or a live third-party site.
TDD evidence
This lane is based directly on protected main
67af7c87589edc2039545af335c95064d9b8391c.d2580305f05aba93d10b5342ec1886d601c6752eintroduced the contract fortests/fixtures/agent_task_basic/index.htmlbefore the fixture existed.31445088008, Rust contracts job93637443229, checked out that exact head and failed in Python repository contracts with exactly threeFileNotFoundErrorfailures for the absent fixture. Repository checkout evidence confirms the tested revision. This is the intended fail-first boundary, not a predecessor failure reused as success evidence.0888fe3a6ef6da547a37fd075733cc73dc52b2abadded the controlled fixture required by that contract.cd4115e1b7e06717c3fdd8464da191fa3ca0cc60: fixture tests now parse input attributes independent of quote style, reject password/one-time-code autocomplete semantics, and require the actualhiddenattribute in addition toaria-hidden=truefor the hostile-content marker.Implemented boundary
The fixture now provides:
task-text) and submit control that can later be discovered by role/name rather than CSS/XPath authority;data-state="idle"todata-state="submitted"while exposing only the typed synthetic value as the result;Exact-head verification
On unchanged exact head
cd4115e1b7e06717c3fdd8464da191fa3ca0cc60against unchanged protected main67af7c87589edc2039545af335c95064d9b8391c:31503080956: success;93817759541: repository Python contracts, canonical formatting, locked workspace/all-target check, full tests, strict Clippy, and rustdoc all success;93817759257: exact owned production function/line/region/branch enforcement success;31503080894: success;31503080841: success;No predecessor-head check, review, or stacked-branch execution evidence is transferred to this exact head.
Scope boundary
This fixture is controlled test infrastructure, not a browser adapter or action-success claim. It does not implement WebDriver BiDi/CDP, semantic extraction from Chromium, deterministic policy dispatch, native browser input, trusted clock provenance, secret handling, destination authority, post-condition evidence, profile teardown, process attribution, or the complete issue #28 vertical slice. Stacked PR #70 executes this fixture through pinned stock Chromium; its evidence remains active-PR evidence and is not treated as shipped truth for this branch.