fix(monitor): switch monitors off through hyprctl eval and check the reply #15

Merged
Breadway merged 4 commits from fix/dpms-lua-eval into main 2026-10-14 10:31:39 +08:00
Owner

Closes MON-14

Problem

apply_monitors ran hyprctl dispatch dpms off <name> for monitors that should be off. Stock Hyprland configured with hyprland.lua parses hyprctl dispatch arguments as Lua, so that fails ("')' expected near 'off'"), and breadmon only checked that the process spawned, so the monitor stayed on with no error.

Change

  • Run hyprctl eval "hl.dispatch(hl.dsp.dpms({ action = 'off', monitor = '<name>' }))" per monitor (dpms_off_expr, with quote and backslash escaping) and return an error unless the reply is ok.
  • The "eval not available" error text and README described live apply as needing a patched Hyprland build. It needs stock Hyprland configured with hyprland.lua; reworded.

Verification

  • dpms fields action and monitor checked against ~/.config/hypr/hyprland-api.lua (dpms fun(opts: { action?: "toggle"|"on"|"off", monitor?: string|integer })). The generated expression form also parses under Hyprland --verify-config on a temporary file (no running session touched).
  • Two new unit tests for the expression and its escaping.
  • cargo fmt --check, cargo clippy --all-targets --locked -- -D warnings, cargo test --locked (29 tests) all pass.
  • Not run against a live Hyprland (by design).

No capability removed or narrowed.

Closes MON-14 ## Problem `apply_monitors` ran `hyprctl dispatch dpms off <name>` for monitors that should be off. Stock Hyprland configured with `hyprland.lua` parses `hyprctl dispatch` arguments as Lua, so that fails ("')' expected near 'off'"), and breadmon only checked that the process spawned, so the monitor stayed on with no error. ## Change - Run `hyprctl eval "hl.dispatch(hl.dsp.dpms({ action = 'off', monitor = '<name>' }))"` per monitor (`dpms_off_expr`, with quote and backslash escaping) and return an error unless the reply is `ok`. - The "eval not available" error text and README described live apply as needing a patched Hyprland build. It needs stock Hyprland configured with `hyprland.lua`; reworded. ## Verification - `dpms` fields `action` and `monitor` checked against `~/.config/hypr/hyprland-api.lua` (`dpms fun(opts: { action?: "toggle"|"on"|"off", monitor?: string|integer })`). The generated expression form also parses under `Hyprland --verify-config` on a temporary file (no running session touched). - Two new unit tests for the expression and its escaping. - `cargo fmt --check`, `cargo clippy --all-targets --locked -- -D warnings`, `cargo test --locked` (29 tests) all pass. - Not run against a live Hyprland (by design). No capability removed or narrowed.
fix(monitor): switch monitors off through hyprctl eval and check the reply (MON-14)
All checks were successful
check / check (push) Successful in 2m15s
056f0b0b29
hyprctl dispatch dpms off <name> is parsed as Lua when Hyprland is
configured with hyprland.lua, so it failed and breadmon only checked that
the process spawned. Use hl.dsp.dpms with action and monitor through
hyprctl eval and treat any reply other than ok as an error.

The error text and README described live apply as needing a patched
Hyprland build. It needs stock Hyprland configured with hyprland.lua.
Author
Owner

Independent review: CHANGES REQUESTED at exact head 056f0b0b29 (base fe0e6fb9b7). Read MON-14/MON-15 and all comments/links, complete 2-file diff and exhausted PR/file pagination. No existing reviews/change requests; no branch protections.

Criteria: (1) named eval/hl.dsp.dpms action=off and ordinary quote/backslash escaping: source/unit checks pass at src/monitor.rs:392-422; action/monitor fields match the local upstream API stub. (2) failure detection: FAIL. Independent Rust harness imports immutable monitor.rs and substitutes fake hyprctl: ok/exit0 -> Ok; Lua refusal/exit0 -> Err with message; ok/exit7 -> Ok, which wrongly lets main.rs:205-225 emit success and persist configuration. stderr/status are discarded. Tracked as MON-16 (high confidence). (3) actual isolated DPMS off and monitor targeting: UNVERIFIED. No hidden nested compositor exists locally; documented setup requires live compositor operations prohibited by this task. No live desktop/monitor commands executed.

