Renames this repo's markdown onto README.md / CLAUDE*.md / DOCS*.md / TODO*.md so a future session can tell a live task from a finished record without reading the file to find out. TODO files carry the literal "REMOVE ME AFTER FINISH" and are deleted when the work lands. Enforced by the md-naming pre-commit hook and CI workflow, both delegating to the shared gate in kuhyx/utils so this repo's idea of a valid name cannot drift from every other repo's. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01A47aX5DJwmA3QFn3pkEWi7
5.7 KiB
testsAndMisc restructure — DONE
The campaign is finished. There is no next step in it.
The directory-depth cap enforces, both remaining units are their own repos, and every stale live reference is gone. What follows is the closing state and the handful of things deliberately left undone.
Superseded: NEXT_SESSION_PROMPT.md and NEXT_SESSION_RESTRUCTURE.md (merged
here 2026-08-23). INSTALLER_FIX_TASK.md is a different, still-open job.
Closing state (2026-08-23, all pushed, main clean)
depth violations 0 (was 46; the gate now runs WITHOUT --warn)
source files 949 / 1200 ceiling
tracked files 1090 (2295 at the campaign start)
stale live refs 0 (was 8, pre-existing from the flatten)
Verify any of it:
./meta/scripts/check_directory_depth.sh --all # exits 0
./meta/scripts/check_repo_size.sh
./meta/scripts/report_live_state.sh --check
What landed this session
hosts-blocker — github.com/kuhyx/hosts-blocker,
cloned at ~/hosts-blocker. 52 commits.
digital-wellbeing — github.com/kuhyx/digital-wellbeing,
cloned at ~/digital-wellbeing. 89 commits, and it carries the six suites that
used to sit in linux_configuration/tests/.
The cap enforces. --warn is gone from the directory-depth-cap hook, and
its name changed from "Report paths over" to "Enforce". Re-adding --warn
re-opens the hole; put the offending path somewhere legal instead.
Live repairs. Five mechanisms were silently pointing at deleted paths and none of them said so:
hosts-file-monitor.service(active) had logged 37 failures to restore/etc/hosts— it detected tampering it could not repair.dns-blocklist-refresh.service(enabled, runs 00:01) andmedia-organizer.servicenamed pre-flattensingle_use/paths.setup_periodic_system.shread all ten of its templates from a directory holding only untracked build residue sincesystem-maintenancewas extracted.- The pacman-wrapper drift manifest embeds absolute paths, so
check_and_enable_services.shreported a permanent false "stale or tampered". It now verifies.
Backups of every live artifact: /var/tmp/*.pre-{extract,fix,dw}.
Deleted. .hippo/ (161 files, 0 retrievals ever) and 3.7 GB of untracked
extraction residue. Before deleting the latter, focus_owner/android/key.properties
was preserved to ~/.android/release/key.properties (mode 600) — it holds the
Android release signing password, it is correctly gitignored, and those two
copies were the only ones on the machine.
Deliberately NOT done
- Nextcloud dedup — measured and recommended against. 3,618 lines across
22 files; the
nc_*andrpi_nc_*families are parallel evolutions, not copies; only 3 of 15 libs have tests; the target is a Raspberry Pi that cannot be reached from here. Do not attempt without hardware access. - The unwrapped
discord/signal-desktopbinaries.test_security_hardening.shreports 18 passed / 1 failed / 5 skipped, and the failure is those two missing/usr/binwrappers. Identical at baseline — verified in a detached worktree at HEAD. Live-system state, not a regression. workout_lockerreports error incheck_and_enable_services.sh. That is the separatescreen-lockerrepo.syncyomi-guardis red since 00:00 on 2026-08-23, working as designed: the library collapsed from 2185 manga to 8. See thesyncyomi-restore-silent-partialmemory; do NOT checkpoint the WAL before recovering. Newest snapshot:~/syncyomi/snapshots/, 2026-08-15.
Traps worth keeping
- Filter history on every path a unit has EVER lived at.
hostshad 1 commit at its current path and 51 across four roots;digital_wellbeinghad 2 and 63 across three. A single--pathtruncates history to the last move andgit log | headlooks perfectly fine afterwards. - A unit's tests may not live beside it. Six suites for
digital_wellbeingsat inlinux_configuration/tests/, and five of them ran in CI's Arch container. Moving code without them leaves tests exercising code that is gone, and leaves their names inshell-tests.yml's hardcoded arrays. - Run the caller; do not read it.
shellcheckandgrepboth passedcheck_and_enable_services.shwhileDW_REPOwas used 30 lines above its definition.dns-blocklist-refresh.servicelikewise only revealed/root/hosts-blockerwhen actually started — under systemd there is noSUDO_USERandid -unisroot. $HOMEis the wrong question. UseSUDO_USER's passwd entry; fall back to the owner of the file itself when running as bare root. That is whatlinux_configuration/lib/extracted_repos.shdoes.- A shrinking denominator can break a duplication gate. Removing 80 files
pushed jscpd to 2.09% on clones this session never touched — inside the
generated
.ci-mirror-venv/, which jscpd scanned because it walks the working tree, not the index. - A guarded check that skips is worse than one that fails. Several of these
defects survived months because the code said
if [[ -f $x ]]and quietly did nothing when$xhad moved. .pre-commit-config.yamlis NOT a symlink, unlikepyproject.toml,run.sh,requirements.txt,lint_python.shand.fvmrc. Do not "sync" it withmeta/.pre-commit-config.yaml; they are deliberately different.- Never raise the 2G pytest cap on a "tests passed, then Killed" push —
that is the ci-mirror concurrency issue, already fixed by
should_serialise_gates. - A red
maindeadlocks its own fix.CI_GREEN_SKIP=1must be set on the push, not the commit, and only when the push really is the fix.