testsAndMisc/docs/superpowers/evidence/fixes-lib-run-all-2026-08-22.json
Krzysztof kuhy Rudnicki 347222b921 Add fixes/lib run_all.sh; the previous handoff was wrong about that directory
The handoff recorded fixes/lib as having "no harness at all". It already had
8 test files and 2 harnesses. What was missing is run_all.sh -- the subject
is_covered() actually builds, and the only thing the gate measures through.
All 8 test files pass through it.

No jail_args beside it, deliberately: the harness confines every write to its
own `mktemp -d` and intercepts external commands with a PATH stub dir, and
grep finds no absolute write to /etc, /var or /usr in any of the tests. So it
runs bare, like the transcribe suite.

First measurement through it: pacman_hook_stall_usage.sh is 1/1 = 100.00%.
That denominator is honest, not broken -- the lib is a single usage() whose
body is one `cat <<EOF` heredoc plus `exit 0`, and heredoc content is data
rather than statements.

16 of the 22 libs there still have no tests at all. That is now the largest
block of real test-writing work left in the campaign.

Also rewrites NEXT_SESSION_PROMPT.md, whose central claim ("the instrument is
the bottleneck, not the tests") stopped being true this session. The new one
leads with re-measuring the 103 allowlisted libs on the fixed instrument
before writing any new test.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-22 14:40:31 +02:00

40 lines
2.8 KiB
JSON

{
"intent": "Give linux_configuration/scripts/single_use/fixes/lib a run_all.sh so its six already-tested libs become measurable by the coverage gate, which measures through a suite runner and not through single test files.",
"scope": [
"linux_configuration/scripts/single_use/fixes/lib/tests/run_all.sh - new suite runner",
"NEXT_SESSION_PROMPT.md - rewritten; the instrument is no longer the bottleneck",
"Non-goal: writing tests for the 16 fixes/lib libs that have none",
"Non-goal: clearing any lib off the allowlist"
],
"changes": [
"run_all.sh follows the transcribe suite's shape: iterate test_*.sh in one process tree, count failures, exit non-zero if any failed.",
"Deliberately no jail_args file beside it. The harness confines every write to its own `mktemp -d` and intercepts external commands with a PATH stub dir, and grep found no absolute writes to /etc, /var or /usr in any test, so the suite runs bare rather than inside the namespace jail.",
"Corrects the previous handoff, which recorded fixes/lib as having 'no harness at all'. It already had 8 test files and 2 harnesses; the missing piece was the runner that is_covered() builds as its subject."
],
"verification": [
{
"command": "timeout 300 bash linux_configuration/scripts/single_use/fixes/lib/tests/run_all.sh",
"result": "pass",
"evidence": "All 8 test files pass through the runner, ending 'All fixes lib test files passed.' -- e.g. pacman_hook_stall_usage 4 passed 0 failed, pacman_hook_stall_watch 5 passed 0 failed."
},
{
"command": "shell_coverage_jail.sh --subject fixes/lib/tests/run_all.sh --measure pacman_hook_stall_usage.sh --min 1 --fail-on-case-error",
"result": "pass",
"evidence": "1/1 lines = 100.00%. The lib is a single usage() whose body is one `cat <<EOF` heredoc plus `exit 0`; heredoc content is data, not statements, so a denominator of 1 is the honest reading. Its one off-set line is the `usage() {` declaration -- the benign class."
},
{
"command": "grep -rn '>[[:space:]]*/etc|>[[:space:]]*/var|>[[:space:]]*/usr' fixes/lib/tests/*.sh",
"result": "pass",
"evidence": "No matches, confirming the suite writes nothing outside its mktemp -d and so needs no jail_args."
}
],
"risks": [
"16 of the 22 libs in fixes/lib still have no tests, so the runner unblocks measurement for 6 libs rather than all 22.",
"This suite is noticeably slower under the jail than the features suite, because the watch_forever tests exercise timing loops; a future --all sweep should expect that."
],
"rollback": [
"git revert this commit, or delete tests/run_all.sh; the eight test files remain runnable individually and nothing else references the runner yet.",
"After rollback, confirm the individual test files still pass by running one directly."
]
}