testsAndMisc/docs/superpowers/evidence/split-shfmt-conformance-2026-08-16.json
Krzysztof kuhy Rudnicki 1b19808edb Keep this session's splits shfmt-clean
analyze_repo.sh was shfmt-clean at 133fccf and my split made it dirty
(a double blank line). Fixed with shfmt -w, then restored the STEP 1
comment banner shfmt -w also stripped -- all eight banners re-counted.

The three new shell_check libs inherited their parent's 2-space
indentation; as new files they have no prior style to preserve, so they
are now tabs like shfmt wants.

Context for the exit code: 157 of 298 linux_configuration shell files
already fail shfmt at 133fccf. shfmt is not in .pre-commit-config.yaml
and there is no .editorconfig, so run_linters exiting 1 on the full tree
is the repo's standing state, not a regression here. Scoped this commit
to what these splits touched rather than reformatting 157 files.

Also closes the risk left open in a84556a: run_linters now verified
directly over the three new libs -- all six passes PASS, exit 0 -- with
install_linters never invoked, so decision 6 holds. That is the path
.github/workflows/shell-check.yml runs.

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

53 lines
3.6 KiB
JSON

{
"intent": "Stop this session's splits from adding new shfmt violations, after discovering that analyze_repo.sh went from shfmt-clean to shfmt-dirty when it was split.",
"scope": [
"linux_configuration/scripts/single_use/utils/analyze_repo.sh",
"linux_configuration/scripts/meta/lib/shell_check_{discover,install,lint}.sh",
"Non-goal: the 157 pre-existing shfmt-dirty files, and shell_check.sh itself, which was already dirty at 133fccf"
],
"changes": [
"Ran shfmt -w on analyze_repo.sh to remove the double blank line the split introduced, then restored the STEP 1 comment banner that shfmt -w also stripped, so all eight STEP banners are intact.",
"Ran shfmt -w on the three new shell_check libs, converting them from the 2-space indentation they inherited from their parent to shfmt's default tabs. They are new files, so there is no prior style to preserve."
],
"verification": [
{
"command": "shfmt -d on the four files",
"result": "pass",
"evidence": "No diff for analyze_repo.sh or any of the three shell_check libs. Before this commit, analyze_repo.sh was the only file this session made newly dirty: a check against 133fccf confirmed it was clean there and shell_check.sh was already dirty there."
},
{
"command": "count of shfmt-dirty .sh files at 133fccf",
"result": "pass",
"evidence": "157 of 298. This establishes that run_linters exiting 1 on the full tree is the repository's pre-existing state and not a regression from these splits; shfmt is not in .pre-commit-config.yaml and there is no .editorconfig, so the default tab style has never been enforced."
},
{
"command": "shellcheck over every file this session touched",
"result": "pass",
"evidence": "Zero findings. Reformatting did not reintroduce any of the SC2034 / SC2154 / SC2086 / SC2153 findings cleared earlier."
},
{
"command": "stubbed end-to-end run of analyze_repo.sh against a fixture repo, artifacts diffed against the 133fccf run",
"result": "pass",
"evidence": "Exit 0, and every artifact except the binary cscope index is byte-identical to the pre-split original. Re-run after reformatting to confirm shfmt -w changed no behaviour."
},
{
"command": "bash scripts/meta/shell_check.sh --skip-install --list-only --verbose | grep -c '^ - '",
"result": "pass",
"evidence": "321, unchanged after the libs were reformatted."
},
{
"command": "run_linters exercised directly over the three shell_check libs, with install_linters never invoked",
"result": "pass",
"evidence": "All six passes (shellcheck, shfmt, checkbashisms, bash -n, zsh -n, sh/dash -n) report PASS and run_linters exits 0. This verifies the CI path from .github/workflows/shell-check.yml, which was the outstanding risk recorded in the shell_check split's evidence."
}
],
"risks": [
"run_linters over the whole linux_configuration tree still exits 1, because of the 157 pre-existing shfmt-dirty files. That is unchanged by this commit and was true before this session started.",
"shfmt -w is a mechanical rewrite and removed a comment banner in analyze_repo.sh without being asked; the banner was restored by hand and all eight STEP headers were re-counted. Any future use of shfmt -w on a commented file deserves the same check."
],
"rollback": [
"git revert this commit; the four files return to their previous indentation and analyze_repo.sh regains the double blank line.",
"After rollback, re-run the fixture comparison to confirm analyze_repo.sh still exits 0, since the rollback touches formatting only."
]
}