Skip to content

fix(engine): install scripts pick latest engine version by semver#169

Merged
hugocorreia90 merged 1 commit intomainfrom
fix/install-latest-version-sort
Apr 20, 2026
Merged

fix(engine): install scripts pick latest engine version by semver#169
hugocorreia90 merged 1 commit intomainfrom
fix/install-latest-version-sort

Conversation

@hugocorreia90
Copy link
Copy Markdown
Contributor

Summary

  • engine/install.sh, engine/install.ps1, and scripts/vendor_rocky.sh all picked the first engine-v* tag returned by the GitHub releases API. In a monorepo with multiple tag prefixes the API does not sort strictly by published_at, so engine-v1.9.0 was winning over engine-v1.10.0. Lexical sort would have the same bug (v1.10.0 < v1.9.0).
  • Version-sort the engine-prefixed tags and take the highest (sort -V -r | head -1 in bash, [version] cast + Sort-Object -Descending in PowerShell).
  • Tighten the tag filter to ^engine-v\d+\.\d+\.\d+$ (stable only). sort -V and [version] both rank -rc.1 above the corresponding stable — filtering now prevents a future pre-release from silently becoming "latest".

Verification

  • curl … /releases?per_page=30 | grep … | sort -V -r | head -1engine-v1.10.0
  • gh release list … | grep … | sort -V -r | head -1engine-v1.10.0
  • bash -n clean on both shell scripts.

Test plan

  • curl -fsSL https://raw.githubusercontent.com/rocky-data/rocky/main/engine/install.sh | bash resolves to engine-v1.10.0 after merge
  • irm https://raw.githubusercontent.com/rocky-data/rocky/main/engine/install.ps1 | iex resolves to engine-v1.10.0 (Windows)
  • scripts/vendor_rocky.sh --release vendors the 1.10.0 binary
  • Explicit ROCKY_VERSION=engine-v1.9.0 / bash -s -- 1.9.0 still installs the pinned version

🤖 Generated with Claude Code

The install scripts and vendor_rocky.sh picked the first engine-v* tag
returned by the GitHub releases API, but that endpoint does not sort
strictly by published_at in a monorepo with multiple tag prefixes —
engine-v1.9.0 was winning over engine-v1.10.0 because 1.9.0 appeared
earlier in the response. Lexical sort would have the same problem (v1.10.0
< v1.9.0).

Version-sort the engine-prefixed tags and take the highest. Also tighten
the tag filter to stable releases only (x.y.z, no suffix) so a future
pre-release tag like v2.0.0-rc.1 won't silently become "latest" — sort -V
and [version] both rank -rc suffixes above the corresponding stable.
@hugocorreia90 hugocorreia90 merged commit fa8a4c7 into main Apr 20, 2026
11 checks passed
@hugocorreia90 hugocorreia90 deleted the fix/install-latest-version-sort branch April 20, 2026 00:34
@hugocorreia90 hugocorreia90 mentioned this pull request Apr 20, 2026
3 tasks
hugocorreia90 added a commit that referenced this pull request Apr 20, 2026
Closes the first wave of every trust-system arc (Arcs 1-7) plus the two
wave-2 follow-ups landed the same day. Nine feature PRs since v1.10.0.

- Arc 1 (#170): rocky lineage --downstream, rocky branch, rocky run --branch, rocky replay
- Arc 2 (#171): per-run cost attribution, [budget] block, budget_breach hook
- Arc 3 (#172): three-state CircuitBreaker, adapter consolidation
- Arc 4 (#173): rocky trace Gantt + feature-gated OTLP metrics export
- Arc 5 (#174): schema-grounded rocky ai prompt + project-aware validator
- Arc 6 wave 1 (#184): --target-dialect P001 portability lint (12 constructs)
- Arc 7 wave 1 (#185): blast-radius P002 SELECT * lint (semantic-graph aware)
- Arc 6 wave 2 (#186): [portability] config block + per-model rocky-allow pragma
- Arc 7 wave 2 wave-1 (#187): --with-seed source-schema inference

Plus #169 fix: install scripts pick latest engine version by semver.

Version bump: 20 Cargo.toml files (all workspace members except
rocky-bigquery, which tracks its own version).

Wave 2/3 work for every arc remains in the deferred backlog — see
the changelog Deferred section for the full carry-forward.
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