Context
Found by the repo-wide /code-tidying:batch-simplify sweep (62 groups / 986 files, branch claude/repo-code-tidying-batch-twhddw). The sweep's doctrine files latent defects instead of fixing them mid-sweep, because the fix changes observable behavior; this issue is that filing.
Several scripts expand possibly-empty arrays as bare "${arr[@]}" under set -u, which aborts with an unbound-variable error on bash 4.0-4.3 while the rest of the repo uses the ${arr[@]+"${arr[@]}"} guard. Worst case: plugins/work-items/scripts/backfill-capability-tier-labels.sh:44-47,62,69,135 (repo_args=() expanded while empty). Also: plugins/repo-hygiene git-tree-reset-batch.sh + git-tree-reset.sh (8 sites), scripts/check-changed-skills.sh:133, scripts/check-changelog-parity.sh:587 (+siblings).
Proposed work
- Convert the listed sites to the house
${arr[@]+"${arr[@]}"} idiom (or declare the supported-bash floor repo-wide and close as wontfix).
Acceptance criteria
References
plugins/work-items/scripts/backfill-capability-tier-labels.sh:44
plugins/repo-hygiene/skills/clean/scripts/git-tree-reset-batch.sh
scripts/check-changed-skills.sh:133
scripts/check-changelog-parity.sh:587
Filed by the /code-tidying:batch-simplify closeout (Phase 8).
Context
Found by the repo-wide
/code-tidying:batch-simplifysweep (62 groups / 986 files, branchclaude/repo-code-tidying-batch-twhddw). The sweep's doctrine files latent defects instead of fixing them mid-sweep, because the fix changes observable behavior; this issue is that filing.Several scripts expand possibly-empty arrays as bare
"${arr[@]}"underset -u, which aborts with an unbound-variable error on bash 4.0-4.3 while the rest of the repo uses the${arr[@]+"${arr[@]}"}guard. Worst case:plugins/work-items/scripts/backfill-capability-tier-labels.sh:44-47,62,69,135(repo_args=()expanded while empty). Also:plugins/repo-hygienegit-tree-reset-batch.sh + git-tree-reset.sh (8 sites),scripts/check-changed-skills.sh:133,scripts/check-changelog-parity.sh:587(+siblings).Proposed work
${arr[@]+"${arr[@]}"}idiom (or declare the supported-bash floor repo-wide and close as wontfix).Acceptance criteria
References
plugins/work-items/scripts/backfill-capability-tier-labels.sh:44plugins/repo-hygiene/skills/clean/scripts/git-tree-reset-batch.shscripts/check-changed-skills.sh:133scripts/check-changelog-parity.sh:587Filed by the /code-tidying:batch-simplify closeout (Phase 8).