Skip to content

fix(ci): install claude-code via mise aqua backend, pin at 2.1.128 - #325

Closed
nsheaps wants to merge 9 commits into
mainfrom
fix/mise-claude-code-pin
Closed

fix(ci): install claude-code via mise aqua backend, pin at 2.1.128#325
nsheaps wants to merge 9 commits into
mainfrom
fix/mise-claude-code-pin

Conversation

@nsheaps

@nsheaps nsheaps commented Aug 11, 2026

Copy link
Copy Markdown
Owner

Summary

The test job's claude plugin validate step has been failing on main since #312/#309 with:

Error: claude native binary not installed.

Root cause: mise.toml pinned npm:@anthropic-ai/claude-code, but mise's npm backend passes --ignore-scripts=true by default. claude-code's npm package needs its postinstall script to run (it downloads/links the native binary), so the binary never landed — at any version, not just newer ones (an earlier comment here blamed 2.1.146+; disproven, same failure reproduced at 2.1.128 too).

Nothing enforced the documented "avoid 2.1.146+" pin either, so Renovate auto-bumped straight through it across three merged PRs: 2.1.128 → 2.1.201 → 2.1.204 → 2.1.205.

Confirmed pre-existing on main independent of #322 (unrelated PR, same CI symptom noted there).

Changes

  • mise.toml: switch claude-code from the npm: backend to mise's aqua: backend ("aqua:anthropics/claude-code" = "2.1.128"). This pulls the native binary directly from anthropics/claude-code GitHub releases — the same binary the official curl -fsSL https://claude.ai/install.sh | bash installer ships — with no npm package and no postinstall script involved at all. Drops the now-unneeded depends = "node" / allow_builds workaround.
  • renovate.json: add a packageRules entry disabling automatic updates for this dep (matchManagers: ["mise"], matchDatasources: ["github-tags"], matchDepNames: ["aqua:anthropics/claude-code"]), so getting past 2.1.128 again requires a deliberate manual bump + verification, not a silent Renovate PR.
  • Merged latest main in, which includes fix(review-utils): metrics write permission + fail run on missing metrics #322's fix for the AI Code Review metrics-permission bug (was showing as a failing check on this PR's earlier commits for an unrelated reason).

Test plan

  • test job's claude plugin validate step passes on this PR's CI
  • Renovate no longer opens auto-bump PRs for the aqua:anthropics/claude-code mise entry going forward

Generated by Claude Code

claude added 2 commits August 11, 2026 01:29
…ovate

The test job's `claude plugin validate` step has been failing on main with
"claude native binary not installed" since Renovate auto-bumped this dep
from 2.1.128 to 2.1.205 across three merged PRs. mise.toml's own comment
already documented "Avoid 2.1.146+ which ships a broken native-binary
install regardless" — nothing enforced it, so Renovate walked straight
through the ceiling.

Revert to the pinned-good 2.1.128 and add a renovate.json packageRule to
disable updates for this dep, so it takes a deliberate manual bump (with
verification) to move past the known-broken versions again.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012gUPPPteashVoJMa4cNDD6
…sion pin

My earlier commit on this branch reverted the claude-code version to 2.1.128
and blocked renovate, on the theory that 2.1.146+ broke native-binary
install. CI on this PR proved that wrong: 2.1.128 hit the identical
"claude native binary not installed" failure.

Actual cause: mise's npm backend passes --ignore-scripts=true by default,
so @anthropic-ai/claude-code's postinstall (which fetches the native
binary) never runs, at any version. `allow_builds` opts this package back
into running its own lifecycle scripts. Dropped the renovate block since
it was guarding against a version range that was never the problem.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012gUPPPteashVoJMa4cNDD6

nsheaps commented Aug 11, 2026

Copy link
Copy Markdown
Owner Author

Correction: my first commit here (reverting to 2.1.128 + blocking renovate) was based on the wrong diagnosis. CI on this PR proved it — 2.1.128 hit the identical "claude native binary not installed" failure, so the "2.1.146+ is broken" comment I trusted was itself wrong.

Real cause: mise's npm backend passes --ignore-scripts=true by default (security default), so @anthropic-ai/claude-code's postinstall — which fetches the platform-native binary — never runs, at any version. Pushed a follow-up commit that adds allow_builds = ["@anthropic-ai/claude-code"] to opt just this package back into running its own lifecycle scripts, and dropped the renovate block (no longer needed — the fix travels with any version, not just 2.1.128).

I don't have mise available locally to verify this end-to-end, so I'm relying on this PR's own CI to confirm. Watching for the result.


Generated by Claude Code

@nsheaps
nsheaps marked this pull request as ready for review August 11, 2026 02:23
nsheaps and others added 3 commits August 10, 2026 22:23
Skips the npm package entirely so there's no postinstall script for
mise's --ignore-scripts default to block, removing the need for
depends="node" + allow_builds. Same native binary, no npm involved.

Also adds the renovate.json packageRules guard that the PR description
already claimed existed but was never actually committed.
@nsheaps nsheaps changed the title fix(ci): pin claude-code back to 2.1.128, stop renovate re-bumping it fix(ci): install claude-code via mise aqua backend, pin at 2.1.128 Aug 11, 2026
nsheaps pushed a commit that referenced this pull request Aug 11, 2026
…ion-mode

Picks up the npm->aqua backend fix (#325) so this branch's own CI stops
hitting the same pre-existing 'claude native binary not installed'
failure while #325 is still unmerged.
claude and others added 3 commits August 11, 2026 03:03
The renovate.json packageRules entry set enabled: false, which stops
Renovate from ever proposing an update for this dep. That defeats the
actual intended workflow: pin to an exact version (already done by the
plain "2.1.128" string) so Renovate keeps proposing bump PRs, and use
each proposed PR's own CI run of `claude plugin validate` as the
validation gate before merging. Disabling the dep entirely removes the
mechanism meant to drive that validation.

Also drop the mise.toml comment's restated "Pinned to 2.1.128" — the
version is already the adjacent line's literal value; repeating it in
prose creates a second copy of the same fact that goes stale the next
time someone bumps the code line without also updating the comment.
Same fix as fix/review-agent-permission-mode (#327): mise-action fetches
whatever mise release is latest with no pin, and it silently picked up
2026.8.4, whose aqua backend fails installing aqua:anthropics/claude-code
(this branch's own fix) with "builder error: relative URL without a
base" -- a URL-construction bug in that release, reproduced deterministically,
not a transient failure.

Pins to 2026.8.3 (last known-good) via mise-action's version input on
all three jobs, tagged with a `# renovate:` annotation + customManagers
regex entry so Renovate proposes bump PRs against it same as any other
dependency.

Needed here too, not just #327: this PR's own CI was failing on the
exact same mise regression, independent of anything #327 does.
nsheaps pushed a commit that referenced this pull request Aug 11, 2026
- Extract the repeated "Setup mise" + "Install deps" step pair from
  lint/build/test into .github/actions/setup-mise-and-bun.
- Drop the mise CLI version pin from this branch -- it now lives on
  fix/mise-claude-code-pin (#325), which needs it for its own CI
  regardless of this PR.
- Move permission-mode into settings.permissions.defaultMode alongside
  the existing additionalDirectories/deny, out of claude_args.
  --allowedTools stays in claude_args -- it's the only thing that
  triggers claude-code-action's GitHub MCP server install
  (prepareMcpConfig/hasGitHubMcpTools), settings.permissions.allow
  doesn't feed that check.
- Trim the run-agent/action.yaml comments down to the one fact each
  needs.
- show_full_output: false.
nsheaps pushed a commit that referenced this pull request Aug 11, 2026
Applies the same npm→aqua backend fix validated on #325 directly to
this branch so #327's test job passes standalone. mise's npm backend
runs with --ignore-scripts, so claude-code's postinstall script never
fetches its native binary, causing "claude native binary not
installed" failures in `claude plugin validate`.
@nsheaps nsheaps closed this Aug 11, 2026

nsheaps commented Aug 11, 2026

Copy link
Copy Markdown
Owner Author

Closing without merging — superseded by #327, which already fixed this on main (npm:@anthropic-ai/claude-code with allow_builds, not an aqua: backend switch). Confirmed main's CI is green as of the #327 merge commit (9b7f423).


Generated by Claude Code


Generated by Claude Code

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