UFO
UFO copied to clipboard
fix: avoid host-only eval crash when app_agent_log is empty
Summary
- guard host-only evaluation paths so
app_agent_log=[]no longer crashesuser_content_construction_head_tail() - keep the existing initial-screenshot behavior when an AppAgent step is present
- add focused regression coverage for empty and non-empty AppAgent logs
Why
Fixes #304. Host-only tasks can complete without any AppAgent steps, so indexing trajectory.app_agent_log[0] is unsafe and can terminate evaluation with IndexError.
Validation
python -m pytest -q tests\\unit\\test_eva_prompter_host_only.py
Risk Notes
- small evaluation-path change only
- no automation-flow refactor
- no policy or security-surface change
@microsoft-github-policy-service agree
I've been a Windows Insider since January 30, 2015, and a long-time Windows feedback participant.