Skip to content

test(ci): exercise the dsh identity probe with timeout missing (bash 3.2) - #422

Merged
Ark0N merged 1 commit into
masterfrom
test/install-dsh-probe-bash32
Sep 14, 2026
Merged

Ark0N merged 1 commit into
masterfrom
test/install-dsh-probe-bash32

Conversation

@Ark0N

@Ark0N Ark0N commented Sep 14, 2026

Copy link
Copy Markdown
Owner

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.2 step added with #380 cannot reach dsh_banner_probe at all:

  • the bash:3.2 image ships timeout at /usr/bin/timeout, so the optional-prefix array is never empty and the branch that aborts on macOS is never taken;
  • there is no dsh binary anywhere in the container, so _cli_candidate_ok never dispatches to the probe in the first place.

And the failure is a runtime abort under set -u, so bash -n cannot 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.2 container in the same step that calls the probe directly with timeout hidden behind a narrowed PATH:

  • refuses to pass if timeout is still reachable, so the guard cannot quietly stop exercising its own branch;
  • asserts a real DeepSeek Harness banner is accepted;
  • asserts Debian's unrelated 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:

bash 3.2.57(1)-release: 10 CLIs, 0 found
bash 3.2.57(1)-release: skipping the AI CLI install menu continues
bash 3.2.57(1)-release: dsh identity probe survives a missing timeout

Then reverted install.sh to the pre-fix expansion and ran it again, which fails with the exact error from the issue:

/w/install.sh: line 446: runner[@]: unbound variable
BLOCK_EXIT=1

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>
@Ark0N
Ark0N merged commit e54a8b1 into master Sep 14, 2026
2 checks passed
@Ark0N

Ark0N commented Sep 14, 2026

Copy link
Copy Markdown
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 (dsh identity probe survives a missing timeout), which is the whole point of guarding a set -u abort that bash -n cannot see.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants