From ab63b0c34012f15fea90c1c5ceb500dcaa77bbf0 Mon Sep 17 00:00:00 2001 From: LGUG2Z Date: Fri, 30 Oct 2026 10:26:30 -0700 Subject: [PATCH] docs(repo): the faster loop, the ledger of the KDE-only suites, the kfw padding --- docs/dev/BEHAVIOUR.md | 7 +++++-- docs/dev/suite-ledger.md | 38 ++++++++++++++++++++++++++++++++++++++ docs/dev/vm-tests.md | 22 ++++++++++++++++++++++ 3 files changed, 65 insertions(+), 2 deletions(-) diff --git a/docs/dev/BEHAVIOUR.md b/docs/dev/BEHAVIOUR.md index 645162ea..451da873 100644 --- a/docs/dev/BEHAVIOUR.md +++ b/docs/dev/BEHAVIOUR.md @@ -143,8 +143,11 @@ or down, none overlapped, and every window stayed inside the work area. **The padding the state says is not the padding the frames show.** On kfde the state says a workspace padding of 0 and a container padding of 0, while the windows sit 10 px in from the work area; on kfw the state says 10 and 10, and the frames of three tiled windows sit 27 px in, 7 -more than the 20 the state predicts, on every edge. Neither offset is explained. `padding` is -not affected: it measures from the padding it sets itself. +more than the 20 the state predicts, on every edge. The kfw 7 px is explained by the kfw session: +it is the room for the borders (a border width of 8 and an offset of -1), taken off the layout when +borders are on, so windows sit padding + container padding + 7 px from each edge and twice +(container padding + 7) apart; a Windows extra checks it. The kfde offset is not explained. +`padding` is not affected: it measures from the padding it sets itself. ## What the scenarios had to allow for diff --git a/docs/dev/suite-ledger.md b/docs/dev/suite-ledger.md index f1b9dea9..c55ecc3b 100644 --- a/docs/dev/suite-ledger.md +++ b/docs/dev/suite-ledger.md @@ -175,3 +175,41 @@ read, which is the stage hook that was left out. Sections 10 and 11 (a crash, a Ported whole as the extra `kwin_restart.run` (two restarts, 19 checks as run). `core-e2e` had a section that restarted KWin once with the same four checks; it is gone, and `core-e2e` now only opens the window `afterwards` that its last section looks for. + +## The KDE-only suites + +Moved as they were into `komorebi_vm.platforms.kde.extras`, one module per suite (`kwin`, +`kwin_events`, `kwin_contract`, `client_geometry`, `module`, `restart_survival`, `user_maximize`, +`check`, `features`, `look`, `render_smoke`, `wallpaper`, `rdp`, `latency`, `run_kde`, +`live_resize`, `focus_follows_mouse`, `lock_sleep`, `keys_engine`, `keys_static`, `keys_corpus`). +Each module has `run(machine, checks, scale)`, which is the body of the old script; the suite script +only starts the machine and calls `run_suite(checks, platform_only("kde", ...))`. The three +`keys-*` suites share one script, `keys-corpus.py`, as before. No check was dropped and none was +added; these have no shared scenario to repeat. What each makes on a real KDE, run once after the +move: + +| Suite | Passed | +|---|---| +| kwin | 8 | +| kwin-events | 22 | +| kwin-contract | 15 | +| client-geometry | 26 | +| user-maximize | 14 | +| check | 23 | +| latency | 5 (once 4 and 1 failed: a p95 of 173 ms against 150 while the machine was loaded) | +| render-smoke | 4 | +| rdp | 6 | +| keys-static, keys-skhd, keys-whkd, keys-sxhkd | 6, 4, 4, 4 | +| lock-sleep | 11 | +| focus-follows-mouse | 11 | +| restart-survival | 17 | +| module | 33 | +| live-resize | 7 | +| look | 40 | +| wallpaper | 22 | +| features | 30 | +| keys-engine | 34 | +| run-kde | 22 | + +The moved modules have long lines the suite scripts were never linted for, so `pyproject.toml` lets +them keep them (`E501` per file); new extras do not get that. diff --git a/docs/dev/vm-tests.md b/docs/dev/vm-tests.md index 78fc8767..39cddf20 100644 --- a/docs/dev/vm-tests.md +++ b/docs/dev/vm-tests.md @@ -377,6 +377,28 @@ a suite, as `core-e2e` does, and run that suite on KVM: a scenario that passes the fake and fails on KDE has found a bug in the fake, the library or the daemon. `Snapshot.focused_title` was found wrong this way, by the `stacks` scenario. +## A faster loop + +- **The daemon is built once, not once per commit.** The VM tests install the daemon built with the + constant commit `nix-check` (`nixosModules.forVmTests`), as the checks do, so a new commit does not + build it again. The version a VM test sees is therefore not the commit. The source of the build + leaves out `nix/tests/vm/`, so editing a test, the library or a fixture does not rebuild it either. + `nix build .#komorebi-full`, and what a user installs, still has the real commit. +- **Each step says how long it took.** `run_suite` prints `[scope] module.function: 12.3 s` after + every step, so a log shows which scenario the time went to. +- **Run only some of the steps.** Set `KFDE_ONLY` to a comma-separated list, and only the steps + whose name (as printed, `module.function`) contains one of the words run; the others are printed + as left out. A step that the others depend on (the one that opens the windows) is made with + `always=True` and runs whatever the list says. Evaluate with `--impure` for the variable to reach + the test: + + ```sh + KFDE_ONLY=stacks,monocle nix build --impure .#checks.x86_64-linux.vm-core-e2e -L + ``` + + A step that is left out returns `None`, so a suite that uses what a step returned must run that + step with `always=True`. + ## Recording a run with komorebi-recorder `komorebi-recorder`'s repository is private, so it is not an input of the flake. A run that wants