mirror of
https://github.com/kuhyx/testsAndMisc.git
synced 2026-11-10 19:07:04 +01:00
Two levels of pure taxonomy carrying no information, and a 2-directory
cap leaves no room for them. Categories now sit directly under
linux_configuration/: features, fixes, utils, misc, fresh-install,
installers, diagnostics, gaming, boot_recovery, periodic_background, lib,
meta, tests. A script's own lib/ and tests/ are exempt from the cap, so
those stay put.
Depth violations 248 -> 139; roughly 40 of the remainder are inside
digital_wellbeing and hosts, deferred until the guard-lib repoint.
The moves are the easy half. What breaks is every path that counted
levels, and three classes of it had to be found by resolving paths rather
than reading diffs:
- 52 relative `source` lines for lib/common.sh and lib/android.sh. The
correct prefix differs per file: 40 were ../../ and 12 were ../../../,
so a blanket replace would have fixed one set and broken the other.
- REPO_ROOT in 7 fixes/lib/tests harnesses and setup_syncyomi_guard.sh,
each walking up four levels from a directory now two levels shallower.
This caused a real regression -- the fixes suite went red with
"log_warn: command not found" -- caught by running it and comparing
against the pre-move baseline worktree.
- conftest.py's sys.path entries, which took the pytest gate down with
14 collection errors, and the `# shellcheck source=` directives, which
took shellcheck down with SC1091.
16 symlinks in $HOME broke, including the entire i3blocks bar. All
repointed, and cpu_monitor/memory/disk/time/volume were run to confirm
they emit real output rather than merely resolving.
Verified: 1798 tests pass at 100% coverage, 8 of 9 lib/tests suites pass
(the ninth needs the coverage jail, identically at baseline), pre-commit
is clean, and the two untracked secret configs are still ignored after
their gitignore paths changed.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PJrqKERAo5QUeEHWS5Asgp
62 lines
4.7 KiB
JSON
62 lines
4.7 KiB
JSON
{
|
|
"intent": "Flatten linux_configuration by dissolving the scripts/ and single_use/ levels, cutting directory-depth violations nearly in half and making the depth-2 cap reachable.",
|
|
"scope": [
|
|
"linux_configuration/scripts/{features,fixes,utils,misc,fresh-install,feedback-appimage,lib,boot_recovery,diagnostics,gaming,meta,periodic_background} -> linux_configuration/<same>",
|
|
"single_use's loose installer scripts -> linux_configuration/installers/",
|
|
"single_use/lib/joplin_server.sh -> installers/, freeing lib/ for the shared library",
|
|
"~90 files rewritten for the new paths; 16 $HOME symlinks repointed",
|
|
"Non-goal: periodic_background/digital_wellbeing and hosts, deferred pending the guard-lib repoint"
|
|
],
|
|
"changes": [
|
|
"git mv'd every category out of scripts/single_use/ and scripts/ up to linux_configuration/, then removed the two empty parents. scripts/tests/ held only an untracked __pycache__ and was deleted.",
|
|
"Rewrote absolute references (linux_configuration/scripts/... -> linux_configuration/...) across 38 files, and relative ../scripts/X forms across the docs and harnesses that used them.",
|
|
"Recomputed every relative `source` of lib/common.sh and lib/android.sh per file depth: 40 files were ../../ and 12 were ../../../, and the correct prefix differs by where the file now sits.",
|
|
"Fixed REPO_ROOT in 7 fixes/lib/tests harnesses plus setup_syncyomi_guard.sh, which walked up four levels from a directory that is now two levels shallower.",
|
|
"Repointed 16 symlinks in $HOME: the whole i3blocks bar, keepass-open, and two diagnostics tools.",
|
|
"Fixed linux_configuration/.gitignore's two secret paths and meta/shell-coverage-allowlist.txt's joplin_server entry.",
|
|
"Fixed linux_configuration/tests/conftest.py, whose sys.path entries for fast_count and the transcribe tools still named the old tree.",
|
|
"Documented the new layout in AGENTS.md and removed the last stale billsplit references."
|
|
],
|
|
"verification": [
|
|
{
|
|
"command": "check_directory_depth.sh --all",
|
|
"result": "pass (improvement)",
|
|
"evidence": "248 -> 139 violations. Roughly 40 of the remainder are inside digital_wellbeing and hosts, which are deliberately deferred."
|
|
},
|
|
{
|
|
"command": "resolve every '$SCRIPT_DIR/../lib/...' source against the filesystem",
|
|
"result": "fail then pass",
|
|
"evidence": "First sweep left 5 files in misc/testsAndMisc-bash pointing at ../../../lib/common.sh (they had a different prefix than the 40 already fixed). After the second pass every source resolves. Checked by testing the path on disk, not by reading the diff."
|
|
},
|
|
{
|
|
"command": "run every lib/tests/run_all.sh",
|
|
"result": "pass",
|
|
"evidence": "8 of 9 pass. features/lib/tests fails 'REFUSING: must run under shell_coverage_jail.sh' -- confirmed identical in the pre-move baseline worktree, so it is the suite's jail requirement, not a regression. fixes/lib/tests DID regress (log_warn: command not found) and was fixed by correcting REPO_ROOT; it passes again."
|
|
},
|
|
{
|
|
"command": "pytest_changed_packages.py",
|
|
"result": "fail then pass",
|
|
"evidence": "First run: 14 collection errors from conftest.py's stale sys.path. After the fix: 1798 passed, TOTAL coverage 100.00%."
|
|
},
|
|
{
|
|
"command": "find ~ -maxdepth 4 -xtype l -lname '*testsAndMisc*'; then run the i3blocks scripts",
|
|
"result": "fail then pass",
|
|
"evidence": "16 broken symlinks immediately after the move, including the entire i3blocks bar. After repointing, zero broken, and cpu_monitor/memory/disk/time/volume all emit real output (e.g. '54°C, 1.18', '17.9GiB/30.4GiB')."
|
|
},
|
|
{
|
|
"command": "git check-ignore on the two secret configs; check_shell_coverage.sh --all",
|
|
"result": "pass",
|
|
"evidence": "features/.wireguard_ssh.conf and .dufs_cloud.conf are still ignored after their gitignore paths changed. Coverage gate exits 0 and every allowlist entry names a file that exists."
|
|
}
|
|
],
|
|
"risks": [
|
|
"This renames ~400 tracked files. Anything outside this repo and outside $HOME that hardcodes linux_configuration/scripts/... would break; report_live_state.sh covers systemd, /etc, /usr/local and $HOME symlinks, and all of those were checked.",
|
|
"docs/superpowers/ artifacts still quote old paths. They are dated records of past work and were deliberately not rewritten.",
|
|
"features/lib/tests remains jail-only. That predates this change but means one suite is not exercised by a bare run."
|
|
],
|
|
"rollback": [
|
|
"git revert restores the tree; the symlinks then need repointing back, which the same one-liner does with the substitution reversed.",
|
|
"Re-run pytest_changed_packages.py and the lib/tests suites to confirm the restored state."
|
|
]
|
|
}
|