breadmon turns monitors off with hyprctl dispatch dpms off, which fails when Hyprland is configured with hyprland.lua #14

Closed
opened 2026-10-09 15:54:25 +08:00 by Breadway · 5 comments
Owner

How it was found: 2026-10-09 ecosystem audit for legacy hyprctl usage (same root cause as BSET-58 / BOS-87).

Confidence: high that the command fails on stock Hyprland 0.56.2 run from hyprland.lua (reproduced: hyprctl dispatch dpms off gives "')' expected near 'off'", exit 7). This was found by reading the code and not exercised through breadmon.

Bug: src/monitor.rs (~line 394) runs hyprctl dispatch dpms off <name> for each monitor to switch off. It only checks that the process spawned, not its output, so the monitor stays on with no error.

Suggested fix: hyprctl eval "hl.dispatch(hl.dsp.dpms({ action = 'off', monitor = '<name>' }))" (verify the monitor field name against the 0.56 Lua API), or legacy-then-eval fallback like breadbar. Check for the ok reply.

**How it was found:** 2026-10-09 ecosystem audit for legacy hyprctl usage (same root cause as BSET-58 / BOS-87). **Confidence:** high that the command fails on stock Hyprland 0.56.2 run from `hyprland.lua` (reproduced: `hyprctl dispatch dpms off` gives "')' expected near 'off'", exit 7). This was found by reading the code and not exercised through breadmon. **Bug:** `src/monitor.rs` (~line 394) runs `hyprctl dispatch dpms off <name>` for each monitor to switch off. It only checks that the process spawned, not its output, so the monitor stays on with no error. **Suggested fix:** `hyprctl eval "hl.dispatch(hl.dsp.dpms({ action = 'off', monitor = '<name>' }))"` (verify the monitor field name against the 0.56 Lua API), or legacy-then-eval fallback like breadbar. Check for the `ok` reply.
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

CHANGES REQUESTED exact head 056f0b0b29. Full evidence/checklist: #15 (comment) . src/monitor.rs:398-401 ignores failed exit status and stderr; independent exact-source fake-process harness stdout ok/exit7 returns Ok. Tracked MON-16. Require status success plus ok and process regression tests. Hidden nested DPMS runtime unverified. 29 tests, fmt, locked clippy and exact-head CI pass but do not cover defect. Move todo for repair on same PR; no merge/live access.

CHANGES REQUESTED exact head 056f0b0b2968855a4c95d728f9f6c8678e91e9ae. Full evidence/checklist: https://git.breadway.dev/Breadway/breadmon/pulls/15#issuecomment-4449 . src/monitor.rs:398-401 ignores failed exit status and stderr; independent exact-source fake-process harness stdout ok/exit7 returns Ok. Tracked MON-16. Require status success plus ok and process regression tests. Hidden nested DPMS runtime unverified. 29 tests, fmt, locked clippy and exact-head CI pass but do not cover defect. Move todo for repair on same PR; no merge/live access.
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. Full findings on the PR.

## 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. Full findings on the PR.
Author
Owner

Independent exact-head re-review: PASS at 543629730c (base fe0e6fb9, PR Breadway/breadmon#15). Full evidence and criterion mapping: #15 (comment) . Name validation before dispatch, DPMS on path, no dispatch when already in state, exact-ok plus exit-status failure detection, and ETXTBSY OnceLock fix all verified in source, 42 unit/process tests (independent 42/42 plus 12 clean stress runs at 16 threads), and coordinator VM read-back (NOPE-9 rejected with both monitors on; TEST-1 off-only/off; on restores). Required check success at exact head (run 60). Merged 42e11c6b21 under authorization. Note: breadboard sync auto-closed this card on merge (known server limitation); restoring to review. Awaiting coordinator verification of integrated behavior, not done.

Independent exact-head re-review: PASS at 543629730ca8230eac802dae2867ca7c53e48081 (base fe0e6fb9, PR Breadway/breadmon#15). Full evidence and criterion mapping: https://git.breadway.dev/Breadway/breadmon/pulls/15#issuecomment-4666 . Name validation before dispatch, DPMS on path, no dispatch when already in state, exact-ok plus exit-status failure detection, and ETXTBSY OnceLock fix all verified in source, 42 unit/process tests (independent 42/42 plus 12 clean stress runs at 16 threads), and coordinator VM read-back (NOPE-9 rejected with both monitors on; TEST-1 off-only/off; on restores). Required check success at exact head (run 60). Merged 42e11c6b21710a0583e8104807ec9b2a9899743d under authorization. Note: breadboard sync auto-closed this card on merge (known server limitation); restoring to review. Awaiting coordinator verification of integrated behavior, not done.
Breadway reopened this issue 2026-10-14 10:32:09 +08:00
Author
Owner

Verified on integrated main 42e11c6 (merge of PR15, parents fe0e6fb+5436297 so tree equals reviewed head): check success at head (run 60), 42/42 tests plus 12 clean 16-thread stress runs in review, VM DPMS read-back (NOPE-9 rejected, TEST-1 off-only, on restores). breadmon runs check.yml on branches only, so no main CI expected.

Verified on integrated main 42e11c6 (merge of PR15, parents fe0e6fb+5436297 so tree equals reviewed head): check success at head (run 60), 42/42 tests plus 12 clean 16-thread stress runs in review, VM DPMS read-back (NOPE-9 rejected, TEST-1 off-only, on restores). breadmon runs check.yml on branches only, so no main CI expected.
Sign in to join this conversation.
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#14
No description provided.