Skip to content

Update claude configs#12

Merged
khirotaka merged 2 commits into
mainfrom
update-claude-configs
May 10, 2026
Merged

Update claude configs#12
khirotaka merged 2 commits into
mainfrom
update-claude-configs

Conversation

@khirotaka

@khirotaka khirotaka commented May 10, 2026

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • Chores
    • Updated package installation workflow for remote development environments.

Review Change Stack

@coderabbitai

coderabbitai Bot commented May 10, 2026

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

The script switches the remote code installation path from manual Go toolchain setup (installing golangci-lint and gopls via Go 1.26) to declarative mise-based tool and dependency management with mise trust and mise install commands.

Changes

Dependency Installation Refactoring

Layer / File(s) Summary
Remote Installation with mise
.claude/scripts/install_pkgs.sh
The remote code path replaces Go-module download and Go 1.26 toolchain-based installation of golangci-lint and gopls with mise trust and mise install, then exits immediately.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 Hop hop, the tools have changed their way,
From Go-lang's path, now mise holds sway,
Trust and install with a simpler call,
mise takes the reins, simplifying it all! 🎯

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'Update claude configs' is vague and overly broad. It does not clearly indicate what specific configuration was updated or why, failing to convey the main change (updating install script behavior for CLAUDE_CODE_REMOTE mode). Provide a more specific title that describes the actual change, such as 'Update install script to use mise when CLAUDE_CODE_REMOTE is enabled' or 'Replace Go tooling setup with mise for remote code environments'.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch update-claude-configs

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.claude/scripts/install_pkgs.sh:
- Around line 10-11: The script currently runs "mise trust" and "mise install"
which can hang or fail if mise isn't installed or if trust prompts require a
TTY; update the bootstrap to first check for the mise binary (use command -v or
which to fail fast with a clear error), then pre-trust local configs by calling
mise trust for the repo config(s) (e.g., mise trust .mise.toml and/or mise trust
<repo-dir>) in non-interactive mode before running mise install, and ensure the
script exits non-zero if mise is missing or trust/install fail; look for the
literal commands "mise trust" and "mise install" in the script to locate where
to add the checks and pre-trust calls.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: d1272c47-934f-4235-bae2-1abeaf54d865

📥 Commits

Reviewing files that changed from the base of the PR and between 05a869b and a8a1d13.

📒 Files selected for processing (2)
  • .claude/scripts/install_pkgs.sh
  • .claude/scripts/lint_fix.sh

Comment on lines +10 to +11
mise trust
mise install

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

❓ Verification inconclusive

Script executed:

#!/usr/bin/env bash
set -euo pipefail

# Verify whether mise exists and whether trust supports non-interactive flags.
if ! command -v mise >/dev/null 2>&1; then
  echo "mise_not_found"
  exit 0
fi

mise --version
mise trust --help | sed -n '1,160p'

Repository: khirotaka/omakase


Repository: khirotaka/omakase
Exit code: 0

stdout:

mise_not_found


Script executed:

cat -n .claude/scripts/install_pkgs.sh

Repository: khirotaka/omakase


Repository: khirotaka/omakase
Exit code: 0

stdout:

     1	#!/usr/bin/env bash
     2	set -euo pipefail
     3	
     4	if [ "${CLAUDE_CODE_REMOTE:-}" != "true" ]; then
     5	  exit 0
     6	fi
     7	
     8	cd "$CLAUDE_PROJECT_DIR"
     9	
    10	mise trust
    11	mise install
    12	exit 0


mise trust command non-interactive flags documentation


For mise (mise-en-place), the “trust” subcommand documents these flags (there is no documented interactive prompt flag specific to mise trust; non-interactive behavior is handled by the global --yes / MISE_YES=1 setting for trust prompts): 1) mise trust flags (from the official docs) - -a, --all: Trust all config files in the current directory and its parents. [1] - --ignore: Do not trust this config and ignore it in the future. [1] - --show: Show the trusted status of config files from the current directory and its parents; does not trust/untrust anything. [1] - --untrust: No longer trust this config; will prompt in the future. [1] Usage shown in the docs: - mise trust [FLAGS] [CONFIG_FILE] [1] 2) Non-interactive approval of trust prompts (global “yes-to-all”) - A recent change aligns config-trust prompting with the documented --yes / MISE_YES=1 “answer yes to all confirmation prompts” behavior: when the global yes setting is enabled, config trust validation auto-accepts the “config files are not trusted” prompt, avoiding interactive blocking. [2] Practical implication for non-interactive scripts: - Use MISE_YES=1 or --yes so any “untrusted config” prompt is automatically accepted, instead of waiting for user input. [2] - For explicitly avoiding trust entirely, use mise trust --ignore <config> (or --show/--untrust as needed). [1]

Citations:


mise CLI trust command behavior headless environments


