test(aqua): allow commit metadata refs#10287
Conversation
📝 WalkthroughWalkthroughThe pull request expands test assertions in ChangesRegistry Tag Format Validation
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Greptile SummaryThis PR relaxes a single test assertion in the baked aqua registry metadata test to accept either a semver-style release tag (starting with
Confidence Score: 5/5Safe to merge — the change is limited to a test assertion and correctly handles both tag formats. Only one line of test code changes; production logic is untouched. The updated assertion correctly uses Rust's &&/|| precedence rules and accurately validates both a v-prefixed release tag and a full 40-character hex commit SHA. No files require special attention. Important Files Changed
Reviews (1): Last reviewed commit: "test(aqua): allow commit metadata refs" | Re-trigger Greptile |
| assert!( | ||
| AQUA_STANDARD_REGISTRY_METADATA.tag.starts_with('v') | ||
| || AQUA_STANDARD_REGISTRY_METADATA.tag.len() == 40 | ||
| && AQUA_STANDARD_REGISTRY_METADATA | ||
| .tag | ||
| .chars() | ||
| .all(|c| c.is_ascii_hexdigit()) | ||
| ); |
There was a problem hiding this comment.
The
&& and || operators sit at the same visual indent level, making the precedence ambiguous at a glance. In Rust && binds tighter than ||, so the logic is correct as written, but an explicit pair of parentheses would make the intent clear to anyone reading the test.
| assert!( | |
| AQUA_STANDARD_REGISTRY_METADATA.tag.starts_with('v') | |
| || AQUA_STANDARD_REGISTRY_METADATA.tag.len() == 40 | |
| && AQUA_STANDARD_REGISTRY_METADATA | |
| .tag | |
| .chars() | |
| .all(|c| c.is_ascii_hexdigit()) | |
| ); | |
| assert!( | |
| AQUA_STANDARD_REGISTRY_METADATA.tag.starts_with('v') | |
| || (AQUA_STANDARD_REGISTRY_METADATA.tag.len() == 40 | |
| && AQUA_STANDARD_REGISTRY_METADATA | |
| .tag | |
| .chars() | |
| .all(|c| c.is_ascii_hexdigit())) | |
| ); |
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Hyperfine Performance
|
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2026.6.1 x -- echo |
19.9 ± 1.5 | 16.9 | 25.3 | 1.00 |
mise x -- echo |
21.3 ± 2.4 | 17.9 | 56.1 | 1.07 ± 0.14 |
mise env
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2026.6.1 env |
20.4 ± 1.9 | 16.3 | 27.2 | 1.00 |
mise env |
22.4 ± 1.6 | 18.1 | 28.9 | 1.10 ± 0.13 |
mise hook-env
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2026.6.1 hook-env |
22.4 ± 3.2 | 17.9 | 32.7 | 1.11 ± 0.17 |
mise hook-env |
20.1 ± 1.0 | 17.7 | 24.3 | 1.00 |
✅ Performance improvement for hook-env is 11% |
mise ls
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2026.6.1 ls |
15.2 ± 1.2 | 13.4 | 21.0 | 1.00 |
mise ls |
17.4 ± 1.1 | 14.9 | 21.3 | 1.14 ± 0.11 |
ls measured 14% slower, but the relative uncertainty overlaps the 10% threshold. |
xtasks/test/perf
| Command | mise-2026.6.1 | mise | Variance |
|---|---|---|---|
| install (cached) | 148ms | 151ms | -1% |
| ls (cached) | 63ms | 64ms | -1% |
| bin-paths (cached) | 74ms | 73ms | +1% |
| task-ls (cached) | 132ms | 136ms | -2% |
Summary
mainValidation
cargo test --all-features aqua::standard_registry::tests::test_baked_registry_metadataThis PR was generated by an AI coding assistant.
Note
Low Risk
Test-only assertion change with no runtime or security impact.
Overview
Updates
test_baked_registry_metadataso the baked aqua registry snapshot is valid whenAQUA_STANDARD_REGISTRY_METADATA.tagis either av…release tag or a 40-character hex commit SHA, not only release tags.This keeps unit tests passing when the vendored registry is pinned to an upstream
maincommit (e.g. via release-plz) instead of a tagged release.Reviewed by Cursor Bugbot for commit a15b7eb. Bugbot is set up for automated code reviews on this repo. Configure here.
Summary by CodeRabbit