-
Notifications
You must be signed in to change notification settings - Fork 177
feat(preflight): add an opt-in Bash version probe #1585
Copy link
Copy link
Open
Labels
P3Low-risk cleanup, docs, polish, ergonomics, or speculative feature.Low-risk cleanup, docs, polish, ergonomics, or speculative feature.clawsweeper:bulk-filedClawSweeper detected a high recent issue-filing volume from this author.ClawSweeper detected a high recent issue-filing volume from this author.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.This issue has meaningful maintainer-visible impact outside the owned taxonomy.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Description
Activity
Metadata
Metadata
Assignees
Labels
P3Low-risk cleanup, docs, polish, ergonomics, or speculative feature.Low-risk cleanup, docs, polish, ergonomics, or speculative feature.clawsweeper:bulk-filedClawSweeper detected a high recent issue-filing volume from this author.ClawSweeper detected a high recent issue-filing volume from this author.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.This issue has meaningful maintainer-visible impact outside the owned taxonomy.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Type
Fields
Priority
None yet
Summary
Add
bashas an opt-in name accepted by--preflight-toolsandrun.preflightToolson POSIX and WSL2 targets. Report the resolved Bash version in Crabbox's normalized pre-command capability snapshot without installing Bash or changing the workload.Problem to solve
Crabbox can report Go, Cargo, Make, CMake, Python, and JavaScript tool versions, but it cannot report the Bash version used by shell tests and build scripts. Exact current
mainrejects the conventional command name before provider work:The provider inventory remains empty after the rejection.
This matters when a project depends on Bash behavior rather than generic POSIX shell syntax. During a clean
mvdan/shv3.14.0 verification, host-confirmation tests disagreed between macOS and Linux builds of Bash 5.3.9. The clean runner had to printbash --versionfrom an uploaded script because the requested preflight probe was unavailable. A version result would not replace behavioral tests, but it would bind their outcome to the actual shell runtime instead of leaving that runtime implicit.Crabbox's POSIX capability snapshot itself currently invokes
bash -lc. A host without Bash therefore produces a generic preflight failure before any per-tool result can identify the missing prerequisite.Proposed behavior
bashas an opt-in built-in preflight name on Linux, macOS, and WSL2.bash --versioncommand and report its first bounded output line when present.bashout of the default probe list.The missing-command behavior must account for the current Bash-dependent POSIX preflight wrapper. A requested Bash probe should not collapse into an unclassified
remote preflight failedmessage.Acceptance criteria
--preflight-tools bashvalidates on Linux, macOS, and WSL2.run.preflightTools: [bash]accepts the same probe from repository and user configuration.bash --versionbefore the user command starts.default,bash,bashemits the ordinary default probes plus one Bash result.Affected area
internal/cli/run_observability.go.internal/cli/run_test.go.docs/commands/run.mdanddocs/observability.md.Non-goals
Alternatives considered
Print the version in every workload
An uploaded script can run
bash --version, but each workflow must recreate the check and parse its output. The result is absent from Crabbox's normalized preflight snapshot and cannot be selected throughrun.preflightTools.Probe
shThe
shcommand may resolve to Dash, Bash in a compatibility mode, BusyBox, or another implementation. It does not establish the Bash runtime used by a Bash test suite.Add Bash to the default set
Many workloads do not depend on Bash identity. An opt-in probe keeps the default output stable and follows the existing language and build-tool pattern.
Supporting context
v0.47.0at0a55378990265271f5830a465aa643605d7d41f3.main:905553ffd3999a1ccfc4ac9e1528169055cb3229.db3c2709501209966e1ad1c5beedfe41176978a66ea8d70e0831aafeb090a999.go1.26.5 darwin/arm64.The complete seven-commit range from the release baseline through exact current
main, the complete live open-issue and open-pull-request corpora, every open issue authored bycoygeek, and relevant closed issues and merged pull requests were checked. No current item adds or requests a Bash version preflight probe.Closed issue #1243 and merged pull request #1347 added the literal Python probes. Closed issue #1394 and merged pull request #1402 added the analogous CMake probe. Those changes establish the opt-in literal-command pattern while keeping unknown names fail-closed before acquisition, but neither covers Bash.