In mise, the “trust” model is specifically about whether mise will parse certain config features (env vars, templates, and path: plugin versions) from config files that are considered trusted. The trust prompt can become an issue in headless/non-interactive environments because it may require user confirmation unless you pre-seed trust in a supported way. 1) What mise trust actually does (interactive vs non-interactive) - mise trust [CONFIG_FILE] marks a config file as trusted, enabling parsing of potentially dangerous features (environment variables, templates, and path: plugin versions) [1]. - The CLI implementation supports non-interactive “show” and “untrust” modes via flags: - --show reports trusted/untrusted status without changing anything [1]. - --ignore marks a config as not trusted and ignores it in the future [1]. - --untrust removes trust (and “will prompt in the future”) [1]. - -a/--all iterates and trusts multiple config files in the current directory and its parents [1]. - The core implementation selects which config file(s) to trust (including walking through untrusted configs when --all is used) and then calls the trust function for each [2]. 2) Why headless environments can still prompt - If a config file is untrusted, mise emits an error telling you to trust it with mise trust [3]. This is problematic in CI/Docker/headless flows where there is no TTY to answer prompts. - In other words: unless you either (a) run mise trust ... ahead of time, or (b) ensure mise considers the config trusted via its supported trust controls, you can still get blocked when untrusted configs are encountered (e.g., during activation/hook-env). 3) Supported non-interactive approaches (trust seeding) A) Run mise trust explicitly during image/build time (recommended) - A maintainer-recommended Docker/non-interactive approach is to run something like RUN mise trust /app/mise.toml during the container build so the runtime user/state already has the trust recorded [3]. B) Pre-configure trusted directories/paths via MISE_TRUSTED_CONFIG_PATHS - mise supports pre-trusting using MISE_TRUSTED_CONFIG_PATHS (intended to avoid per-config interactive trust prompts). Users report that setting it in the execution environment works for trusting the desired directory scope [3]. - However, there are subtleties: discussions indicate that trying to configure trust via certain local/project settings may not behave as expected; the advice in the discussion is to use explicit mechanisms like the environment variable or explicit mise trust in non-interactive contexts [3]. C) Use --yes / MISE_YES=1 to auto-approve trust prompts (with important caveats) - mise has logic to respect the global “yes to all prompts” setting for config trust validation: when the yes setting is enabled, trust_check() short-circuits and auto-accepts the “config files are not trusted” confirmation prompt [4]. - There is evidence that this is intended to avoid interactive blocking when --yes/MISE_YES=1 is used [4]. - But in practice, there are caveats in how/when “yes” is applied. For example, an issue/discussion reports that MISE_YES=1 and even --yes can still prompt for “exec config trust prompts” in some cases (e.g., mise exec) [5]. So you should not rely on --yes universally for headless flows; prefer explicit trust seeding (A/B). 4) Key behavior with shell activation / hook-env in headless environments - mise’s “activation” affects shell PATH / hooks, and there is documented guidance for non-interactive/CI setups: use shims or mise exec rather than relying on prompt-driven PATH updates [6]. - There’s also an “activation inconsistency” discussion describing how untrusted config errors can appear during hook/env phases, and explicitly recommends explicit trust mechanisms for Docker/non-interactive setups (run mise trust ... or set MISE_TRUSTED_CONFIG_PATHS) [3]. Practical recommendation for headless/CI/Docker - Do: run mise trust during the build for the config file(s) you will use [3], or export MISE_TRUSTED_CONFIG_PATHS in the runtime environment so the configs under that directory scope are treated as trusted [3]. - Avoid relying solely on MISE_YES=1 / --yes for trust prompts, because reports indicate it may not cover all “exec config trust prompts” scenarios [5].

Citations:


Harden remote bootstrap against untrusted config and missing dependency.

Lines 10–11 can fail or hang in headless environments if mise is missing or if config files are untrusted (and no TTY is available to respond to trust prompts). Add a dependency check and pre-trust the config file.

The patch below uses mise trust to explicitly mark the config as trusted during bootstrap, which is the documented approach for non-interactive/Docker environments:

💡 Proposed patch
-cd "$CLAUDE_PROJECT_DIR"
+cd "${CLAUDE_PROJECT_DIR:?CLAUDE_PROJECT_DIR is not set}"
 
-mise trust
+if ! command -v mise >/dev/null 2>&1; then
+  echo "Error: 'mise' is required but not installed." >&2
+  exit 1
+fi
+
+# Pre-trust config to avoid interactive prompts in headless environments
+mise trust ~/.config/mise.toml 2>/dev/null || true
 mise install
 exit 0

If .mise.toml or other local configs exist in the project, include them: mise trust .mise.toml as well.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.claude/scripts/install_pkgs.sh around lines 10 - 11, The script currently
runs "mise trust" and "mise install" which can hang or fail if mise isn't
installed or if trust prompts require a TTY; update the bootstrap to first check
for the mise binary (use command -v or which to fail fast with a clear error),
then pre-trust local configs by calling mise trust for the repo config(s) (e.g.,
mise trust .mise.toml and/or mise trust <repo-dir>) in non-interactive mode
before running mise install, and ensure the script exits non-zero if mise is
missing or trust/install fail; look for the literal commands "mise trust" and
"mise install" in the script to locate where to add the checks and pre-trust
calls.

@khirotaka khirotaka merged commit 2afd6bc into main May 10, 2026
6 checks passed
@khirotaka khirotaka deleted the update-claude-configs branch May 10, 2026 04:42
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.

1 participant