focus-core: a window whose focus waits for another tab is unsettled in the Rust world check (P0 INVERSE-KEY rule; A12 step A, R-INPUT S2)
The A12 move (#31835, which R-INPUT now carries as stage S2) deletes the Swift world check InputInvariants+World.swift, so the app's world check becomes cmux-focus-core's invariants::world. P0 INVERSE-KEY (5fe33a327ef, #32769) added one rule to the Swift copy only: a window whose focus is on its way to another tab (a creation's new tab that no topology shows yet) is unsettled, because the page the person left gives up the keys meanwhile. Without this rule in Rust, the live input monitor would file a W1 desync for every Ctrl-T or Ctrl-` typed from a Chromium page once the Swift copy is gone.
invariants::Model::awaits_other_tabis the app'sFocusState.awaitsOtherTab: the expectation names a tab the focus does not resolve to, or names a surface.invariants::is_settledreturns false for such a window, so its content checks are skipped, as the Swift world check skips them since 5fe33a327ef.
This is step A of the FFI two-step rule (STATUS 5388). cmux-focus-core is an app FFI input: this Rust half lands alone, the bot publishes the FFI release and re-pins, and the Swift half (the A12 step B PR) lands after the re-pin, so the app never runs without the rule. The app's behavior does not change before the re-pin.
Tests (cmux-tui/crates/cmux-focus-core/tests/focus_rules/ported/input_invariants.rs):
ported::input_invariants::a_window_whose_focus_waits_for_another_tab_is_unsettled: the Chromium page has given up its keys while the focus waits for the new terminal tab; the window is unsettled and no W1 is filed. With no wait, the same window is settled and W1 is checked.ported::input_invariants::a_wait_for_the_focused_tab_is_settled: an expectation for the tab the focus already shows is no wait.
Red/green, the same command: scripts/ci/cmux-tui-rust-check.sh --os linux --arg all --arg ported:: (fmt, clippy -D warnings on all targets, the ported:: tests):
- Green 71509154412d, step 5a79450ad2d04812cd34cd68: 57 of 57
ported::tests passed, both new tests included. fmt failed, only on a base red in a file this PR does not touch: the order ofmod held_asks;inacpmux/src/hub/mod.rs(rustfmt moves it from line 72 to line 79). The base autofix fef89d16a05 on feat fixes it. This PR's files have no fmt diff. (Correction: an earlier version of this body said that fmt passed. The reviewer found the error.) Clippy failed only on two base reds in crates this PR does not touch (cmux-wg-tunutun.rs:32,acpmuxrepo_sync_tests.rs:11). #34733 fixes them. - Red 562a7d3a2e88 (the tests, with feat's rule): step 4adb5ee4b28317c34b0a0833. 57 tests run, 1 failed:
ported::input_invariants::a_window_whose_focus_waits_for_another_tab_is_unsettled, on its assertion (unsettled: left[], right["w1"]), and again when rerun alone.a_wait_for_the_focused_tab_is_settledpassed, as it does on both sides: it guards against a fix that is too broad. fmt and clippy failed on the same base reds as the green. - Two earlier red runs (steps 632013966ea9 and 4efb46015106,
--arg test --arg ported::input_invariants::) died on the runner, not in the tests. The job annotation of both: "No space left on device" (hq runs 41762208218 and 41766474373). Their logs are gone. This is reported to FLEET PANIC STEP in STATUS 10810.
Observed / Not run
- Observed: the fleet steps above.
- Not run: anything in the app (Rust only, step A of the two-step rule). The FFI crate's own test of
focus_input_worldsends a window with no expectation, so this change does not affect it.
Changelog
none
No capture: Rust-only library code; the app's behavior does not change before the re-pin.