Skip to content

perf(agent): prune ARIA observations incrementally#55

Open
dexhunter wants to merge 1 commit into
microsoft:mainfrom
dexhunter:weco/aria-prune-incremental
Open

perf(agent): prune ARIA observations incrementally#55
dexhunter wants to merge 1 commit into
microsoft:mainfrom
dexhunter:weco/aria-prune-incremental

Conversation

@dexhunter

@dexhunter dexhunter commented Jul 9, 2026

Copy link
Copy Markdown

Summary

  • Track observation messages already scanned so old ARIA pruning only visits newly appended transcript entries.
  • Reset the incremental pruning state after history compaction and when starting a new run.
  • Add unit coverage for ARIA pruning and compaction reset behavior.
  • Remove stale unused imports flagged by ruff.

Benchmark

Deterministic micro-benchmark for DefaultAgent._prune_old_observation_aria_snapshots, simulating 50 browser observations with ~20 KB ARIA payloads:

version prune_aria_ms
baseline 174.4 ms
this PR 120.5 ms

That 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 -q
  • uvx ruff check src/webwright/agents/default.py tests/unit/test_default_agent_aria_pruning.py
  • git diff --check

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.
@dexhunter

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree company="Weco AI"

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