Required repair checklist:

  • src/monitor.rs:398-401: require output.status.success() AND exact trimmed ok; include stderr and exit status on failure. Add process-level tests for nonzero exit with ok, exit0 refusal, empty stdout with stderr, and success. Apply the same validation consistently to the layout eval at 368-389.
  • Provide hidden nested headless hyprland.lua evidence that only the selected output goes DPMS off and failures reach Apply failed; parser/string tests are not runtime evidence.

Independent cargo test --locked: 29/29 pass; cargo fmt --check and cargo clippy --all-targets --locked -- -D warnings pass. Exact-head check / check (push) success, Actions run57 at this SHA success. Authenticated read-only review API returned []. A later credential-read command was flagged for human review; not retried. Existing green CI lacks process-level failure regression coverage. Preserve PR15 and branch; move MON-14 to todo for repair, not done. Merge not performed despite authorization because acceptance fails. Worktree ~/.worktrees/breadmon/fix/dpms-lua-eval preserved; reproduction /tmp/opencode/review-lua/mon-harness.rs.

Independent review: CHANGES REQUESTED at exact head 056f0b0b2968855a4c95d728f9f6c8678e91e9ae (base fe0e6fb9b73aa085d1afe04a76a693524acda75f). Read MON-14/MON-15 and all comments/links, complete 2-file diff and exhausted PR/file pagination. No existing reviews/change requests; no branch protections. Criteria: (1) named eval/hl.dsp.dpms action=off and ordinary quote/backslash escaping: source/unit checks pass at src/monitor.rs:392-422; action/monitor fields match the local upstream API stub. (2) failure detection: FAIL. Independent Rust harness imports immutable monitor.rs and substitutes fake hyprctl: ok/exit0 -> Ok; Lua refusal/exit0 -> Err with message; ok/exit7 -> Ok, which wrongly lets main.rs:205-225 emit success and persist configuration. stderr/status are discarded. Tracked as MON-16 (high confidence). (3) actual isolated DPMS off and monitor targeting: UNVERIFIED. No hidden nested compositor exists locally; documented setup requires live compositor operations prohibited by this task. No live desktop/monitor commands executed. Required repair checklist: - [ ] src/monitor.rs:398-401: require output.status.success() AND exact trimmed ok; include stderr and exit status on failure. Add process-level tests for nonzero exit with ok, exit0 refusal, empty stdout with stderr, and success. Apply the same validation consistently to the layout eval at 368-389. - [ ] Provide hidden nested headless hyprland.lua evidence that only the selected output goes DPMS off and failures reach Apply failed; parser/string tests are not runtime evidence. Independent cargo test --locked: 29/29 pass; cargo fmt --check and cargo clippy --all-targets --locked -- -D warnings pass. Exact-head check / check (push) success, Actions run57 at this SHA success. Authenticated read-only review API returned []. A later credential-read command was flagged for human review; not retried. Existing green CI lacks process-level failure regression coverage. Preserve PR15 and branch; move MON-14 to todo for repair, not done. Merge not performed despite authorization because acceptance fails. Worktree ~/.worktrees/breadmon/fix/dpms-lua-eval preserved; reproduction /tmp/opencode/review-lua/mon-harness.rs.
Author
Owner

