From a007996f6ad0dac818a4ce3a1c2ab259dda2a0d7 Mon Sep 17 00:00:00 2001 From: LGUG2Z Date: Wed, 28 Oct 2026 19:33:26 -0700 Subject: [PATCH] feat(e2e): no known-failure marker for a build that tracks a user's maximize maximizing.user is a known difference only on a komorebi without 3fa3d429 (track a window the user maximizes or restores); on a build that has it the step runs as any other. --- e2e/platforms/qemu_windows/run.py | 12 +++++++++++- .../qemu_windows/tests/test_runner.py | 18 ++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/e2e/platforms/qemu_windows/run.py b/e2e/platforms/qemu_windows/run.py index d2793938..1fd38d3e 100644 --- a/e2e/platforms/qemu_windows/run.py +++ b/e2e/platforms/qemu_windows/run.py @@ -79,6 +79,13 @@ KNOWN_STEPS = { } +# the commit of komorebi's `next` that fixed what a step is known to fail, so +# that a build that has it does not get the marker +KNOWN_STEPS_FIXED_BY = { + "maximizing.user": "3fa3d429", +} + + class GuestDied(RuntimeError): """QEMU exited while a scenario was running: not what kfw did.""" @@ -135,7 +142,10 @@ def _suite(checks: "RecordedChecks", *steps): for step in steps: began = time.monotonic() counted = checks.passed + checks.failed + len(checks.known) - checks.expected = KNOWN_STEPS.get(step.name) + fix = KNOWN_STEPS_FIXED_BY.get(step.name) + checks.expected = ( + None if fix and _contains(fix) else KNOWN_STEPS.get(step.name) + ) known_before = len(checks.known) try: results.extend(run_suite(checks, step)) diff --git a/e2e/platforms/qemu_windows/tests/test_runner.py b/e2e/platforms/qemu_windows/tests/test_runner.py index e9981698..588f4cbe 100644 --- a/e2e/platforms/qemu_windows/tests/test_runner.py +++ b/e2e/platforms/qemu_windows/tests/test_runner.py @@ -324,3 +324,21 @@ def test_the_wallpaper_is_asked_of_the_shell_for_a_display() -> None: assert agent.executed[-2][-2:] == ("get", "1") assert agent.executed[-1][-3:] == ("set", "1", "C:\\x y.png") + + +def test_a_known_step_has_no_marker_on_a_commit_that_has_its_fix( + monkeypatch: pytest.MonkeyPatch, +) -> None: + from komorebi_vm.core.suite import shared + + def user(checks: run.RecordedChecks) -> None: + checks.check("b", False) + + user.__module__ = "komorebi_vm.core.scenarios.maximizing" + monkeypatch.setattr(run, "_contains", lambda fix, repo=None: True) + checks = run.RecordedChecks() + + run._suite(checks, shared(user, checks)) + + assert checks.failed == 1 + assert checks.known == []