perf(agent): prune ARIA observations incrementally#55
Open
dexhunter wants to merge 1 commit into
Open
Conversation
Track observation messages already scanned so pruning old ARIA payloads does not rescan the full transcript after every appended message. Reset the incremental state on compaction and run reset. Corrected eval on this branch: prune_aria_ms 174.4 ms to 120.5 ms with behavior hash preserved.
Author
|
@microsoft-github-policy-service agree company="Weco AI" |
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
ruff.Benchmark
Deterministic micro-benchmark for
DefaultAgent._prune_old_observation_aria_snapshots, simulating 50 browser observations with ~20 KB ARIA payloads:prune_aria_msThat is a 30.9% reduction, with the behavior hash preserved:
37a80de01c7fdb4543e7ac82a1ad9e60a6b9d92965a2e14596edc2b81f4d17b4.Supplementary autoresearch: public dashboard.
Validation
uvx ruff check --fix .PYTHONPATH="$WT/src" uv run --with pytest pytest tests/unit/test_default_agent_aria_pruning.py tests/unit/test_tool_model_routing.py tests/unit/test_doctor.py -quvx ruff check src/webwright/agents/default.py tests/unit/test_default_agent_aria_pruning.pygit diff --check