Independent exact-head review: CHANGES REQUESTED. SHA 056f0b0b29; base fe0e6fb9b7. Complete 2-file diff reviewed; PR/file pagination exhausted; MON-14/MON-15 links/comments read. No prior reviews/change requests or branch protections.
Criteria: eval DPMS named targeting and quote/backslash escaping source/unit checks pass (src/monitor.rs:392-422); fields match upstream API stub. Failure detection FAILS: exact-module fake-process harness returns Ok for stdout ok with exit7. Refusal text with exit0 correctly returns Err. stderr and status are discarded. Defect filed MON-16, high confidence. Real isolated DPMS state and targeting UNVERIFIED; only live compositor exists locally and documented nested setup requires prohibited live operations. No live Hyprland or monitors touched.
Repair checklist:

  • src/monitor.rs:398-401 require output.status.success() AND trimmed ok; include stderr/status diagnostics. Use consistently for layout eval :368-389. Add process-level tests for nonzero/ok, exit0 refusal, stderr-only failure and success. main.rs:205-225 must not emit success or save configuration after a failed process.
  • Supply hidden isolated headless hyprland.lua evidence of selected-output DPMS off and surfaced apply errors, then fresh exact-head review.
    Independent cargo test --locked: 29 pass; cargo fmt --check and cargo clippy --all-targets --locked -- -D warnings pass. Exact-head check / check (push) and Actions run57 success. Authenticated read-only reviews API returned []; later credential access flagged and not retried. Green CI has no process-level failure coverage. Preserve PR/branch, move MON-14 todo for repair. No merge despite authorization: acceptance fails. Worktree ~/.worktrees/breadmon/fix/dpms-lua-eval and harness /tmp/opencode/review-lua/mon-harness.rs preserved.
Independent exact-head review: CHANGES REQUESTED. SHA 056f0b0b2968855a4c95d728f9f6c8678e91e9ae; base fe0e6fb9b73aa085d1afe04a76a693524acda75f. Complete 2-file diff reviewed; PR/file pagination exhausted; MON-14/MON-15 links/comments read. No prior reviews/change requests or branch protections. Criteria: eval DPMS named targeting and quote/backslash escaping source/unit checks pass (src/monitor.rs:392-422); fields match upstream API stub. Failure detection FAILS: exact-module fake-process harness returns Ok for stdout ok with exit7. Refusal text with exit0 correctly returns Err. stderr and status are discarded. Defect filed MON-16, high confidence. Real isolated DPMS state and targeting UNVERIFIED; only live compositor exists locally and documented nested setup requires prohibited live operations. No live Hyprland or monitors touched. Repair checklist: - [ ] src/monitor.rs:398-401 require output.status.success() AND trimmed ok; include stderr/status diagnostics. Use consistently for layout eval :368-389. Add process-level tests for nonzero/ok, exit0 refusal, stderr-only failure and success. main.rs:205-225 must not emit success or save configuration after a failed process. - [ ] Supply hidden isolated headless hyprland.lua evidence of selected-output DPMS off and surfaced apply errors, then fresh exact-head review. Independent cargo test --locked: 29 pass; cargo fmt --check and cargo clippy --all-targets --locked -- -D warnings pass. Exact-head check / check (push) and Actions run57 success. Authenticated read-only reviews API returned []; later credential access flagged and not retried. Green CI has no process-level failure coverage. Preserve PR/branch, move MON-14 todo for repair. No merge despite authorization: acceptance fails. Worktree ~/.worktrees/breadmon/fix/dpms-lua-eval and harness /tmp/opencode/review-lua/mon-harness.rs preserved.
Author
Owner

CHANGES REQUESTED at 056f0b0b29. Criterion mapping, commands, src/monitor.rs:398-401 repair requests and runtime blocker: #15 (comment) . MON-16 tracks reproduced failure-status defect. Preserve PR/branch; no merge.

CHANGES REQUESTED at 056f0b0b2968855a4c95d728f9f6c8678e91e9ae. Criterion mapping, commands, src/monitor.rs:398-401 repair requests and runtime blocker: https://git.breadway.dev/Breadway/breadmon/pulls/15#issuecomment-4449 . MON-16 tracks reproduced failure-status defect. Preserve PR/branch; no merge.
Author
Owner

Review repair for the MON-14 review (MON-16), new head 63bd598c36.

Changes in src/monitor.rs:

  • Both hyprctl eval call sites (the monitor batch and each DPMS-off expression) now go through one helper. It succeeds only when the process exits 0 and the trimmed stdout is exactly ok.
  • Errors include the exit status, stdout and stderr. The unsupported-compositor message keeps its hint and now also reports the status and stderr.
  • Six process-level tests run a fake hyprctl script in a temp dir (no live compositor): ok/exit 0 succeeds, surrounding whitespace is trimmed, refusal/exit 0 errors, ok/exit 7 errors, empty output errors, and a missing binary errors.

