Skip to content

test: update e2e expectations after version validation moved earlier - #14920

Merged
jdx merged 1 commit into
mainfrom
fix/e2e-after-security-merges
Oct 23, 2026
Merged

jdx merged 1 commit into
mainfrom
fix/e2e-after-security-merges

Conversation

@jdx

@jdx jdx commented Oct 23, 2026 •

Copy link
Copy Markdown
Owner

https://entire.com/gh/jdx/mise/trails/1022

Three e2e tests on main fail since the security fixes landed together. #14901 now rejects a tool version that starts with /, or that contains template or shell characters, while parsing arguments. Some assertions added by #14896 and #14897 expected each backend's own, later error for those same inputs. The inputs are still refused; only the message changed.

This updates the tests so they keep proving the inputs are refused and have no side effects, and keeps each backend's own check covered:

  • test_npm_registry_version_spec: an absolute path accepts either refusal. A new npm:left-pad@./payload case passes the general version check and still reaches the npm backend's "not a version, range or dist-tag" check. The test also asserts that nothing was installed.
  • test_ruby_build_runs_outside_project: an absolute path accepts either refusal. A new ruby@./jruby-9.4.5.0 case, naming a file planted in the project, still gets ruby's "a build definition name cannot be a path" and never reaches ruby-build.
  • test_upgrade_bump_template_version: the exec() version is now refused at install, before anything is written. The test checks that mise.toml is unchanged, that the payload never ran and that nothing was installed. A second tool offers 2.0.0{{env.…}}, which has template syntax but no forbidden characters, so the config-write check is still what refuses it, for both upgrade --bump and use --pin.

These three tests, plus test_resolved_version_path_safety, pass on this branch. No Rust code changed.

AI-assisted — Tool: Claude Code; model: anthropic/claude-opus-5-5; version: 2.1.308.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Tests
    • Expanded coverage for invalid npm versions, including absolute and relative paths, and verified rejected inputs do not result in matching installations.
    • Added checks for version-list templates containing executable expressions, confirming failed bump or pin operations leave configuration unchanged and do not write rendered content or install matching packages.
    • Added Ruby build-path rejection checks for relative and absolute paths, including verification that rejected paths are not sourced or passed to ruby-build.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Entire-Checkpoint: 01M5MNN7Y2AXYS6NX185PX2NJK
@coderabbitai

coderabbitai Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
📥 Commits

Reviewing files that changed from the base of the PR and between 43cbeff and e2efa21.

📒 Files selected for processing: 3
  • e2e/backend/test_npm_registry_version_spec
  • e2e/cli/test_upgrade_bump_template_version
  • e2e/core/test_ruby_build_runs_outside_project

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.

📝 Walkthrough

The end-to-end tests now cover path-like version rejection in npm and Ruby, and template-version handling in upgrade and pin commands. They also check that rejected inputs do not cause specified installs, sourcing, or config changes.

Changes: Version validation coverage

Layer / File(s) Summary
Path-like version rejection
e2e/backend/test_npm_registry_version_spec, e2e/core/test_ruby_build_runs_outside_project
The tests check rejection of absolute and relative paths. They verify that matching npm installs are absent, the Ruby project file remains unsourced, and the relative path is not passed to ruby-build.
Template versions in bump and pin commands
e2e/cli/test_upgrade_bump_template_version
The tests check exec() and version-valid template entries with mise upgrade --bump and mise use --pin. They verify the expected errors and that config contents, rendered markers, and matching installs remain unchanged or absent.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Other

Possibly related PRs

  • jdx/mise#14901: Moves resolved-version validation into argument parsing and adds backend checks for unsafe versions. This PR updates related npm, Ruby, and template-version tests.
  • jdx/mise#14896: Adds the original npm and Ruby path-like version checks that this PR updates.
Merge Risk: ⚪ Minimal · up to e2efa

No actionable issue is identified in the updated version-validation tests; the change is mergeable after normal checks.

Pre-merge checks: Passed 5
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: updating end-to-end test expectations after version validation moved earlier.
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
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.
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (3 skipped: 3 unsupported.)

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@greptile-apps

greptile-apps Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] This test-only PR appears safe to merge.

Summary

Updates three end-to-end tests for version checks that now reject unsafe inputs earlier.

  • The npm and Ruby tests keep checking where bad paths are refused.
  • Version-list bump tests cover template refusals at both validation stages.

No actionable issues found. Review was based on code inspection; tests were not run.

Reviews (1) · Last reviewed commit: "test: update e2e expectations after vers..." · Reviewed by Greptile

@jdx
jdx merged commit c5f4184 into main Oct 23, 2026
49 of 51 checks passed
@jdx
jdx deleted the fix/e2e-after-security-merges branch October 23, 2026 17:00
@github-actions

Copy link
Copy Markdown
Contributor

Instruction counts

benchmark trend instructions Δ wall (min) Δ
env ▁▁▁▁▁▁██ 31,961,791 → 31,918,263 -0.14% 21.26 → 21.09ms -0.81%
hook-env ▁▁▁▁▁▂██ 34,240,399 → 34,217,914 -0.07% 22.10 → 22.36ms +1.18%
ls ▁▁▁▁▁▂██ 36,382,511 → 36,360,240 -0.06% 23.26 → 23.35ms +0.36%
registry ▂▃▁▁▃▅█▂ 43,981,947 → 43,858,614 -0.28% 18.86 → 19.31ms +2.41%
startup ▂▁▂▁▄█▃▂ 12,117,477 → 12,101,803 -0.13% 12.90 → 13.01ms +0.85%

No instruction-count regression above 1%.

Only instruction counts gate. Wall clock is shown for context — on identical hardware it moves 4-20% run to run.

Measured by tak — instruction-counted CLI benchmarks, stored in this repository's git notes.

e2efa2135cb9 vs 43cbeff80abb · measured on the runner, not pushed to the history.

mise-en-dev added a commit that referenced this pull request Oct 24, 2026
<!-- entire-trail-link-start -->
https://entire.com/gh/jdx/-/trails/2718/changes/mise/998
<!-- entire-trail-link-end -->

### 🚀 Features

- **(config)** expose mise_config_dir to templates by @jdx in
[#14886](#14886)
- **(lsp)** send semantic tokens for tasks, tools, env vars and
templates by @jdx in [#14918](#14918)

### 🐛 Bug Fixes

- **(lock)** rebuild lockfiles completely by default by @jdx in
[#14893](#14893)
- **(pipx)** list git+ssh github.com sources over ssh when GitHub can't
see them by @jdx in [#14905](#14905)
- **(python)** stop uv_venv_auto from fork-bombing through python shims
by @jdx in [#14927](#14927)
- **(task)** apply extended template usage to file tasks by @jdx in
[#14888](#14888)
- **(task)** quote and escape header values written by tasks add --file
by @xucian in [#14925](#14925)
- **(uninstall)** remove installs whose directories deny their owner
writes by @HengYangDS in
[#14883](#14883)
- **(upgrade)** don't downgrade date-versioned tools with leading zeros
by @jdx in [#14923](#14923)

### 📚 Documentation

- tell agents not to edit the vendored aqua registry by @jdx in
[#14910](#14910)

### 🧪 Testing

- update e2e expectations after version validation moved earlier by @jdx
in [#14920](#14920)
- pin java relock e2e to a fully published Temurin line by @jdx in
[#14940](#14940)

### 📦️ Dependency Updates

- bump ctutils to 0.4.5 by @jdx in
[#14887](#14887)
- update aube to v2.8.2 by @renovate[bot] in
[#14889](#14889)
- update rust crate clx to v3.0.5 by @renovate[bot] in
[#14890](#14890)
- ignore RUSTSEC-2026-0387 in cargo-deny by @jdx in
[#14939](#14939)

### Ci

- retry snapcraft upload on transient store errors by @jdx in
[#14909](#14909)

### Security

- **(backend)** keep untrusted values out of subprocess arguments and
the project directory by @jdx in
[#14896](#14896)
- **(backend)** keep archive contents and release asset names inside the
install directory by @jdx in
[#14895](#14895)
- **(backend)** validate versions and names that become paths or URL
segments by @jdx in [#14901](#14901)
- **(backend)** tighten SLSA signer and GitHub attestation checks by
@jdx in [#14904](#14904)
- **(backend)** make SLSA, attestation and signed-checksum checks fail
closed by @jdx in [#14908](#14908)
- **(backend)** reject SLSA provenance built from another tag by @jdx in
[#14924](#14924)
- **(completion)** stop shell completion from running untrusted task
code by @jdx in [#14898](#14898)
- **(config)** tie trust to the right files for worktrees, symlinks and
config dirs by @jdx in [#14902](#14902)
- **(config)** close safe-mode gaps for lazy tools, deps, S3, bin_path
and templates by @jdx in
[#14900](#14900)
- **(config)** stop treating help, shims, hooks and config writes as
consent to trust by @jdx in
[#14903](#14903)
- **(config)** keep untrusted repo content from hanging or crashing
hook-env by @jdx in [#14916](#14916)
- **(github)** send forge tokens only to their API host and harden
release caches by @jdx in
[#14913](#14913)
- **(hooks)** render hook commands once and keep templates out of
written versions by @jdx in
[#14897](#14897)
- **(http)** bound response, download and archive sizes and slow
response bodies by @jdx in
[#14915](#14915)
- **(install)** enforce pinned checksums and node signatures instead of
falling back by @jdx in [#14899](#14899)
- **(lockfile)** stop lockfiles, tool stubs and the task cache from
reaching outside the repo by @jdx in
[#14906](#14906)
- **(packslip)** pin signers by repository ID and stop release-age
backdating by @jdx in [#14912](#14912)
- **(task)** close sandbox escapes in --allow-write, --deny-net and
--deny-write, and OCI whiteouts by @jdx in
[#14911](#14911)
- keep credentials out of install paths, lockfiles, logs and redirects
by @jdx in [#14917](#14917)

### New Contributors

- @xucian made their first contribution in
[#14925](#14925)
- @HengYangDS made their first contribution in
[#14883](#14883)

## 📦 Aqua Registry Updates

### New Packages (5)

- [`Future-Element/pinset`](https://github.com/Future-Element/pinset)
-
[`bronto-community/bronto-cli`](https://github.com/bronto-community/bronto-cli)
- [`faberlang/releases/faber`](https://github.com/faberlang/releases)
- [`muvon/octomind`](https://github.com/muvon/octomind)
- [`pratyay360/ensor`](https://github.com/pratyay360/ensor)

### Updated Packages (5)

- [`anomalyco/opencode`](https://github.com/anomalyco/opencode)
- [`duckdb/duckdb`](https://github.com/duckdb/duckdb)
- [`grafana/gcx`](https://github.com/grafana/gcx)
- [`grafana/mcp-grafana`](https://github.com/grafana/mcp-grafana)
- [`magefile/mage`](https://github.com/magefile/mage)
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