Commit 66ad7e5
fix(ci): repair aspect_tests.sh grep-count bash bug (baseline rot)
`Aspect — Thread Safety + ABI Contract + SPDX` has been red on `main`,
gating every PR on these lines:
tests/aspect_tests.sh: line 77: [[: 0
0: syntax error in expression (error token is "0")
Root cause: `grep -c 'pattern' file 2>/dev/null || echo "0"`. When
`grep -c` finds zero matches it outputs `0` to stdout **and** exits
non-zero, which then triggers `|| echo "0"` — `has_export` ends up
`"0\n0"`, and `[[ "0\n0" -gt 0 ]]` chokes on the embedded newline in
arithmetic context. Swapped the `|| echo "0"` for `|| true` on all
four call-sites; `grep -c` already prints `0` cleanly, the `|| true`
just suppresses the exit code for `set -euo pipefail`.
Verification: `bash -n tests/aspect_tests.sh` clean.
(The companion `.github/workflows/e2e.yml` fix — Zig 0.15.0 → 0.15.1
and the `denoland/setup-deno` SHA refresh — is held out because the
current OAuth token lacks the `workflow` scope GitHub requires for
workflow-file edits. Will land separately once the token is rotated
or via a token with the right scope.)
Out of scope and deliberately not touched:
- `governance / Language / package anti-pattern policy` — also red
on main, but a parallel session is already diagnosing it under the
Estate-drift-remediation 2026-05 campaign (parent standards#66).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 1e60f60 commit 66ad7e5
1 file changed
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
75 | | - | |
| 74 | + | |
| 75 | + | |
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
98 | | - | |
99 | | - | |
| 98 | + | |
| 99 | + | |
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
| |||
0 commit comments