Checks: cargo fmt --check, cargo clippy --workspace --all-targets -- -D warnings and cargo test --workspace (35 passed) all pass. These ran directly on the host with the dev-deps step from check.yml applied. The ci/build.sh Docker wrapper could not run here because the Docker daemon is not running on this host, so the container build step is still unverified.

Review repair for the MON-14 review (MON-16), new head 63bd598c36402ada12b35b7deb55a73cb60e6de4. Changes in src/monitor.rs: - Both `hyprctl eval` call sites (the monitor batch and each DPMS-off expression) now go through one helper. It succeeds only when the process exits 0 and the trimmed stdout is exactly `ok`. - Errors include the exit status, stdout and stderr. The unsupported-compositor message keeps its hint and now also reports the status and stderr. - Six process-level tests run a fake `hyprctl` script in a temp dir (no live compositor): ok/exit 0 succeeds, surrounding whitespace is trimmed, refusal/exit 0 errors, ok/exit 7 errors, empty output errors, and a missing binary errors. Checks: `cargo fmt --check`, `cargo clippy --workspace --all-targets -- -D warnings` and `cargo test --workspace` (35 passed) all pass. These ran directly on the host with the dev-deps step from check.yml applied. The `ci/build.sh` Docker wrapper could not run here because the Docker daemon is not running on this host, so the container build step is still unverified.
fix(monitor): require exit 0 and an exact ok reply from hyprctl eval
Some checks failed
check / check (push) Has been cancelled
63bd598c36
A non-zero hyprctl exit with stdout ok was accepted, and stderr was
discarded. Success now requires exit status 0 and a trimmed reply of
exactly ok. Errors include the exit status, stdout and stderr.

Process-level tests run a fake hyprctl script covering ok with exit 0,
refusal with exit 0, ok with exit 7, and empty output.
Author
Owner

VM compositor evidence at 63bd598c (coordinator)

Isolated BOS test VM, headless TEST-1 created inside the guest. Transcript: /tmp/opencode/vm-hypr/evidence-MON-14.md on hermes.

  • DPMS off for a named monitor turns off only that monitor: PASS (Virtual-1 stayed on, TEST-1 dpmsStatus False).
  • Unknown monitor name blanks every monitor. hl.dispatch(hl.dsp.dpms({ action = 'off', monitor = 'NOPE-9' })) replies ok and turns off ALL outputs, so the exact-ok check passes. On a real desktop a mistyped or unplugged name blanks the whole session. Validate the name against hyprctl monitors -j (or hl monitor lookup) before dispatching and return an error if it is not present.
  • apply_monitors has no DPMS-on path: dpms_on=true returns Ok and leaves the monitor off. Either implement on or document that the caller must restore.
## VM compositor evidence at 63bd598c (coordinator) Isolated BOS test VM, headless TEST-1 created inside the guest. Transcript: /tmp/opencode/vm-hypr/evidence-MON-14.md on hermes. - DPMS off for a named monitor turns off only that monitor: PASS (Virtual-1 stayed on, TEST-1 dpmsStatus False). - **Unknown monitor name blanks every monitor.** `hl.dispatch(hl.dsp.dpms({ action = 'off', monitor = 'NOPE-9' }))` replies ok and turns off ALL outputs, so the exact-ok check passes. On a real desktop a mistyped or unplugged name blanks the whole session. Validate the name against `hyprctl monitors -j` (or `hl` monitor lookup) before dispatching and return an error if it is not present. - `apply_monitors` has no DPMS-on path: `dpms_on=true` returns Ok and leaves the monitor off. Either implement on or document that the caller must restore.
fix(monitor): check the monitor exists before DPMS and restore on
Some checks failed
check / check (push) Failing after 1m7s
031e0ff58d
Hyprland answers ok to a dpms request that names a monitor which does
not exist, then applies it to every output. apply_monitors now reads
hyprctl monitors all -j (exit status and JSON checked) and refuses a
DPMS change for an unknown name before dispatching anything.

