Files
Nomarchy/agent/BACKLOG.md
Bernardo Magri 2055842c33
All checks were successful
Check / eval (push) Successful in 4m1s
feat(memory): enable zram compressed-RAM swap by default (#76 slice)
First slice of BACKLOG #76 (hibernation + zram, split): zramSwap on by
default in modules/nixos/oom.nix — the memory-pressure layer before
earlyoom. zstd @ 50% RAM (nixpkgs defaults, explicit for reproducibility),
priority 100 so day-to-day paging fills zram first and any disk swapfile
stays reserved for #76's hibernate image (hibernation can't resume from
volatile zram). Follows the earlyoom mkDefault precedent — no toggle.

Adds checks.zram-swap runNixOSTest importing oom.nix, asserting the device
is an active swap, uses [zstd], and carries priority 100.

Verified: V2 checks.zram-swap PASS (/dev/zram0 in /proc/swaps, zstd,
prio 100); V1 full distro toplevel builds; V0 flake check --no-build green.
#76 remainder (disk swapfile default + resume + installer) still open.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-10 16:07:55 +01:00

206 lines
9.1 KiB
Markdown
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Backlog — the prioritized task queue
**This is the only executable work list for agents.** Product themes and
v1.0 intent live in [`docs/VISION.md`](../docs/VISION.md); design history
in [`docs/ROADMAP.md`](../docs/ROADMAP.md); map in
[`docs/README.md`](../docs/README.md) and [`agent/README.md`](README.md).
**Rules:**
- Agents take the topmost actionable item (see LOOP.md). Finished items
are **deleted** here — the journal + git log are the record; durable
design notes get a ✓-entry in docs/ROADMAP.md (and/or a note in VISION)
if worth keeping.
- Item numbers are **stable IDs** — never renumbered or reused. A gap in
the sequence means shipped (or dropped) work; new items take the next
free number regardless of tier.
- Tags: `[blocked:hw]` needs real hardware (see HARDWARE-QUEUE.md) ·
`[human]` needs Bernardo · `[stuck]` two failed attempts, needs help ·
`[big]` must be split before starting.
- Agents may append to **PROPOSED** and **Decisions** freely (include
`VISION § …` or `ROADMAP § …` when relevant); only Bernardo moves items
*out* of PROPOSED into the tiers.
---
## NOW
*(empty — NEXT's top item is the queue head)*
## NEXT
### 76. Hibernation default `[big]`
**Product intent (Bernardo 2026-07-10):** hibernation on by default;
zram on alongside for live memory pressure. Disk swap ≥ RAM for the
hibernate image; zram high-priority for day-to-day swap (not sufficient
alone for resume).
**✓ zram slice shipped (2026-07-10):** `zramSwap` on by default in
`modules/nixos/oom.nix` (zstd, 50% RAM, priority 100 so day-to-day paging
stays off the disk swap reserved for the hibernate image); `checks.zram-swap`
VM test asserts device/algorithm/priority (V2 pass). **Remainder below is the
hibernation half** — disk swapfile default + resume + installer.
**Reference layout (this machine — already hibernation-capable, no zram
yet):** LUKS (`crypto_LUKS` → mapper `crypted`) holds one BTRFS with
`@swap` mounted at `/swap`; swapfile `/swap/swapfile` (here 16G);
`swapDevices = [{ device = "/swap/swapfile"; }]`;
`boot.resumeDevice = "/dev/disk/by-uuid/<LUKS-root-uuid>"`;
`boot.kernelParams = [ "resume_offset=…" ]` from
`btrfs inspect-internal map-swapfile -r`. The swapfile lives **inside
the encrypted volume** (subvolume, not a separate cleartext partition).
Installer path already sketches this (`@swap` + resume_offset patch in
`nomarchy-install` / `patch-template.py`) when `swapSize` ≥ RAM-ish.
**Scope (split before/while implementing — do not land as one mega-PR):**
1. **Design** — default `swapSize` (= RAM? round up?), LUKS+systemd-initrd
resume (already used), what when install chose `swapSize=0`, migration
for existing machines. (zram priority-vs-disk already settled + shipped.)
2. **Module** — NixOS: ensure hibernation knobs are coherent when swapfile
exists (resume device/offset); Power menu Hibernate already present —
must work when swap is configured. (zram already default-on in oom.nix.)
3. **Installer** — default new installs to hibernation-ready `@swap`
swapfile (encrypted with root); keep `0` = no swap opt-out; document
migration.
4. **Verify (required)**
- **V0:** eval / option / disko contracts.
- **V2 (mandatory, agent):** exercise hibernation in the **VM harness**
(`runNixOSTest` or install-test style) — encrypted root + BTRFS
`@swap` swapfile + resume_offset; prove hibernate→resume path at
least as far as QEMU allows (fail the item if only “config
evaluates”).
- **V3:** real laptop (this LUKS+@swap layout): Hibernate → power off
→ resume session; queue HARDWARE-QUEUE.
**Out of scope:** TLP; formatter. Prefer boring NixOS knobs; extend the
existing installer swapfile story rather than inventing a second layout.
## LATER
- **Wallpapers artifact split** (ROADMAP § Faster switches — decided,
deferred): pinned `Nomarchy-wallpapers` input so a state write stops
re-copying 86 MB. Follow-on: pre-built theme variants if switches are
still slow after.
- **Installer round 2** (ROADMAP § Installer): multi-disk BTRFS RAID,
impermanence, BIOS/legacy boot.
- **Boot-from-snapshot**: a systemd-boot equivalent of grub-btrfs.
- **Night-light geo mode**: lat/long auto sunset/sunrise (means wlsunset).
- **Per-theme icon overrides** / more icon packs (ROADMAP § Icon themes).
- **MIPI/IPU software-ISP camera** support (no-UVC machines).
- **VPN exit-node richer display** (country/city) (optional).
- **NixOS release bump → v2** `[human]`: deliberate, hand-edited, never
automated; the previous attempt was discarded (2026-06-22) over a
Hyprland OOM blocker — see MEMORY.md before retrying (NOW#3 should
also soften that blocker class).
## FUTURE (decided deferred — not the agent queue head)
Work we **intend** someday but explicitly **not** NEXT. Agents do not
pick these unless Bernardo promotes one into NEXT/NOW.
### 20. KVM runner → VM suite in CI `[human]`
**Status (2026-07-10):** keep **eval-only** CI on the current Gitea
stack (act_runner in docker-compose on the 4c/4GB IONOS VPS). Nested
KVM + RAM headroom on that host are a poor fit next to Gitea; full
`checks.*` VMs stay local / promotion-time until a **separate**
KVM-capable machine exists.
**When ready:** register a second runner (host-mode nix + `/dev/kvm`,
label `nix-kvm` — not the existing docker eval runner), then uncomment
the `vm-checks` job in `.gitea/workflows/check.yml` (`runs-on: nix-kvm`,
`nix flake check` + toplevel/HM builds). Do not enable the job until
that label is online (Gitea queues forever otherwise).
### Formatter — adopt later `[human]`
**Intent:** add a Nix formatter (likely `nixfmt-rfc-style`) in a dedicated
pass: reformat the tree once, document in CONVENTIONS, optional CI
check. **Not** the queue head — no drive-by reformats until that pass.
### Hibernation + zram
**Promoted → NEXT #76** (2026-07-10).
## PROPOSED (agent suggestions — await human triage)
*Agents: append here with a one-paragraph pitch (what/why/cost). Do not
implement. Bernardo moves accepted items into a tier.*
*Open work only. Shipped exam/AC items (#47#63, #14, #52 theme
high-ROI, etc.) live in the journal + ROADMAP — not here.*
### Product / day-2
_(Battery charge-limit instant → shipped 2026-07-10; V3 PASS Latitude
5310: Custom charge type + live menu + unplug re-apply.)_
_(Portal/Flatpak IR camera → **#71** docs (a); (b)/(c) still need T14s.)_
_(Post-install hardware hints residual → **#73**.)_
_(Look & Feel submenu → already shipped (Theme / wallpaper / night light);
2026-07-10: Reset wallpaper (auto) row; root stays six.)_
- **NVIDIA first-class options** — **deferred past v1** (Bernardo
2026-07-10). Keep #59 commented install guidance; no
`nomarchy.hardware.nvidia.*` until a hybrid maintainer + queue.
### Installer / template
_(Installer ↔ template SoT CI → **#72**; V2 install → **#75**.)_
_(Installer chown flake dir → **#65**.)_
_(MIGRATION.md snapshot layout → **#64**.)_
_(Unattended-install test matrix → **#74**.)_
_(Friendlier mkFlake theme-state errors → **#66**.)_
### Theme polish
_(#52 residual ANSI → **#68** ✓.)_
_(Fidelity / hierarchy nits → **#67** ✓.)_
_(Import pipeline hierarchy → **#70** ✓.)_
_(audit-theme-design identity exemptions → **#69** ✓.)_
_(summer-day/night pair polish + status CSS + preview recapture →
shipped 2026-07-10: JSON SoT, status states, theme-shot previews for
executive-slate + neon-glass.)_
_(Identity taste retunes + hand `btop.theme` for white/vantablack/lumon/
hackerman/matte-black/miasma/neon-glass/boreal/executive-slate →
shipped 2026-07-10.)_
### v1.0 pointer
See **VISION**. Open PROPOSED: NVIDIA wrappers deferred past v1; IR
portal (b)/(c) hardware. Browser default = Chromium; power = PPD.
## Decisions `[human]`
Open calls only Bernardo can make; agents add options/evidence but never
decide. **Resolved** entries stay for history; agents treat them as closed.
### Resolved (2026-07-10)
- **Docs site vs Markdown-in-repo** — **markdown in-repo for now**
(`docs/`, README). A rendered docs site is FUTURE if wanted.
- **Default browser** — **ship Chromium** in
`templates/downstream/home.nix`; mime → `chromium-browser.desktop`.
Opt out: delete the line / override mime.
- **Default power backend** — **keep PPD** (`nomarchy.system.power.backend`
default). TLP remains the one-line opt-in. Rationale: stability + live
profile API for menu/Waybar; Omarchys TLP experiment reverted.
### Resolved (2026-07-10, more)
- **Formatter adoption** — **yes, but not now.** Tracked as FUTURE
(below). Nix-source style only (`nixfmt-rfc-style` or similar); one
bulk reformat + CI/check when promoted. Until then: hand-aligned
style per CONVENTIONS.
- **Hibernation** — **want by default** (product intent). Needs a
disk-backed swap (file or partition) sized for resume; not zram alone.
Implementation is a future/NEXT item when designed (installer +
resume device + encrypted-root story).
### Still open (design detail under #76)
- **Swap sizing / LUKS resume** — implement under NEXT #76 (disk ≥ RAM +
zram on is the product default; exact installer numbers TBD in design).