Skip to content

feat(host-tools): write mise env variables, and ones below the home directory - #190

Merged
Mearman merged 2 commits into
mainfrom
feat/mise-env-table
Nov 3, 2026
Merged

Mearman merged 2 commits into
mainfrom
feat/mise-env-table

Conversation

@Mearman

@Mearman Mearman commented Nov 3, 2026

Copy link
Copy Markdown
Member

Adds an env table to github_runner_host_tools_mise_config and github_runner_host_tools_mise_env_home_relative for values that are a path below the user's home, so a fleet can manage TURBO_CACHE_DIR in mise's global config as well as in the shell startup files (#187).

mise renders an env value as a Tera template and then expands $VAR, with $$ as a literal dollar, so the role doubles $ and writes {{, {% and {# as the Tera expression that renders the brace. The home-relative form is written as {{ env.HOME }}/<path>. The path validation is the function the shell variant uses (absolute, empty, .. and a name in both mappings fail the run).

The tests read the rendered file back with a real mise env under a home directory whose name has a space, a quote and a dollar sign. The unit test job now installs a pinned mise release (older than a week, checked against its published checksum).

Fleet inventory:

github_runner_host_tools_mise_env_home_relative:
  TURBO_CACHE_DIR: .cache/turbo

…nfiguration back

The host tools tests render mise configuration and read it back with a real mise,
so the unit test job needs one on PATH. The release is more than a week old and is
checked against its published checksum before it is unpacked.
…irectory, to the fleet file

The global mise defaults gain an env table in github_runner_host_tools_mise_config, a variable
name to a string, number or boolean. mise renders a value as a Tera template and then expands
$VAR in the result, so the role doubles each dollar sign and writes a brace that would start a
template tag, expression or comment as the Tera expression that renders as that brace; every
value reaches the exported variable exactly as given, which the tests check by reading the
rendered file back with a real mise.

github_runner_host_tools_mise_env_home_relative maps a variable name to a path relative to the
user's home directory and writes it as mise's home template followed by the path, so a fleet
that gathers no facts can still set a value such as a shared cache directory. It shares the
path validation of github_runner_host_tools_shell_env_home_relative: an absolute, empty or ..
path, and a name given both as a plain value and as a path, fail the run before any file is
written. The mapping alone is enough to make the role write the file.
@Mearman
Mearman marked this pull request as ready for review November 3, 2026 12:39
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
🔒 Security Review ⚠️ Failed 2026-11-03T12:39:36.882761Z
We couldn’t complete this review. Comment @codex security review to try again.
1d94540 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

This security review couldn’t start because the paying account has exhausted its Codex allowance and has insufficient available credits. The payer can check their balance and add credits in the Codex usage dashboard, then try again. If you do not manage the paying account, contact this repository's admins.

@Mearman
Mearman merged commit 429a6e7 into main Nov 3, 2026
27 checks passed
@Mearman
Mearman deleted the feat/mise-env-table branch November 3, 2026 12:39
@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown

🎉 This PR is included in version 2.25.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant