testsAndMisc/docs/superpowers/evidence/monitor-autoconfig-2026-11-11.json
Krzysztof kuhy Rudnicki c409ebb3eb
Some checks are pending
dependency freshness / dependencies on newest stable (push) Waiting to run
md-naming / markdown naming convention (push) Waiting to run
Pre-commit checks / pre-commit (${{ matrix.group }}) (mypy, mypy) (push) Waiting to run
Pre-commit checks / pre-commit (${{ matrix.group }}) (pylint, pylint) (push) Waiting to run
Pre-commit checks / pre-commit (${{ matrix.group }}) (rest, ) (push) Waiting to run
Pre-commit checks / pre-commit (${{ matrix.group }}) (shellcheck, shellcheck) (push) Waiting to run
Python tests / test (push) Waiting to run
repo-contract / repo contract (push) Waiting to run
Shell tests / shell-tests (push) Waiting to run
Shell tests / lib-tests (push) Waiting to run
Shell tests / arch-tests (push) Waiting to run
Prettier-format monitor/focus evidence JSON
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WzxdWXa4ytX9adN7qpMAop
2026-11-11 15:42:31 +01:00

38 lines
2.2 KiB
JSON

{
"intent": "Every monitor kuhy connects runs at its native resolution and highest refresh rate automatically, with DP-0 primary on the left, without running xrandr by hand.",
"scope": [
"linux_configuration/features/monitor_layout.py, monitor_autoconfig.py, setup_monitor_autoconfig.sh, systemd/monitor-autoconfig.service",
"linux_configuration/tests/test_monitor_layout.py, test_monitor_autoconfig.py, conftest.py; meta/pyproject.toml pylint init-hook path",
"Non-goal: reverting deliberate mode changes (games, manual xrandr); only connect/disconnect triggers a re-layout"
],
"changes": [
"monitor_layout.py: parses xrandr --query and plans one row: native size at max refresh, preferred primary leftmost, disconnected outputs holding a CRTC switched off; returns [] when already there",
"monitor_autoconfig.py: systemd user service; RandR version handshake, listens for RROutputChangeNotify, settles 1 s, retries while a connected monitor lists no modes, logs and survives a failed xrandr",
"setup_monitor_autoconfig.sh installs deps, the user unit (WantedBy graphical-session.target) and starts it"
],
"verification": [
{
"command": "python3 -m pytest linux_configuration/tests/test_monitor_layout.py linux_configuration/tests/test_monitor_autoconfig.py --cov=monitor_layout --cov=monitor_autoconfig --cov-branch",
"result": "pass",
"evidence": "23 passed, 100% line+branch coverage on both modules"
},
{
"command": "linux_configuration/features/setup_monitor_autoconfig.sh",
"result": "pass",
"evidence": "unit enabled and active; layout DP-0 3840x2160@144 + HDMI-0 2560x1440@143.98 left unchanged (dry-run plan empty)"
},
{
"command": "RandR probe with/without xrandr_query_version",
"result": "pass",
"evidence": "no events before the handshake, CrtcChange/ScreenChange events after it"
}
],
"risks": [
"Physical hotplug not exercised on the real machine (kuhy declined the replug check); relies on the NVIDIA driver emitting RROutputChangeNotify on connect"
],
"rollback": [
"systemctl --user disable --now monitor-autoconfig.service; git revert",
"xrandr layout stays as last applied"
]
}