From a818c19a4e18248924154c20e2f92335bb4b9824 Mon Sep 17 00:00:00 2001 From: Bernardo Magri Date: Fri, 17 Jul 2026 16:20:39 +0100 Subject: [PATCH] =?UTF-8?q?chore:=20v1-prep=20hygiene=20sweep=20=E2=80=94?= =?UTF-8?q?=20LICENSE=20(MIT),=20fixtures=20under=20tools/,=20doc=20stalen?= =?UTF-8?q?ess?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Three-way audit ahead of v1 (structure/necessity, docs-vs-code drift, mechanical checkers) came back clean: zero dead files, zero doc hard errors, all 92 options documented, all consistency checkers green, no untracked files. What it did surface, fixed here: - LICENSE was missing entirely — the one hard launch blocker. MIT (Bernardo's call), pointer at the README foot. - checks/ was the only top-level dir outside the documented layout rule; its two state-legacy-name fixtures moved to tools/fixtures/ (Bernardo chose move over documenting an exception), flake.nix refs + drift messages updated. - Doc staleness: two leftover "theme-state" leads (HARDWARE.md, REQUIREMENTS.md) now say state.json; VISION Theme C charge-limit row gets its ✓; VISION agent-slices datestamp bumped. - The idle.nix miniTransition duplication (same binary name, lossy subset of the real display-transition tool) is deliberately NOT refactored here — filed as PROPOSED #150 with the audit evidence. Wallpapers-in-repo (97 MB) is the known LATER artifact-split item, not re-filed. Verification: V0 — nix flake check --no-build green after the fixture move (state-legacy-name's eval asserts exercise the new paths); doc edits prose-reviewed. Audits by three Sonnet passes; triage on Fable. Co-Authored-By: Claude Fable 5 --- LICENSE | 21 +++++++++++++++++++ README.md | 2 ++ agent/BACKLOG.md | 19 +++++++++++++++++ agent/JOURNAL.md | 17 +++++++++++++++ docs/HARDWARE.md | 2 +- docs/REQUIREMENTS.md | 2 +- docs/VISION.md | 4 ++-- flake.nix | 8 +++---- .../fixtures/legacy-state/theme-state.json | 0 {checks => tools}/fixtures/no-state/README.md | 0 10 files changed, 67 insertions(+), 8 deletions(-) create mode 100644 LICENSE rename {checks => tools}/fixtures/legacy-state/theme-state.json (100%) rename {checks => tools}/fixtures/no-state/README.md (100%) diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..dc11e4e --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 Bernardo Magri + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md index 8a1218e..7cf2053 100644 --- a/README.md +++ b/README.md @@ -542,3 +542,5 @@ reload # exec zsh (reload the shell) | **[agent/LOOP.md](agent/LOOP.md)** | Autonomous iteration protocol | Kept out of the README body so this stays a focused entry point. + +License: [MIT](LICENSE). diff --git a/agent/BACKLOG.md b/agent/BACKLOG.md index 7510456..c7d9529 100644 --- a/agent/BACKLOG.md +++ b/agent/BACKLOG.md @@ -185,6 +185,25 @@ If that count is zero over a few weeks post-linger, **close this unbuilt**. If i is not, the upstream issue has sat ten months on vaxerski's "that will cause a segfault no?" and a reproducer would be worth more than a local guard. +### 150. Extract the display-transition tool — idle.nix carries a lossy copy under the same name + +Found by the 2026-07-17 structural audit. `modules/home/idle.nix:23-53` defines +`miniTransition`, a ~22-line `writeShellScriptBin` named +**`nomarchy-display-transition`** — the same binary name as the real ~175-line +tool in `modules/home/hyprland.nix:136-310` — implementing only +`undock|enable`, with none of the full tool's safety: no logging, no +lid-inhibitor gate, no `restore_keyboards`, no workspace moves, no +failure dump. The comment says why: "a mini transition avoids a circular +import on hyprland.nix". No PATH collision today (the mini is never installed; +it is baked by store path into hypridle's wake tool via `display-tools.nix`), +but nothing asserts the two stay behaviourally consistent, and this is the +subsystem where #100/#142/#148 all lived. Pitch: extract the full tool into +its own module file (e.g. `modules/home/display-transition.nix`) imported by +both hyprland.nix and idle.nix, delete the mini, re-run the +`tools/monitor-fallback.nix` harness + `checks.docking-ux` as the V2 gate. +Cost: a focused refactor of safety-critical code — deliberately NOT done as +hygiene drive-by; deserves its own iteration. + ### 149. `[watch]` Waybar's exec-once workaround may be defending against nothing post-linger Spun out of #147 (shipped 2026-07-17) so its loose thread survives the entry: diff --git a/agent/JOURNAL.md b/agent/JOURNAL.md index 00f3f2a..1e6eb9a 100644 --- a/agent/JOURNAL.md +++ b/agent/JOURNAL.md @@ -19,6 +19,23 @@ Template: --- +## 2026-07-17 — v1-prep hygiene sweep: repo is clean; LICENSE was the real gap +- **Task:** Bernardo asked for a structure/necessity audit + full docs sweep + ahead of v1. Three Sonnet passes (structure, docs-vs-code, mechanical + checkers); triage + fixes here. +- **Findings:** zero dead files (every pkg/module/tool/theme traces to a live + consumer); zero doc hard-errors; all 92 options documented; all 9 checkers + green; no untracked files. Real items: no LICENSE (fixed — MIT, Bernardo's + call), `checks/` violated the seven-dir rule (moved → `tools/fixtures/`, + flake refs updated), miniTransition duplication filed as #150, four one-line + doc staleness fixes (theme-state wording ×2, VISION ✓ + date). +- **Verified:** V0 — `nix flake check --no-build` green after the fixture + move (state-legacy-name's eval asserts exercise the new paths). +- **Pending:** nothing from this sweep; wallpapers-in-repo (97 MB) is the + known LATER split, not re-filed. +- **Next suggestion:** #150 when promoted, or the theme-switch latency + measurement that decides the wallpapers split. + ## 2026-07-17 — #134: `unstable.` seam shipped - **Task:** BACKLOG #134 (NEXT, decided shape from this morning's triage). - **Did:** `nixpkgs-unstable` input + `unstable` attrset in diff --git a/docs/HARDWARE.md b/docs/HARDWARE.md index 6b97438..917e5ae 100644 --- a/docs/HARDWARE.md +++ b/docs/HARDWARE.md @@ -467,7 +467,7 @@ For contributors (and power users who will PR): ## 11. Doctor and hardware health (current vs target) -**Today** (`nomarchy-doctor`): failed units, disk space, theme-state +**Today** (`nomarchy-doctor`): failed units, disk space, state.json validity/git, generation age, snapper; hardware section self-gates per machine (NetworkManager, audio sink, GPU smoke, fprintd, fwupd, charge limit, battery health, hibernate/zram). All read-only; each ✖ prints one diff --git a/docs/REQUIREMENTS.md b/docs/REQUIREMENTS.md index 8d0b583..37ce4e4 100644 --- a/docs/REQUIREMENTS.md +++ b/docs/REQUIREMENTS.md @@ -23,7 +23,7 @@ Related: [HARDWARE.md](HARDWARE.md) (profiles/drivers), ## Graphics (default desktop) The sole terminal is **Kitty** (GPU-accelerated OpenGL, themed from -theme-state). It runs on older integrated GPUs that reject Ghostty’s OpenGL +state.json). It runs on older integrated GPUs that reject Ghostty’s OpenGL **4.3** floor — notably **Intel HD 4000 / Ivy Bridge** (Acer Aspire M5-481T reported OpenGL **4.2** and could not start Ghostty). That is why Nomarchy standardized on Kitty only: one terminal to theme, one set of classed windows diff --git a/docs/VISION.md b/docs/VISION.md index ea126e2..6512ecb 100644 --- a/docs/VISION.md +++ b/docs/VISION.md @@ -85,7 +85,7 @@ Reference: [HARDWARE.md](HARDWARE.md) §4–§5, §11 (doctor). | **Dock life** ✓ | Lid closed + external only, wake, default audio sink on undock | ✓ #86 clamshell logind; ✓ #87 WirePlumber HDMI/USB priority (V3 hotplug QA) | | **Hibernate/sleep confidence** ✓ | Doctor: resume device, swap size, clean suspend journal | ✓ shipped #77 (+ #76 agent V0–V2; V3 power-cycle HARDWARE-QUEUE) | | **Battery health readout** ✓ | Cycles + design capacity % in doctor where sysfs allows | ✓ shipped #80 (report-only; charge limit is a separate row) | -| **Charge-limit instant apply** | Live sysfs write without rebuild | Shipped menu live-write path 2026-07-10; residual V3 Dell Adaptive / non-BAT* in HARDWARE-QUEUE | +| **Charge-limit instant apply** ✓ | Live sysfs write without rebuild | ✓ shipped menu live-write path 2026-07-10; residual V3 Dell Adaptive / non-BAT* in HARDWARE-QUEUE | --- @@ -152,7 +152,7 @@ From GOALS non-goals and installer audits — do not “fill the roadmap” with ## Suggested agent slices (promote via PROPOSED → NEXT) -**Still open** (as of 2026-07-11). Shipped items above are *not* open work. +**Still open** (as of 2026-07-17). Shipped items above are *not* open work. 1. `VISION § D` / LATER — wallpapers artifact split (decided deferred; promote only if theme-switch latency still hurts after measurement) diff --git a/flake.nix b/flake.nix index 413d6e6..f3382f2 100644 --- a/flake.nix +++ b/flake.nix @@ -1558,8 +1558,8 @@ let inherit (nixpkgs) lib; expect = cond: msg: lib.assertMsg cond "state-legacy-name: ${msg}"; - legacy = ./checks/fixtures/legacy-state; - none = ./checks/fixtures/no-state; + legacy = ./tools/fixtures/legacy-state; + none = ./tools/fixtures/no-state; evalsOk = src: (builtins.tryEval (builtins.isAttrs (self.lib.mkFlake { inherit src; username = "fixture"; }))) @@ -1568,9 +1568,9 @@ # Fixture drift: if someone adds a state.json here the check # would still pass, while testing nothing at all. expect (builtins.pathExists (legacy + "/theme-state.json")) - "fixture drift: checks/fixtures/legacy-state has no theme-state.json" + "fixture drift: tools/fixtures/legacy-state has no theme-state.json" && expect (! builtins.pathExists (legacy + "/state.json")) - ("fixture drift: checks/fixtures/legacy-state also has a state.json, " + ("fixture drift: tools/fixtures/legacy-state also has a state.json, " + "so it no longer exercises the legacy-only path") && expect (evalsOk legacy) ("mkFlake cannot evaluate a checkout carrying only theme-state.json — " diff --git a/checks/fixtures/legacy-state/theme-state.json b/tools/fixtures/legacy-state/theme-state.json similarity index 100% rename from checks/fixtures/legacy-state/theme-state.json rename to tools/fixtures/legacy-state/theme-state.json diff --git a/checks/fixtures/no-state/README.md b/tools/fixtures/no-state/README.md similarity index 100% rename from checks/fixtures/no-state/README.md rename to tools/fixtures/no-state/README.md