Commit Graph
89 Commits
Author SHA1 Message Date
LGUG2Z 87fb8340d0 chore(repo): one workspace version, 0.2.0
Every package of the workspace now takes its version from [workspace.package]
(version.workspace = true) instead of its own number. The numbers before were
0.1.42 (Windows libraries and packages), 0.1.0 (KDE, the macOS version crate,
komorebi-shortcuts and the e2e guest crates) and 0.1.1 (macOS libraries); the
unified release is 0.2.0 for all of them.

Cargo.lock only changes the version of the workspace's own packages.

Not changed here: the version text in schema doc comments and the generated
schemas (next revision), and the shim packages, which are deleted later and
only pick up the number meanwhile.

Verified: cargo metadata --offline --locked succeeds.
2026-11-05 15:03:27 -08:00
LGUG2Z e1fc1499d4 test(e2e): the bar scenario lists processes with plain tasklist
The bar scenario counted komorebi-bar.exe processes through 'tasklist /fi "imagename eq komorebi-bar.exe" /fo csv /nh' run via the guest agent, which exits with status 1 there (quoting of the filter), so the process checks failed even though the bar was running and drawing (wgpu). 'tasklist /fo csv /nh' lists the process and the existing filter on lines starting with komorebi-bar.exe keeps the result the same. Found by the candidate 8 Windows gate (gate-cand8.md, bar-fix8.diff: with it the scenario ran 23/0). The file is also reflowed by ruff format (the CONFIG dict), which is formatting only. Verified: ruff format and ruff check on the file; the e2e run in the gate with the one-line change.
2026-11-05 15:03:27 -08:00
LGUG2Z e70a0e4921 style(windows): format with the project's rustfmt settings (tools/format-all --apply --tree windows)
Pure formatting by the same nightly rustfmt invocation the nix fmt check uses (tools/format-all, edition 2024, the tree's rustfmt.toml). No code change. Applied last on the candidate because it touches many files other agents were editing. Verified: tools/format-all --check --tree windows passes afterwards; light gates (fast-check) after all three.
2026-11-05 15:03:27 -08:00
LGUG2Z 0a315a61bc test(e2e): the bar scenario's window checks are real again when wgpu draws the bar
The bar now falls back to wgpu (Direct3D 12, WARP) when glow has no OpenGL
context, so in the OpenGL-less golden guest the bar can open a window and the
window, stays-alive, daemon-restart and notify checks run for real. They are
skipped only when BOTH renderers fail, and the skip names both errors
(`skip ...: guest cannot draw: glow: ...; wgpu: ...`, taken from the bar's
"Error: glow: ...; wgpu: ..." line); any other early exit still fails. The
scenario starts the bar with RUST_LOG=info,wgpu_hal=debug,wgpu_core=warn so
bar.out keeps what wgpu says about its adapters on the first run, and prints
which renderer drew the window ("the bar draws with wgpu").

Unit tests: both renderers failing (classify + the error line), a bar that fell
back and runs (the glow warning is not an "Error:"), plus the earlier ones.

Verified: runner and library tests 163 passed; ruff clean on the scenario and
its test. NOT run: needs the win-e2e `bar` gate.
2026-11-05 15:03:26 -08:00
LGUG2Z fa2d630701 test(e2e): the bar scenario says when the guest cannot draw, and the bar config is tested
The Windows gate showed that the bar cannot open a window in the golden
guest (no OpenGL 2.0: "egui_glow requires opengl 2.0+"). The scenario now
reads the bar's own output (`classify`): that exact failure turns the
window, stays-alive and daemon-restart checks into visible
`skipped: guest has no OpenGL 2.0` lines (counted in `result.json` and
printed as `skipped: N` by the runner); the schema equality, "the bar reads
its configuration" (real: the configuration is parsed before the window),
`komorebic state` and `stop --bar` stay checks; any other early exit of
the bar (a configuration error, a panic) is a failure with the bar's
output in the message, and a bar that opens its window gets the full walk as
before. Unit tests for `classify` run with the runner tests.

komorebi-bar-core gets tests/config.rs: windows-only widgets and the `mouse`
block are accepted on every platform, `supported()/unsupported()/enabled()`
name and skip what the platform cannot run (D-coord-1), a Command mouse
message is a plain string and the tagged form is rejected (the e2e finding),
the network widget accepts `default_interface_options` and the old key
names, layouts read from their names, `KomobarConfig::read` fills the frame
and refuses a non-json file. The warning text itself is not asserted (no
tracing subscriber in the core).

docs/dev/bar-e2e.md records the limitation and an analysis of getting
rendering into the guest (wgpu with the WARP adapter recommended; a mingw
Mesa is not offered by nixpkgs); nothing was added.

Verified: runner and library tests (161 passed), ruff clean on the scenario
(three older findings in other files are not mine), bar-core native tests 3
unit + 7 oracle + 6 config. Windows clippy and the macOS check: see the
report. The scenario itself was not run.
2026-11-05 15:03:26 -08:00
LGUG2Z fdd9f0891d test(e2e): the bar scenario's mouse command is a plain string
`MouseMessage::Command(String)` is an untagged variant, so
`"on_middle_click": {"Command": ...}` in the scenario's bar configuration
did not deserialize and the bar exited at start ("data did not match any
variant of untagged enum MouseMessage"). The value is the string itself.

Found by the Windows gate on candidate 5 (win-e2e, S/e2e-win/gate-cand5.md,
bar section; the fix is its bar-fix.diff). Verified: ruff clean; not run.
2026-11-05 15:03:26 -08:00
LGUG2Z 4e2c50e526 chore(repo): combine candidate 3b with the KDE handover scenario fix (candidate 3c)
Gate candidate 3c: wip-cand3b (cand3 + the bar e2e scenario) plus wip-u-kdefix (handover precondition in both copies of the shared e2e lib, KDE vm-commands bring_back step). The shared e2e/lib handover scenario is also what the Windows runner runs, so the Windows gate must include it.
2026-11-05 15:03:26 -08:00
LGUG2Z 61d6423fdd test(e2e): handover needs two tiled containers on the workspace, or says so
Scenario precondition fix; the check "the unmanaged window is inside the work area and not on a
tile of the layout" itself stays as strict as it was.

The KDE VM suite vm-commands failed it on a calm host, on the original komorebi-for-kde tip
(7d19fd40) and on the refactored stage alike, with the same numbers each time: work area
(0,0,1920,1080), layout a single tile (10,10,1900,1060), win3 at (10,10,1896,1050) (within the
24 px tolerance of that tile), win1/win2/win5 parked on workspace 3. After the sweep win3 was the
only window on its workspace. Unmanaging a lone window leaves it on the tile it was put on, and
an emptied workspace has nothing to calculate, so it keeps its last layout; "not on a tile" could
never hold. The scenario now checks first that the focused workspace has at least two tiled
containers and, if not, fails with a message that says so (and the describe() dump) instead of
the misleading unmanage failure. Windows runs handover as its own suite with its three tiled
clients on workspace 0, so the precondition holds there.

The same file lives in e2e/lib and in komorebi-for-kde/nix/tests/vm/lib; both are edited alike. A
fake-platform test covers the precondition; the existing handover cases still fail where they
should.

Native pytest of the VM lib: 320 passed; ruff check and format clean.
VM verification: not yet (vm-commands on baseline-with-fix and candidate, ~20 min each, after the
KDE VM run).
2026-11-05 15:03:24 -08:00
LGUG2Z f0a0d71b83 test(e2e): a Windows scenario bar for komorebi-bar
New extras scenario e2e/platforms/qemu_windows/extras/bar.py, registered in
run.py as `bar` (runs after the tiling windows, like the other Windows
extras). It starts komorebi-bar in the guest with a configuration that has
storage, time, applications, komorebi workspaces and layout widgets, the
Windows-only Keyboard and Systray widgets and a `mouse` block (a message and
a command), and checks: `komorebi-bar --schema` equals the checked-in
schema.bar.json byte for byte; the process starts and its window titled
komorebi-bar appears, visible and sized; it runs 15 s (scaled); `komorebic
state` answers and komorebi does not tile the bar; commands that notify the
bar work; the bar survives `komorebic stop` and the daemon starting again as
the same process (it reconnects: it does NOT exit when the daemon stops, so
the task text "exits cleanly when komorebi stops" is checked as
`komorebic stop --bar` ending daemon and bar); screenshots are kept as
artefacts, no pixel assertions. No known failures.

Plumbing: run.py uploads komorebi-bar.exe when the binaries directory has it
(other scenarios do not need it, so older build-ref directories still work),
the nix app copies it and sets KOMOREBI_E2E_BAR_SCHEMA to the checked-in
schema (the e2e directory alone does not contain it), build-ref.sh builds it.
README and docs/dev/bar-e2e.md document it.

Verified: py_compile and ruff clean; the runner and library unit tests: 157
passed; flake.nix parses. NOT run: the scenario itself (the Windows guest is
reserved for gates), so every check is untested against a real bar and may
need adjusting (window title, timings, the Systray widget inside the VM).
Needs gate: win-e2e `bar`.
2026-11-05 10:30:05 -08:00
LGUG2Z 1f1805f66e fix(e2e): drop the unsafe block nested inside the testwin unsafe block
e2e/guest/testwin/src/main.rs had an unsafe block inside an unsafe block, which clippy -D warnings rejects (unused_unsafe). Removes the inner one without changing behaviour. Verified: Windows clippy passes.
2026-10-31 01:37:53 -07:00
LGUG2Z ff3711dcb5 docs(e2e): document the Windows guest and what it found
README.md: building the image, running scenarios, the variables, the known
failures. W1.md: the measurements and findings behind them.
2026-10-30 18:59:32 -07:00
LGUG2Z 0aec364345 feat(e2e): no known failure of maximizing.user once kfw has the fix 2026-10-30 18:59:32 -07:00
LGUG2Z 7f6e530b35 feat(e2e): sync the neutral core from kfde 7d19fd40 2026-10-30 18:54:37 -07:00
LGUG2Z 503ccbc9c6 feat(e2e): add a probe of toggle-monocle under a user's maximize 2026-10-30 18:49:48 -07:00
LGUG2Z 8cf77519a2 fix(e2e): name toggle-monocle as what maximizing.user still fails 2026-10-30 18:45:15 -07:00
LGUG2Z a2ab755352 feat(e2e): sync the neutral core from kfde b3dc2ed9 2026-10-30 18:25:26 -07:00
LGUG2Z e5c1e2fa75 feat(e2e): run the cargo tests of the workspace in the Windows guest
The tests are cross-compiled for Windows, so they run there: cargo_tests.py
uploads each test executable, lists its tests and runs every one in a
process of its own, as nextest does. The nix check never ran them
(doCheck is false).
2026-10-30 18:22:45 -07:00
LGUG2Z 345ddf30ea feat(e2e): the known difference of maximizing.user after kfw tracks a user's maximize
On a komorebi with 3fa3d429 the step passes its tracking checks; what is
left is that toggle-float and stack left/right are not ignored while a
window is maximized. The marker says so for such a build.
2026-10-30 18:22:45 -07:00
LGUG2Z b1d053b358 perf(nix): build the test window with the constant stamp too
komorebi-testwin-e2e is the e2e build's test window, so a change to it
rebuilds the crate and not its dependencies (86 s instead of minutes);
build-ref.sh uses it.
2026-10-30 18:22:45 -07:00
LGUG2Z 0c21138e25 fix(e2e): make the test window gray, not blue
The pixel checks of the shared scenarios (the ring of a border by hue) take
the window's own color to be neutral. The default was (48, 80, 128), which
is cool by their measure, so a warm ring beside it read as mixed.
2026-10-30 18:22:45 -07:00
LGUG2Z 7e5f956415 feat(e2e): sync the neutral core from kfde 72631512 2026-10-30 18:22:45 -07:00
LGUG2Z f6d877b82d feat(e2e): sync the neutral core from kfde 1383d58a 2026-10-30 18:22:45 -07:00
LGUG2Z fe95747267 fix(e2e): a temp path may have folders in it and a space in a name
temp_path takes wallpapers/my pictures/cool.png, as the wallpaper scenario
asks for; a name that leaves the folder is still refused.
2026-10-30 18:22:45 -07:00
LGUG2Z a007996f6a 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.
2026-10-30 18:22:45 -07:00
LGUG2Z 9818a1b885 feat(e2e): add a probe of the wallpaper of the Windows guest 2026-10-30 18:22:45 -07:00
LGUG2Z 937430b70e feat(e2e): the wallpaper members and put_file on the Windows guest
put_file writes bytes to a path in the guest (a folder that has a space in
its name is made), wallpaper and set_wallpaper read and set the wallpaper
of a display through IDesktopWallpaper, with the COM calls in C# compiled by
Add-Type (wallpaper.ps1).
2026-10-30 18:22:45 -07:00
LGUG2Z 720306deca feat(e2e): run the columns and two_monitors steps of scrolling 2026-10-30 18:22:45 -07:00
LGUG2Z ead3d91e37 fix(e2e): vendor the fake wallpaper that the focus and moving tests import 2026-10-30 18:22:45 -07:00
LGUG2Z 19e2cd6112 fix(e2e): vendor the fake strip that the focus and moving tests import
kfde's sync-e2e-core does not list tests/fake_strip.py, which
test_focus_moving.py now imports, so it is copied by hand until it does.
2026-10-30 18:22:45 -07:00
LGUG2Z 6a05754308 feat(e2e): sync the neutral core from kfde 6fb6a66e 2026-10-30 18:22:45 -07:00
LGUG2Z c51f79acb5 feat(e2e): add a probe of a resize drag from the top row of a frame 2026-10-30 18:22:45 -07:00
LGUG2Z fb549f5685 feat(e2e): say where a resize border is pressed on the Windows guest
The left, right and bottom borders of a window reach outside its visible
frame (the invisible DWM border), so the press is 4 px outside; the top has
none and its border is inside the window, so the press is in its first
rows. Outside the top the press hit the desktop and no drag started.
2026-10-30 18:22:45 -07:00
LGUG2Z 271abc3e9c feat(e2e): record two known differences of kfw as known failures
maximizing.user (a user's maximize is not the maximized window) and
hotplug.user_move (only a drag relocates a window to another monitor).
Their failing checks are known failures with the reason; a step that has
no failing check says the marker can go.
2026-10-30 18:22:45 -07:00
LGUG2Z d1d08d59d2 feat(e2e): sync the neutral core from kfde 6190a4ad 2026-10-30 18:22:44 -07:00
LGUG2Z 6c615cd4a8 fix(e2e): wait for the exit line of a killed daemon before starting another
crash() killed the daemon but not the command that launched it, which wrote
its exit code into the output file after the next launch had started, so
that launch looked as if it had ended and was started again.
2026-10-30 18:22:44 -07:00
LGUG2Z fecb9d9173 feat(e2e): sync the neutral core from kfde 3830bb27 2026-10-30 18:22:44 -07:00
LGUG2Z d4d293fbd8 fix(e2e): run a scenario again when QEMU aborted under it
QEMU has died with SIGABRT while a second display was plugged in (a
hotplug repeat and monitors.at_cursor), which is not a result about kfw.
Its stderr is kept, a dead guest is named as such, and the scenario is
run once more on a fresh guest.
2026-10-30 18:22:44 -07:00
LGUG2Z ea449c2d80 feat(e2e): let the test window rename itself and go fullscreen
--rename-to T --after S gives the window another title S seconds after it
opens, as a program that sets its title late does. The message WM_APP + 2
takes it fullscreen, borderless over its monitor, and back.
2026-10-30 18:22:44 -07:00
LGUG2Z e22d82853c feat(e2e): run kfde's new scenarios on the Windows guest
monitors, layout_flip, title_rule, handover, queries, display_change and
fullscreen, with the extra functions their files have after run
(hotplug.user_move, resize.edge_cases, maximizing.user,
lifecycle_hidden.crash, monocle.focus_behaviour, monitors.at_cursor).
2026-10-30 18:22:44 -07:00
LGUG2Z 320b12b34c feat(e2e): the new Platform members on the Windows guest
spawn takes rename_to and after (the test window renames itself),
temp_path, crash (kills the daemon), fullscreen and user_maximize (the
user's own, by messages the window understands), with tests: a window
that is not there raises, a program name Windows rejects is rejected.
2026-10-30 18:22:44 -07:00
LGUG2Z 81b12ba0b9 feat(e2e): sync the neutral core from kfde c71c8fd0 2026-10-30 18:22:44 -07:00
LGUG2Z 09ce64e3e4 test(e2e): test the runner of the Windows guest without a guest
The fix-commit check of the known-failure markers, the scope in the result
file, the step wrapper, the state key and the state that is not JSON.
2026-10-30 18:22:44 -07:00
LGUG2Z 5ef1666053 perf(e2e): key the saved state on the QEMU command line, not guest.py
Any edit to guest.py made a new state (76 to 145 s). The state now follows
the command line of the guest that is saved, with the paths as
placeholders, so an edit to the rest of guest.py does not.
2026-10-30 18:22:44 -07:00
LGUG2Z e440a73666 fix(e2e): a state that is not JSON is an error a wait goes past
komorebic state can print something else while the daemon is busy or in
the middle of a monitor change. The runner crashed on it (a hotplug run
did); now it is a RuntimeError with what was printed, which waits retry.
2026-10-30 18:22:44 -07:00
LGUG2Z 4cef0ce510 feat(e2e): sync the neutral core from kfde 6748528b 2026-10-30 18:22:44 -07:00
LGUG2Z da966bfc78 feat(e2e): drop a known-failure marker once the commit under test has the fix
The runner reads the commit from the binaries' commit file and asks git
whether it contains the fix of the bug a marker is for, so the same runner
tests a branch with the bug and one without it.
2026-10-30 18:22:44 -07:00
LGUG2Z a3468e870c feat(e2e): say which display of the Windows guest can change mode 2026-10-30 18:22:44 -07:00
LGUG2Z f0f369f606 feat(e2e): add probes of display modes and of changing one 2026-10-30 18:22:44 -07:00
LGUG2Z 9c5b71a8c3 feat(e2e): add the display_change extra for the Windows guest
With two windows on the second display, its mode is changed to two others
and back: the daemon's monitor follows, the windows stay inside the work
area and apart, and return to where they were. A draft for a shared
scenario.
2026-10-30 18:22:44 -07:00
LGUG2Z be9e6eb36f feat(e2e): change the mode of a display on the Windows guest
display.ps1 lists the display devices and changes the mode of one (the
logic is in C# because PowerShell cannot pass the structs by reference),
and WindowsPlatform.resize_display uses it. Only the QXL display lists
modes; the first one is the basic adapter, which has one.
2026-10-30 18:22:44 -07:00