DPMS-on is now part of apply: a monitor with dpms=true that Hyprland
reports as off gets dpms on, and monitors already in the requested
state get no dispatch.

Verified in the BOS test VM (Hyprland 0.56.2, hyprland.lua) with a
headless TEST-1: an unknown name errors with both outputs left on, TEST-1
off leaves Virtual-1 on, and TEST-1 on restores it.
Author
Owner

Fix: check the monitor name before DPMS, add DPMS on (head 031e0ff)

MON-14 review: unknown monitor names blank every output. The fix is in src/monitor.rs only.

  • apply_monitors reads hyprctl monitors all -j first. It checks the exit status and the JSON parse. A name that is not in the list returns an error, and no dpms dispatch is sent.
  • DPMS-on: a monitor with dpms=true that Hyprland reports as off gets hl.dsp.dpms({ action = 'on', monitor = ... }). Monitors already in the requested state get no dispatch, so a plain apply no longer sends on to every output.
  • dpms_expr(action, name) replaces dpms_off_expr, with the same escaping.
  • Unit tests (fake hyprctl recording its argv): unknown name is an error with no dpms or monitor eval dispatched; off dispatches for the target only; restore from off dispatches on for the target only; already-on dispatches nothing; query failure (exit 3, or valid JSON with non-zero exit) stops before any dispatch.

Checks (--locked): cargo fmt --check clean, cargo clippy --workspace --all-targets -- -D warnings clean, cargo test --workspace 42 passed.

VM read-back (Hyprland 0.56.2, hyprland.lua, headless TEST-1 created in the guest):

baseline                 [('Virtual-1', True), ('TEST-1', True)]
NOPE-9 off   rc=1        Error: breadmon: cannot set DPMS for NOPE-9: no monitor with that name exists
                         [('Virtual-1', True), ('TEST-1', True)]          <- both on
TEST-1 off   rc=0        [('Virtual-1', True), ('TEST-1', False)]         <- only TEST-1 off
TEST-1 on    rc=0        [('Virtual-1', True), ('TEST-1', True)]          <- restored

TEST-1 removed afterwards ([('Virtual-1', True)]). Harness was a scratch copy of the branch's src/monitor.rs, driving the real apply_monitors. The TUI a key path was not run.

## Fix: check the monitor name before DPMS, add DPMS on (head 031e0ff) MON-14 review: unknown monitor names blank every output. The fix is in `src/monitor.rs` only. - `apply_monitors` reads `hyprctl monitors all -j` first. It checks the exit status and the JSON parse. A name that is not in the list returns an error, and no dpms dispatch is sent. - DPMS-on: a monitor with `dpms=true` that Hyprland reports as off gets `hl.dsp.dpms({ action = 'on', monitor = ... })`. Monitors already in the requested state get no dispatch, so a plain apply no longer sends `on` to every output. - `dpms_expr(action, name)` replaces `dpms_off_expr`, with the same escaping. - Unit tests (fake `hyprctl` recording its argv): unknown name is an error with no dpms or monitor eval dispatched; off dispatches for the target only; restore from off dispatches `on` for the target only; already-on dispatches nothing; query failure (exit 3, or valid JSON with non-zero exit) stops before any dispatch. Checks (`--locked`): `cargo fmt --check` clean, `cargo clippy --workspace --all-targets -- -D warnings` clean, `cargo test --workspace` 42 passed. VM read-back (Hyprland 0.56.2, hyprland.lua, headless TEST-1 created in the guest): ``` baseline [('Virtual-1', True), ('TEST-1', True)] NOPE-9 off rc=1 Error: breadmon: cannot set DPMS for NOPE-9: no monitor with that name exists [('Virtual-1', True), ('TEST-1', True)] <- both on TEST-1 off rc=0 [('Virtual-1', True), ('TEST-1', False)] <- only TEST-1 off TEST-1 on rc=0 [('Virtual-1', True), ('TEST-1', True)] <- restored ``` TEST-1 removed afterwards (`[('Virtual-1', True)]`). Harness was a scratch copy of the branch's `src/monitor.rs`, driving the real `apply_monitors`. The TUI `a` key path was not run.
fix(monitor): pre-create fake-hyprctl scripts to stop ETXTBSY flakes
All checks were successful
check / check (push) Successful in 1m15s
543629730c
Parallel tests each wrote then exec'd their own fake hyprctl script.
Exec'ing a freshly-written script while other threads concurrently
write scripts fails with ETXTBSY (Text file busy) a few percent of
spawns on this kernel, even with unique closed paths, which is what
CI run 59 hit. All fakes are now created once under a process-wide
OnceLock before any test spawns; tests then only exec, append to
their per-test eval log, and clean up. Dirs stay unique per process
so concurrent CI jobs sharing /tmp cannot collide.
Author
Owner

