testsAndMisc/meta/scripts
Krzysztof kuhy Rudnicki 6b828d29aa Extract digital-wellbeing; the directory-depth cap now enforces
The last unit over the cap is now github.com/kuhyx/digital-wellbeing, cloned
at ~/digital-wellbeing, and `--warn` is gone from the directory-depth-cap
hook. `check_directory_depth.sh --all` exits 0 with zero violations, down from
46 at the start of the session. That was the point of the campaign.

History was filtered across all three paths the unit has lived at (63
commits); the current path alone holds 2.

The six suites that test this code lived in linux_configuration/tests/ rather
than beside it, so they were filtered separately (24 commits) and merged in as
a second root. A path filter of the unit alone would have left them here,
testing code that had left the repo -- and their names would still have been
in shell-tests.yml's hardcoded arrays, failing CI on missing files.

linux_configuration/lib/common.sh is vendored into vendor/ rather than trimmed
to the four functions actually used: set_actual_user_vars calls two of the
others, so a trim breaks silently. It is in vendor/ and not lib/ because
test_music_parallelism.sh copies the unit's own lib/ into a scratch worktree
while stubbing the shared lib; in one directory the real common.sh overwrote
the stub, and the suite silently measured the wrong library.

Running the callers caught what shellcheck and grep both missed:
check_and_enable_services.sh died with "DW_REPO: unbound variable" because the
definition sat below its first use. It now runs clean and reports ok for every
extracted-unit check.

Two long-standing live defects fixed as a consequence. The pacman-wrapper
drift manifest embeds ABSOLUTE paths and had named deleted scripts/ paths
since the flatten, so the check reported a permanent false "stale or
tampered"; it now verifies, with unchanged hashes proving the extracted bytes
are identical. And the last two stale live references are gone: 8 -> 0.

The two pre-commit excludes for setup_midnight_shutdown.sh are dropped rather
than moved. lsattr shows nothing in the unit is chattr +i any more, and the
fixer hooks leave the file alone when allowed to run.

