Skip to content

Commit 66701ff

Browse files
committed
fix(ci): version_check via env var — unblocks acl2/hol4 cron cells (#75)
Both Smoke-check and Stub-sentinel-detection steps in container-ci.yml template `matrix.version_check` directly inside outer single quotes: -c '${{ matrix.version_check }}' For acl2 (`echo '(acl2::quit)' | acl2 …`) and hol4 (`echo '(* quit *);' | hol …`), the embedded `'` closes the outer string and bash fails parsing with `syntax error near unexpected token '('`. The cell exits 2 before the inner shell ever runs — `|| true` cannot rescue it because the outer parse fails first. Confirmed root cause of the persistent acl2 + hol4 reds in the weekly Container Build Verification cron since a87fae1 (2026-04-27); same defect was inherited by #157 when it added the Stub-sentinel step on 2026-05-31. Six consecutive cron runs show the same two cells red. Fix: pass `version_check` through a job-step `env:` block as `VERSION_CHECK` and dereference with `-c "$VERSION_CHECK"`. The outer shell now sees a clean double-quoted variable expansion; the inner `/bin/sh -c` receives the literal command with its single quotes intact. The same shape applied to both steps so the fix is uniform. Side benefit: defends both steps against any future `version_check` matrix entry containing single quotes, parens, or other shell metacharacters. Caveat documented inline: matrix values must not embed literal `$`-prefixed shell variables that would expand at the runner level. Closes the longest-standing wave3 container-cron red and lets #157's stub-sentinel detection function across all 8 matrix cells instead of 6. Refs #75, refs #157.
1 parent 78a65dc commit 66701ff

1 file changed

Lines changed: 12 additions & 2 deletions

File tree

.github/workflows/container-ci.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,10 +174,18 @@ jobs:
174174
run: |
175175
podman run --rm "${{ matrix.image }}" --version
176176
177+
# version_check is passed via env to avoid the YAML→outer-shell→inner-sh
178+
# single-quote nesting trap: for acl2 (`echo '(acl2::quit)' | acl2 …`) and
179+
# hol4 (`echo '(* quit *);' | hol …`), the inline `-c '${{ matrix.version_check }}'`
180+
# form lets the embedded `'` close the outer string and the bash parser
181+
# fails with "syntax error near unexpected token `('". Confirmed root-cause
182+
# of the persistent acl2/hol4 cron red since 2026-04-27 (a87fae12).
177183
- name: Smoke-check ${{ matrix.prover }} binary
184+
env:
185+
VERSION_CHECK: ${{ matrix.version_check }}
178186
run: |
179187
podman run --rm --entrypoint /bin/sh "${{ matrix.image }}" \
180-
-c '${{ matrix.version_check }}'
188+
-c "$VERSION_CHECK"
181189
182190
# #75: the per-prover version_check above uses `|| true` for several
183191
# backends because tools like metamath / hol4 / acl2 exit non-zero on
@@ -188,10 +196,12 @@ jobs:
188196
# output verbatim, and fails LOUDLY on any stub sentinel — turning the
189197
# silent degradation into a visible weekly red.
190198
- name: Stub-sentinel detection (#75)
199+
env:
200+
VERSION_CHECK: ${{ matrix.version_check }}
191201
run: |
192202
set +e
193203
OUTPUT=$(podman run --rm --entrypoint /bin/sh "${{ matrix.image }}" \
194-
-c '${{ matrix.version_check }}' 2>&1)
204+
-c "$VERSION_CHECK" 2>&1)
195205
echo "--- version_check output ---"
196206
echo "$OUTPUT"
197207
echo "--- end ---"

0 commit comments

Comments
 (0)