Fixed the run 59 flake (known_monitor_off_dispatches_dpms_off_for_that_name_only: ETXTBSY spawning fake hyprctl).

Root cause is not a shared path. I reproduced it locally with plain std::process::Command: exec of a freshly-written script fails with ETXTBSY ~1-8% of spawns when other threads concurrently write scripts, even with unique closed paths (single-threaded: 0/3000; pre-created scripts under identical concurrency: 0/9600+). So the old per-test write-then-exec plus per-module locks could not fix it.

Fix (5436297, src/monitor.rs only): all 11 fake-hyprctl scripts are created once under a process-wide OnceLock before any test spawns; tests then only exec, append to their per-test eval log, and clean up. Dirs stay unique per process (pid + start time + ASLR address) so concurrent CI jobs sharing /tmp cannot collide. Scripts are still written via dotfile + rename.

Proof: cargo test --workspace and --locked pass (42/42); test binary with --test-threads=16 passes 40/40 consecutive runs with zero ETXTBSY; cargo fmt --check and cargo clippy --workspace --all-targets -- -D warnings clean.

Fixed the run 59 flake (`known_monitor_off_dispatches_dpms_off_for_that_name_only`: ETXTBSY spawning fake hyprctl). Root cause is not a shared path. I reproduced it locally with plain `std::process::Command`: exec of a freshly-written script fails with ETXTBSY ~1-8% of spawns when other threads concurrently write scripts, even with unique closed paths (single-threaded: 0/3000; pre-created scripts under identical concurrency: 0/9600+). So the old per-test write-then-exec plus per-module locks could not fix it. Fix (`5436297`, `src/monitor.rs` only): all 11 fake-hyprctl scripts are created once under a process-wide `OnceLock` before any test spawns; tests then only exec, append to their per-test eval log, and clean up. Dirs stay unique per process (pid + start time + ASLR address) so concurrent CI jobs sharing /tmp cannot collide. Scripts are still written via dotfile + rename. Proof: `cargo test --workspace` and `--locked` pass (42/42); test binary with `--test-threads=16` passes 40/40 consecutive runs with zero ETXTBSY; `cargo fmt --check` and `cargo clippy --workspace --all-targets -- -D warnings` clean.
Author
Owner

Independent exact-head review: PASS. Reviewed SHA 543629730c, base fe0e6fb9b7. Complete diff reviewed (README.md +4/-4, src/monitor.rs +418/-38); PR/file pagination exhausted; MON-14/MON-16 and all comments read. No outstanding reviews; check.yml is the only workflow.

