{ "intent": "Extract the periodic system-maintenance subsystem into its own public repo with the 21 test files that lived in linux_configuration/tests/, and keep the one cross-unit pair test working here.", "scope": [ "linux_configuration/scripts/periodic_background/system-maintenance/ (32 files) -> github.com/kuhyx/system-maintenance, cloned to ~/system-maintenance", "20 of its 21 test files in linux_configuration/tests/ moved with it", "test_shutdown_timer_monitor.sh KEPT here: it is the pair test against digital_wellbeing's installer", "conftest.py, meta/pyproject.toml, python-tests.yml, shell-tests.yml, shell-coverage-allowlist.txt cleaned", "Non-goal: the other three subsystems" ], "changes": [ "Extracted the subsystem and its tests in one filter-repo pass (28 commits), hoisting bin/, systemd/, logrotate/ to the repo root and linux_configuration/tests/ to tests/.", "Gave the new repo its own tests/conftest.py putting bin/ on sys.path, plus a pyproject.toml with testpaths and branch coverage. The monorepo's shared conftest served several script directories and stays.", "Fixed two extracted shell suites that hardcoded $REPO_DIR/scripts/periodic_background/system-maintenance/bin, now $REPO_DIR/bin.", "Re-declared both CI halves in the new repo: python-tests.yml reached these modules through a paths filter and shell-tests.yml through a name list, neither of which follows the code out.", "Repointed the kept pair test at ${SYSTEM_MAINTENANCE_DIR:-$HOME/system-maintenance}, skipping cleanly when absent.", "Removed test_hosts_file_monitor.sh from shell-tests.yml's explicit list, since it left with the subsystem and CI would otherwise fail on a missing file." ], "verification": [ { "command": "sandbox: vm new sm1 + run the installer from an extracted-layout copy", "result": "pass in vmbox, NOT host-verified", "evidence": "install_usage_monitoring.sh detected the Arch distro family and resolved its 35 packages from a copy rooted outside the monorepo. A grep for testsAndMisc/periodic_background/linux_configuration across the extracted tree found only one stale comment, confirming no path coupling." }, { "command": "python -m pytest tests -q (extracted repo)", "result": "pass", "evidence": "136 passed." }, { "command": "bash tests/*.sh (extracted repo) + shellcheck", "result": "pass", "evidence": "Both remaining shell suites pass after the path fix; shellcheck exits 0 over every script with .shellcheckrc carried across." }, { "command": "pytest linux_configuration/tests (monorepo, after removal)", "result": "pass", "evidence": "202 passed." }, { "command": "bash linux_configuration/tests/test_shutdown_timer_monitor.sh", "result": "pass", "evidence": "Passes against the ~/system-maintenance checkout, matching the baseline worktree's behaviour. An intermediate version fell back to /usr/local/bin and HUNG: the installed copy is stale and differs from source, so the fallback was removed rather than kept. SYSTEM_MAINTENANCE_DIR=/nonexistent prints SKIP and exits 0." }, { "command": "bash meta/scripts/check_shell_coverage.sh --all", "result": "pass", "evidence": "Exit 0 with the five system-maintenance allowlist entries removed." } ], "risks": [ "/usr/local/bin/shutdown-timer-monitor.sh is stale relative to source. Left alone here; digital_wellbeing's installer owns reinstalling it, and that is the next extraction.", "The pair test now depends on a sibling checkout at ~/system-maintenance. It skips rather than fails when absent, so CI without the checkout reports a skip, not a false pass on assertions it never ran.", "/usr/local/bin/periodic-system-maintenance.sh still names digital_wellbeing and hosts paths inside this repo; those extractions must reinstall it." ], "rollback": [ "git revert to restore the subsystem and its 21 tests, then re-add the conftest entry, pyproject sys.path element and both workflow references.", "Re-run pytest linux_configuration/tests and check_shell_coverage.sh --all to confirm the restored state." ] }