From 35b50ae693121879bda685e6671ccc39cf9d2450 Mon Sep 17 00:00:00 2001 From: Jean-Paul van Ravensberg <14926452+DevSecNinja@users.noreply.github.com> Date: Mon, 16 Nov 2026 11:20:20 +0100 Subject: [PATCH 1/2] test(lint): guard the full mise install that gives pipx tools their Python A caller that configures Python (for example via .python-version) needs that Python installed before any pipx: tool. Since #239 every lint.yml job runs a full `mise install`, which orders Python first and installs none when the caller configures none. Releases up to v2.0.x scoped installs to `uv pipx:` and fail with "requires configured install dependency 'python@3.14'". Fail the lint job-mode contract test when any mise-action step drops `install: true` or reintroduces install_args, and document the behaviour. Closes #502 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- docs/architecture.md | 8 +++++++ tests/lint-job-modes-contract.sh | 39 ++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+) diff --git a/docs/architecture.md b/docs/architecture.md index c8f4b88a..ade528ee 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -74,6 +74,14 @@ requires per-linter checks to `single`, require `all linters` instead — skippe per-linter jobs report success. See [ADR 0010](design-decisions/0010-batch-renovate-updates-to-save-actions-minutes.md). +**Tool installation.** Every job runs a full `mise install` of the caller's +mise config, never a per-linter subset. The `pipx:` tools (yamllint, checkov) +depend on Python, so when the caller configures one (for example through +`.python-version` and `idiomatic_version_file_enable_tools = ["python"]`), mise +installs that Python first. Callers without a configured Python get no Python +download. Releases up to v2.0.x installed only `uv pipx:` and fail for +callers that configure Python; v2.1.0+ fixes this. + | Input | Description | | ----------------------- | ---------------------------------------------------------------------- | | `mise-version` | **Required.** mise version to install. | diff --git a/tests/lint-job-modes-contract.sh b/tests/lint-job-modes-contract.sh index 2a953ccb..e3c60639 100755 --- a/tests/lint-job-modes-contract.sh +++ b/tests/lint-job-modes-contract.sh @@ -167,4 +167,43 @@ for job in "${linter_jobs[@]}"; do fail "${combined_job} never checks inputs.lint-${job}" done +# Every mise-action step installs the caller's whole mise toolset. A scoped +# install such as `install_args: "uv pipx:yamllint"` skips a Python the caller +# configures (for example through `.python-version`), and mise then refuses the +# pipx tool: "requires configured install dependency 'python@…', but its +# selected version is not installed" (#502). A full `mise install` orders +# Python before the pipx tools, and installs no Python when none is configured. +mise_steps="$( + awk ' + function flush() { + if (is_mise) print job "|" has_install "|" has_args + is_mise = 0 + } + /^ [A-Za-z0-9_-]+:[[:space:]]*$/ { + flush() + job = $0 + sub(/^ /, "", job) + sub(/:[[:space:]]*$/, "", job) + next + } + /^ - / { flush(); has_install = 0; has_args = 0 } + /uses: jdx\/mise-action@/ { is_mise = 1 } + /^ install: true[[:space:]]*$/ { has_install = 1 } + /^ install_args:/ { has_args = 1 } + END { flush() } + ' "${workflow}" +)" +mise_count=0 +while IFS='|' read -r job has_install has_args; do + [ -n "${job}" ] || continue + [ "${has_install}" = 1 ] || fail "job ${job}: jdx/mise-action must set 'install: true'" + [ "${has_args}" = 0 ] || + fail "job ${job}: jdx/mise-action must not set install_args; scoped installs skip the caller's Python that pipx tools need (#502)" + mise_count=$((mise_count + 1)) +done <<<"${mise_steps}" +for job in yamllint checkov "${combined_job}"; do + grep -q "^${job}|" <<<"${mise_steps}" || fail "job ${job} runs a pipx tool but has no jdx/mise-action step" +done + echo "✓ lint.yml: ${#linter_jobs[@]} linters, ${compared} run scripts identical across parallel and single-job modes." +echo "✓ lint.yml: ${mise_count} mise-action steps install the caller's full toolset (pipx tools get their Python)." From c00a86491d7bceca580924893e0806a67a49a8bf Mon Sep 17 00:00:00 2001 From: Jean-Paul van Ravensberg <14926452+DevSecNinja@users.noreply.github.com> Date: Mon, 16 Nov 2026 11:29:07 +0100 Subject: [PATCH 2/2] test(lint): catch quoted install_args keys in the mise-action contract Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- tests/lint-job-modes-contract.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/lint-job-modes-contract.sh b/tests/lint-job-modes-contract.sh index e3c60639..bcb7eb93 100755 --- a/tests/lint-job-modes-contract.sh +++ b/tests/lint-job-modes-contract.sh @@ -188,8 +188,9 @@ mise_steps="$( } /^ - / { flush(); has_install = 0; has_args = 0 } /uses: jdx\/mise-action@/ { is_mise = 1 } - /^ install: true[[:space:]]*$/ { has_install = 1 } - /^ install_args:/ { has_args = 1 } + /^ ["'\'']?install["'\'']?[[:space:]]*:[[:space:]]*["'\'']?true["'\'']?[[:space:]]*(#.*)?$/ { has_install = 1 } + # Any non-comment mention, so quoted keys and flow mappings count too. + /^[^#]*install_args/ { has_args = 1 } END { flush() } ' "${workflow}" )"