idle_cpu: ready = a visible window and its first frame, not Home selected

Merged
LA
2d ago
+44-8

Summary

The first real run of the idle CPU measure (#35214, job 857451d6 on cmux22) never reached its idle period. It gave cannot-run: "Home did not render within 180s (visible windows 1, Home tab not selected, first_window_frame_committed seen)". A fresh launch of feat opens a New Tab tab with Home in the sidebar, so the fresh-home smoke's Home-tab check never holds. The idle measure needs a launched app with a visible window, its first frame and its daemons up. It does not need Home selected.

  • scripts/ci/fresh_home_launch_smoke.py: a READY hook beside AFTER_RENDER and PREPARE_HOME. It replaces only the Home-tab check; the first_window_frame_committed mark still counts. The nightly smoke sets no hook and keeps its Home check unchanged.
  • scripts/cmux-next/idle_cpu.py: sets READY to "a visible window". The 180 s wait is not changed. The daemons are still required: with no acpmux or cmux-tui daemon the verdict stays cannot-run.

The lead also noted that the run launched chrome-parity-feat-8dea72b7d62f-v1, not 437f5a22. These are the same build: job 437f5a22's tag is chrome-parity-feat-8dea72b7d62f-v1 (cmux-ci status 437f5a22731b90a3ca043222).

Testing

python3 -m unittest tests.test_fresh_home_launch_smoke (pure Python; the stub app is a Python script):

  • Red on the base (commit 25cd664a5dd, base smoke script): test_a_caller_ready_check_replaces_only_the_home_check fails with "Home did not render within 10s (visible windows 1, Home tab not selected, first_window_frame_committed seen)", the same message as on cmux22.
  • Green on the head: 14 tests OK. The new test also checks that the default smoke still fails the New Tab state and that a visible window with no first frame is still not ready.

Observed / Not run

  • Observed: the two unit runs above, on the orchestrator VM.
  • Not run: the fleet measure itself. It runs again through the mini scheduler after this lands (fresh home, and a home with history, 60 min).

Changelog

none

Proof

No capture: test and fleet-measure tooling, no UI.


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.


Summary by cubic

Fixes the idle_cpu measure never reaching its idle period: it required Home to be selected, but a fresh launch of feat opens a New Tab tab instead.

Bug Fixes

  • Adds a READY hook to fresh_home_launch_smoke.py that replaces only the Home-tab check; the first_window_frame_committed mark and the nightly smoke's Home check are unchanged.
  • idle_cpu.py now marks the app ready when any window is visible and its first frame is committed; the 180 s wait and daemon requirements stay.