Removing 80 shell files also shrank the jscpd denominator enough that the
virtualenv/tqdm clones inside the GENERATED .ci-mirror-venv/ tipped the repo
to 2.09% and blocked this commit, which adds no duplication. That directory is
the same vendored third-party shell the ignore list already excludes as
.venv/, just under another name; jscpd walks the working tree rather than the
index, so being untracked did not spare it. Excluded by name: 1.74%.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PJrqKERAo5QUeEHWS5Asgp
2026-08-23 20:57:51 +02:00
..
fixtures Extract phone_focus_mode together with focus_policy 2026-08-23 18:32:58 +02:00
lib Wire the shell ratchet into pre-commit, and test the coverage tooling 2026-08-23 15:51:29 +02:00
run_all refactor(linux_configuration): move remaining dirs + scripts/ to meta/ 2026-05-15 00:53:01 +02:00
_schema_validation.py feat: split oversized modules for 500-line limit, fix kasa coverage gap 2026-06-14 07:19:37 +02:00
_session_autopsy_mutations.py Split test_security_hardening.sh; finish the mutation-driver split 2026-08-16 22:24:02 +02:00
check_agent_contract.sh refactor: extract all inline Python from shell scripts into proper .py files 2026-06-06 10:31:48 +02:00
check_ai_evidence.sh refactor: extract all inline Python from shell scripts into proper .py files 2026-06-06 10:31:48 +02:00
check_append_only_sessions.sh refactor(linux_configuration): move remaining dirs + scripts/ to meta/ 2026-05-15 00:53:01 +02:00
check_ci_green.sh Phase 2: enforce the 250-line cap and stop pushing red 2026-08-21 16:41:31 +02:00
check_directory_depth.sh Extract digital-wellbeing; the directory-depth cap now enforces 2026-08-23 20:57:51 +02:00
check_file_length.sh Cap extensionless scripts, and split the one that was hiding 2026-08-23 19:13:40 +02:00
check_no_binaries.sh refactor(linux_configuration): move remaining dirs + scripts/ to meta/ 2026-05-15 00:53:01 +02:00
check_no_dufs_conf.sh linux_configuration: self-hosted dufs cloud storage + KeePass WebDAV auto-sync 2026-07-12 03:40:54 +02:00
check_no_inline_python.sh Gate the no-inline-Python rule instead of asking people to remember it 2026-08-16 15:11:56 +02:00
check_no_secrets.sh refactor(linux_configuration): move remaining dirs + scripts/ to meta/ 2026-05-15 00:53:01 +02:00
check_polling_antipatterns.sh Fail the build on any shellcheck finding; fix the 222 the old gate hid 2026-08-03 19:49:11 +02:00
check_python_location.sh Extract phone_focus_mode together with focus_policy 2026-08-23 18:32:58 +02:00
check_repo_size.sh Give the artifact cap a --prune escape hatch 2026-08-23 19:41:11 +02:00
check_requirements_sync.py requirements-sync: map bs4 and exempt foreign-runtime imports 2026-07-19 18:58:35 +02:00
check_shell_coverage.sh Wire the shell ratchet into pre-commit, and test the coverage tooling 2026-08-23 15:51:29 +02:00
ci_mirror_mem.sh Serialise the heavy ci-mirror gates when memory is tight 2026-08-23 20:02:59 +02:00
ci_mirror_range.sh Dissolve linux_configuration/scripts/ and single_use/ 2026-08-23 18:53:30 +02:00
ci_mirror_shell.sh Make the push gate check the push, and make its pytest stage real 2026-08-23 15:12:23 +02:00
ci_mirror.sh Serialise the heavy ci-mirror gates when memory is tight 2026-08-23 20:02:59 +02:00
disk_cleanup_check.sh Split disk_cleanup_check.sh: extract the helpers and the output blocks 2026-08-16 22:57:06 +02:00
extract_shell_functions.py extract_shell_functions: recognise the function name() spelling 2026-08-21 16:11:29 +02:00
init_agent_artifacts.sh refactor(linux_configuration): move remaining dirs + scripts/ to meta/ 2026-05-15 00:53:01 +02:00
install_hooks.sh fix(hooks): make git hooks and their toolchain mandatory and fail-closed 2026-08-03 11:09:11 +02:00
makepkg-manual-dlagent.sh refactor(linux_configuration): move remaining dirs + scripts/ to meta/ 2026-05-15 00:53:01 +02:00
mutate_session_autopsy_hooks.py Split test_security_hardening.sh; finish the mutation-driver split 2026-08-16 22:24:02 +02:00
mutate_shell.py meta: make this session's 65 mutations reproducible from the repo 2026-08-17 16:38:46 +02:00
pytest_changed_packages.py Move billsplit Flutter app into the monorepo 2026-08-03 12:22:22 +02:00
report_live_state.sh report_live_state: also scan installed scripts under /usr/local 2026-08-23 17:44:10 +02:00
run_prettier_capped.sh Move billsplit Flutter app into the monorepo 2026-08-03 12:22:22 +02:00
run_with_heavy_lock.sh Diagnose the pacman first-hook stall; fix the drift that hid a stale wrapper 2026-08-03 15:15:34 +02:00
shell_coverage_jail.sh Fix both kcov defects: dwm_config 47.95% -> 98.48%, rpi_nc_install 11.36% -> 96.59% 2026-08-22 14:24:25 +02:00
shell_coverage_report.py Name the lines outside kcov's line set; bound defect (c) as fail-closed 2026-08-22 14:30:39 +02:00
shell_coverage.sh meta: measurable shell coverage, and dns_iptables.sh at 100% 2026-08-17 15:29:08 +02:00
trace_shell_split.sh Close three fail-open paths in the prefix trace harness 2026-08-16 23:38:38 +02:00
validate_contract.py feat: split oversized modules for 500-line limit, fix kasa coverage gap 2026-06-14 07:19:37 +02:00
validate_evidence.py feat: split oversized modules for 500-line limit, fix kasa coverage gap 2026-06-14 07:19:37 +02:00
verify_shell_split.sh shell splits: add a verbatim-move harness and triage all 29 targets 2026-08-17 14:07:20 +02:00