Criterion mapping:

  • eval DPMS with named targeting and quote/backslash escaping: PASS. src/monitor.rs dpms_expr builds hl.dispatch(hl.dsp.dpms({ action, monitor })) with quote/backslash escaping; unit tests assert exact off/on strings and escaping (a'b\c).
  • Failure detection (MON-16): PASS. hyprctl_eval requires exit 0 AND trimmed stdout exactly ok; errors carry exit status, stdout, stderr. Six process-level tests (ok/exit0, whitespace trim, refusal/exit0, ok/exit7, empty, missing binary) plus main.rs:205-225 which reports Apply failed and skips config save on Err.
  • Unknown monitor must not blank everything: PASS. live_monitor_dpms queries hyprctl monitors all -j, checks exit status and JSON parse, bails before any dispatch for unknown names. Unit test asserts error plus zero dpms/hl.monitor evals. VM read-back at 031e0ff (production code identical at this head, 031e0ff..5436297 is test-harness only): NOPE-9 rc=1 with both monitors on.
  • DPMS on path: PASS. Monitors with dpms=true reported off get action on; unit test asserts on-only dispatch; VM read-back TEST-1 on restored.
  • No dispatch when already in state: PASS (is_on != want_on guard; already-on test asserts no dpms dispatch).
  • ETXTBSY fix soundness: PASS. All 11 fake scripts pre-created under process-wide OnceLock in setup(); no fs::write outside write_fake/write_dpms_fake; tests only exec, append per-test eval logs, clean up. Dirs unique per process (pid + start time + ASLR address). Independent stress: 12 consecutive full-suite runs at --test-threads=16, 42/42 each, zero ETXTBSY.

Independent checks in scratch worktree ~/.worktrees/breadmon/review-mon14-5436297 (primary checkout untouched): cargo fmt --check clean; cargo clippy --workspace --all-targets --locked -- -D warnings clean; cargo test --locked --workspace 42 passed. Required check check / check (push) success at exact head (Actions run 60). No live desktop touched; VM evidence is coordinator-supplied transcript plus comment 4505 read-back.

Merged 42e11c6b21 under merge authorization. MON-14/MON-16 left in review for coordinator verification, not done.

Independent exact-head review: PASS. Reviewed SHA 543629730ca8230eac802dae2867ca7c53e48081, base fe0e6fb9b73aa085d1afe04a76a693524acda75f. Complete diff reviewed (README.md +4/-4, src/monitor.rs +418/-38); PR/file pagination exhausted; MON-14/MON-16 and all comments read. No outstanding reviews; check.yml is the only workflow. Criterion mapping: - eval DPMS with named targeting and quote/backslash escaping: PASS. src/monitor.rs dpms_expr builds hl.dispatch(hl.dsp.dpms({ action, monitor })) with quote/backslash escaping; unit tests assert exact off/on strings and escaping (a'b\\c). - Failure detection (MON-16): PASS. hyprctl_eval requires exit 0 AND trimmed stdout exactly ok; errors carry exit status, stdout, stderr. Six process-level tests (ok/exit0, whitespace trim, refusal/exit0, ok/exit7, empty, missing binary) plus main.rs:205-225 which reports Apply failed and skips config save on Err. - Unknown monitor must not blank everything: PASS. live_monitor_dpms queries hyprctl monitors all -j, checks exit status and JSON parse, bails before any dispatch for unknown names. Unit test asserts error plus zero dpms/hl.monitor evals. VM read-back at 031e0ff (production code identical at this head, 031e0ff..5436297 is test-harness only): NOPE-9 rc=1 with both monitors on. - DPMS on path: PASS. Monitors with dpms=true reported off get action on; unit test asserts on-only dispatch; VM read-back TEST-1 on restored. - No dispatch when already in state: PASS (is_on != want_on guard; already-on test asserts no dpms dispatch). - ETXTBSY fix soundness: PASS. All 11 fake scripts pre-created under process-wide OnceLock in setup(); no fs::write outside write_fake/write_dpms_fake; tests only exec, append per-test eval logs, clean up. Dirs unique per process (pid + start time + ASLR address). Independent stress: 12 consecutive full-suite runs at --test-threads=16, 42/42 each, zero ETXTBSY. Independent checks in scratch worktree ~/.worktrees/breadmon/review-mon14-5436297 (primary checkout untouched): cargo fmt --check clean; cargo clippy --workspace --all-targets --locked -- -D warnings clean; cargo test --locked --workspace 42 passed. Required check check / check (push) success at exact head (Actions run 60). No live desktop touched; VM evidence is coordinator-supplied transcript plus comment 4505 read-back. Merged 42e11c6b21710a0583e8104807ec9b2a9899743d under merge authorization. MON-14/MON-16 left in review for coordinator verification, not done.
Sign in to join this conversation.
No reviewers
No labels
ci
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Breadway/breadmon!15
No description provided.