fix(audits): run on bash 3.2 — mapfile and declare -A retired from the gate scripts - #29
Merged
Merged
Conversation
…om the gate scripts Mirrored from agentsfleet cb5c1e6f5: eleven mapfile sites and one associative array made every materialised gate unable to run on a machine whose only bash is macOS's 3.2. Same while-read idiom the playbook runner already documents; behaviour identical. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01A5YvktdMxgWFA718hFMF7n
…e Zig loop
macOS ships bash 3.2 and every gate script is `#!/usr/bin/env bash`, so two
constructs aborted audits on a stock Mac.
- dispatch/lib.sh: DISPATCH_GLOSS was `declare -A`, bash 4+. It is now a
heredoc string of the same `[CODE]="Gloss"` lines, looked up by parameter
expansion — no fork per finding. The line shape is load-bearing:
evals/dispatch/coverage.sh greps lib.sh for it in checks (f) and (g), and
both still pass, so the map stays byte-comparable with RULES.md.
- audits/logging.sh: the `scoped_eligible` loop expanded "${zig_nontest[@]}"
unguarded. Under `set -u`, bash 3.2 treats an empty array expansion as
unbound (fixed only in 4.4), so the audit died with `zig_nontest[@]:
unbound variable` in any repository with no Zig sources — the Rust
repository that found this. Now guarded like its five sibling loops.
Verified under /bin/bash 3.2.57: every audits/*.sh and dispatch/*.sh runs to
completion, dispatch_gloss resolves known and unknown codes, and
evals/dispatch/coverage.sh reports ALL CHECKS PASSED.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014zKP6T6yddUB5xaxNPrpR1
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
macOS ships bash 3.2, and the gate scripts used
mapfileanddeclare -A, both bash 4+. Every eval and every pre-pushmake auditdied at the first one on a developer machine, so the audit only ever really ran in CI on ubuntu.mapfile -tbecomes awhile readloop; the gloss map becomes a case-based lookup; the Zig loop is guarded. Behaviour is unchanged on bash 5.Verified on macOS bash 3.2:
make auditgreen (fixture evals 43/43, parity 5/5, ledger 23/23).🤖 Generated with Claude Code
https://claude.ai/code/session_01BSLUVqAJkk9Yj3TfSC3U2Z