diff --git a/docs/plans/fast-browser-performance.md b/docs/plans/fast-browser-performance.md index 00f18a8..1a8f360 100644 --- a/docs/plans/fast-browser-performance.md +++ b/docs/plans/fast-browser-performance.md @@ -3,8 +3,8 @@ ## Status - Status: active -- Current phase: diagnosing integrated benchmark failure; live runtime gate passed but 20-pair workflow verification exposed a popup-close race and mixed total timings. -- Next safe action: add safe per-operation timing to the existing benchmark and diagnose close/readiness semantics before retaining a performance claim. +- Current phase: correcting verified close/readiness bottlenecks after deterministic reproduction. +- Next safe action: bounded read-only close verification and shorter readiness polling, followed by original live benchmark and full verification. ## Request and scope @@ -122,4 +122,7 @@ After safe integration, make one record-only closure commit, prove reachability, - Additional bounded assignments: browser-hotpath read-only diagnosis (8 minutes), performance-benchmark safe per-operation timing in its existing four paths (15 minutes). Before state acd57ae, product paths clean; only parent performance doc untracked. No scope/API/security expansion: this is required existing benchmark verification. - Browser diagnosis confirmed one-shot close verification races asynchronous Target.closeTarget completion; removing the duplicate inventory makes the pre-existing race more visible. Proposed correction repeats only inventory reads within the existing action-verification budget, never the close mutation. This restores intended verified-close behavior without API/security changes. - Browser-hotpath test-first assignment: 8 minutes, only its existing Python test path, at f2e42f5 with benchmark-owned TS files dirty; product Python remains stable during diagnostic measurement. Add deterministic delayed-disappearance and permanent-presence close cases, prove the first fails before the fix, then return. Before patch `/tmp/pi-present/performance-before-close-tests.patch`. -- Next safe action: complete diagnostic measurement, apply the bounded close verification fix through the same owner, then rerun the original paired command. Preserve every failed result. +- Timing probe committed 12a6bb6; parent reran 7 benchmark tests and full typecheck. Diagnostic `/tmp/fast-browser-performance-4-pairs-diagnostic-20260921.json` passed all attempts and confirms navigate ~335ms versus observe ~223 to ~88ms. Action times ~110ms remain similar. No provider latency is measured. +- Parent reproduced close tests RED: 4 focused tests, 1 expected failure and 1 expected error for delayed/permanent target presence, 2 passed for inventory/cancellation handling. Test patch `/tmp/pi-present/performance-close-red.patch`. +- Browser-hotpath correction assignment: 15 minutes, same Python worker/test paths; before HEAD 12a6bb6, only owned red tests dirty plus parent doc. Implement single-dispatch close followed by bounded inventory reads under existing ACTION_TIMEOUT_SECONDS. Replace pinned helper's 300ms readiness sleep with <=25ms bounded monotonic polling for the exact same document.readyState == complete predicate and existing timeout, retaining error propagation. Add readiness regression tests before the fix. This changes private polling cadence, not API, security posture, postconditions or budgets. Before patch `/tmp/pi-present/performance-close-red.patch`. +- Next safe action: inspect corrected worker delivery, run final stable paired benchmark and full verification. Preserve every failed result.