Repository navigation
fix(flow): keep the strict UIA census inside the client timeout; fix the approval e2e - #2787
Conversation
…t census already ruled out (cherry picked from commit dc26908)
…t bound The "long" phase relaunches Patient Notes in a new window, so recording the same step id again made record_verified_window refuse it as seen in two windows. Each phase now records its own step. The fixture's first answer waits for a cold Windows PowerShell WinForms start, which can exceed 15 s on a hosted runner.
Independent adversarial review: REQUEST CHANGESFrom: Grok The Blocking1.
|
…projection request Grok on #2787: with per-phase step ids the long phase held two captured windows, so approval_form_fields refused for window ambiguity before reaching the agent, and the evidence kept the short phase's stale response. Each phase now clears the captures (clear_verified_windows, the documented between-runs reset), records one step, asserts it sent its own /window/form-fields request, and the long phase asserts the agent's own refusal. The census comment now says it changes no match set.
Independent adversarial review: APPROVEFrom: Grok The blocker from my review of Prior blocker: fixed1. The long phase's approval assertions passed without the provider-prefix refusal.
Census comment ( Optional (not blocking)
Generality gate
Tests at this head (box, Linux, py3.12, the locked install)
Not run
CI at this headWhen I posted (00:02 EST), 25 checks had passed and 19 were skipped by path filter. None had failed. All four I didn't push to this branch, and I won't merge it. |
Problem
Desktop replay (
windows replay (Patient Notes, WindowsBackend)) has failed on every run since #2291 merged on 25 Nov; it last passed at 10:41 that day. #2291 merged with this job failing at its own head. The nightly onmainfails it too (#2698).I ran a diagnostic branch that dumped the agent's thread stacks every 25 s. Consecutive dumps showed different stacks, so the agent was slow, not deadlocked. #2291's strict census reads every control's AutomationId, Name and type through the sensitivity guard. It then called
_candidate, which reads the same facts again, plus bounds and the window-name ancestry, all guarded, for every control, including ones the first read had already ruled out. On a hosted runner, a lookup in Patient Notes ran past the client's 30 s request timeout, and later requests queued behind it.Fix
_find_candidates: in a strict walk, a control whose guarded facts already rule it out gets no second_candidateread.possibleand_candidate's match compare the same AutomationId, Name and role, so no match and no uniqueness verdict changes, and the guard still runs on every control's first read. With this change, the keyboard-lease e2e finished in 78 s instead of hitting its 300 s timeout.test_windows_approval_completeness.py:record_verified_windowrefuse it, as designed, so each phase now recordsprobe-{name}.Verification
test_win_agent_server.py,test_structural_value_completeness.pyandtest_native_focus_keyboard.py: 248 passed locally against this branch.Still open
In that same run,
test_native_keyboard_leasefailed differently. One input request gotRemoteDisconnectedwith no exception in the agent log. The backend then treated delivery as uncertain, and the next structural read was unavailable. That needs its own investigation and isn't fixed here. This PR's own Desktop replay run will show whether it recurs.