testsAndMisc/docs/superpowers/contracts/unity-handler-off-allowlist-2026-08-22.json
Krzysztof kuhy Rudnicki b91be3099d Clear unity_handler.sh: 100%, off the allowlist, 105 -> 104
The first allowlist removal of the campaign this session. unity_handler.sh
measures 32/32 = 100.00% through its directory's runner, and
check_shell_coverage.sh passes it with the exemption DELETED -- the real
gate, not just the measurement.

HARNESS BUG found getting there: bash caches executable locations in a hash
table, so `command -v foo` keeps succeeding after foo is removed from the
stub dir. Every "tool is missing" test was therefore running as a "tool is
present" test, asserting the opposite of its own name while looking
plausible. Reproduced minimally: after rm, STILL FOUND; after `hash -r`,
gone.

A _t_unstub helper now removes the stub and clears the table. The two suites
committed an hour ago had the same defect and are corrected here --
test_transcribe_pkgmgr.sh goes from 15 to 18 passing assertions, so three of
its checks had been vacuous. This is exactly the failure the campaign exists
to catch, found in its own test code.

`basename` joins the restricted PATH because the SUBJECT calls it; the suite
avoids needing `tail` via a parameter expansion instead, since every binary
in that PATH is one more thing a stub's shebang can trip over.

transcribe_deps.sh (92.31%) and transcribe_pkgmgr.sh (98.00%) re-measured
unchanged and stay on the allowlist.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016sxxsDHWgdRhmdmzNMA6XM
2026-08-22 13:20:54 +02:00

20 lines
2.0 KiB
JSON

{
"title": "Take unity_handler.sh off the shell-coverage allowlist at a measured 100%",
"objective": "Cover unity_handler.sh to 100% through its directory's runner and remove it from meta/shell-coverage-allowlist.txt -- the campaign's first removal this session -- while fixing the bash hash-cache defect that had made 'missing tool' assertions in the same directory vacuous.",
"acceptance_criteria": [
"unity_handler.sh measures 100.00% through tests/run_all.sh, the subject is_covered() builds, with --fail-on-case-error passing.",
"check_shell_coverage.sh passes for unity_handler.sh AFTER the allowlist entry is deleted -- the real gate, not just the measurement.",
"meta/shell-coverage-allowlist.txt drops from 105 to 104 entries and no entry is ever added.",
"Every 'tool is missing' assertion genuinely hides the tool: removal must clear bash's command hash table, or the assertion tests the opposite of its name.",
"The two suites committed earlier in the same directory are corrected for the same defect, and their assertion counts are re-verified rather than assumed.",
"The other two libs' measured figures are unchanged by the harness edit.",
"All three suites pass with 0 failures; shellcheck clean with no suppressions; all files within the 250-line cap."
],
"out_of_scope": [
"clean_audio_filters.sh and transcribe_venv.sh, the two libs in this directory still without suites.",
"Auditing every other suite in the repo for the same bare-`rm` unstub defect; it is recorded as a risk for a later sweep.",
"Any change to unity_handler.sh itself."
],
"verifier": "meta/scripts/shell_coverage_jail.sh --subject .../testsAndMisc-bash/lib/tests/run_all.sh --measure unity_handler.sh --min 100 --fail-on-case-error (expects 32/32 = 100.00%, exit 0), then bash meta/scripts/check_shell_coverage.sh on that path with the allowlist entry removed (expects exit 0), plus .../tests/run_all.sh reporting 15 + 18 + 18 assertions and 0 failures."
}