test(ci): exercise the dsh identity probe with timeout missing (bash 3.2) - #422
Merged
Merged
Conversation
The bash 3.2 job added with #380 cannot reach dsh_banner_probe, which is the function #382 was filed against: this image ships `timeout`, so the optional-prefix array is never empty, and with no `dsh` binary anywhere on PATH the probe is not called at all. The fix landed in 1.28.2 with nothing guarding it, and the failure mode is a runtime abort under `set -u` that `bash -n` cannot see, which is precisely why the reporter had to find it by reading the source rather than by running anything. So call the probe directly, with `timeout` hidden behind a narrowed PATH, and refuse to pass if `timeout` is still reachable (a guard that silently stops exercising its branch is worse than no guard). Both directions are asserted: a real DeepSeek Harness banner is accepted, and Debian's unrelated `dsh` is refused, so the check covers the identity half too. Verified by reverting install.sh to the pre-fix expansion, where the step fails with the exact error from the issue, `runner[@]: unbound variable`. Refs #382 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Owner
Author
|
Merged, and shipping in 1.29.0: https://github.com/Ark0N/Codeman/releases/tag/codeman@1.29.0. The job log shows the step really runs on the bash 3.2 image ( |
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.
Closes the loop on #382, which was fixed in 1.28.2 with nothing guarding the fix.
Why the existing job does not cover it
The
install.sh runs on bash 3.2step added with #380 cannot reachdsh_banner_probeat all:bash:3.2image shipstimeoutat/usr/bin/timeout, so the optional-prefix array is never empty and the branch that aborts on macOS is never taken;dshbinary anywhere in the container, so_cli_candidate_oknever dispatches to the probe in the first place.And the failure is a runtime abort under
set -u, sobash -ncannot see it either. That combination is why the reporter had to find this by reading the source rather than by running anything, and it would let the same shape come back unnoticed.What this adds
A second
bash:3.2container in the same step that calls the probe directly withtimeouthidden behind a narrowedPATH:timeoutis still reachable, so the guard cannot quietly stop exercising its own branch;dsh(dancer's shell) is refused, which covers the identity half of the probe.No production code changes, no changeset: this adds coverage for behaviour that already shipped.
Verified
Ran the step's real
run:block, extracted from the YAML so the quoting is the quoting CI will use:Then reverted
install.shto the pre-fix expansion and ran it again, which fails with the exact error from the issue: