fix(ci): install claude-code via mise aqua backend, pin at 2.1.128 - #325
fix(ci): install claude-code via mise aqua backend, pin at 2.1.128#325nsheaps wants to merge 9 commits into
Conversation
…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
|
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 I don't have Generated by Claude Code |
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.
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.
- 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.
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`.
|
Closing without merging — superseded by #327, which already fixed this on Generated by Claude Code Generated by Claude Code |
Summary
The
testjob'sclaude plugin validatestep has been failing onmainsince #312/#309 with:Root cause:
mise.tomlpinnednpm:@anthropic-ai/claude-code, but mise's npm backend passes--ignore-scripts=trueby 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
mainindependent of #322 (unrelated PR, same CI symptom noted there).Changes
mise.toml: switchclaude-codefrom thenpm:backend to mise'saqua:backend ("aqua:anthropics/claude-code" = "2.1.128"). This pulls the native binary directly fromanthropics/claude-codeGitHub releases — the same binary the officialcurl -fsSL https://claude.ai/install.sh | bashinstaller ships — with no npm package and no postinstall script involved at all. Drops the now-unneededdepends = "node"/allow_buildsworkaround.renovate.json: add apackageRulesentry 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.mainin, 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
testjob'sclaude plugin validatestep passes on this PR's CIaqua:anthropics/claude-codemise entry going forwardGenerated by Claude Code