testsAndMisc/docs/superpowers/contracts/nvidia-passwordless-splits-2026-08-17.json
Krzysztof kuhy Rudnicki efd7f022fd fixes/utils: split nvidia_troubleshoot 336 -> 169+181, passwordless 374 -> 195+193
Two single-use scripts with no deployed copy, so the entry+lib shape is
safe. Each keeps the ordering, the safety checks and the user-facing output;
the configuration writers move to a library beside it.

Both scripts write `set -e # Exit on any error`, so extract_shell_functions.py
now matches the directive rather than the whole line. Regression-checked by
re-deriving the committed fresh-install/main.sh split byte-for-byte.

Verified: all 6 and all 9 top-level functions verbatim via the shfmt
harness; both libraries source with no side effects and define every
function moved into them; bash -n passes on all four.

Neither script was run. nvidia_troubleshoot.sh writes /etc/X11 config and
installs pyroveil; setup_passwordless_system.sh writes sudoers and lightdm
autologin, which is what this machine's login depends on.

Over-cap files 31 -> 29.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011w2Pj4Ek3ZNMQVYcFHgXDY
2026-08-17 14:18:06 +02:00

18 lines
1.5 KiB
JSON

{
"title": "Split nvidia_troubleshoot.sh and setup_passwordless_system.sh",
"objective": "Two single-use fix scripts sit over the 250-line cap with no deployed copy, making them safe targets for the entry+lib shape. Move each script's configuration writers into a sourced library beside it, leaving the entry script owning the ordering, the safety checks and the user-facing output. Code moves verbatim; neither script is executed, because both write system configuration this machine depends on.",
"acceptance_criteria": [
"All four resulting files are under 250 lines; the over-cap total falls 31 -> 29",
"Every top-level function is verbatim, proved by meta/scripts/verify_shell_split.sh",
"Each library sources with no side effects and defines every function moved into it",
"bash -n passes on all four files",
"No suppression of any kind, and no shellcheck directive added beyond the standard source= comment"
],
"out_of_scope": [
"Running either script: one writes /etc/X11 and installs pyroveil, the other writes sudoers and lightdm autologin",
"nvidia_troubleshoot.sh's trace blocker, which prevents a runtime trace but not a static verification",
"The phone_focus_mode scripts, which need deploy.sh's copy list to grow in the same commit"
],
"verifier": "bash meta/scripts/verify_shell_split.sh HEAD <entry> <lib> <entry> for the verbatim claim; sourcing each library in a subshell and checking declare -F for every moved function; bash -n on all four; pre-commit run --files; bash ~/utils/scripts/check_file_length.sh --all."
}