feat(installer): make commit pinning opt-in, default to branch-follow - #37123
Merged
Conversation
The bootstrap installer's build.rs unconditionally baked a commit pin via
`git rev-parse HEAD`, forcing every dev build to clone an exact SHA at
install time. That SHA had to be pushed to origin or the fresh-box clone
would fail.
Make the commit pin opt-in: by default build.rs bakes ONLY the detected
branch, so the installer follows that branch's HEAD at install time. Set
HERMES_BUILD_PIN_COMMIT (SHA, tag, or branch name) to bake an immutable
commit pin for reproducible/release builds; it is resolved to a SHA via
`git rev-parse --verify <ref>^{commit}` and fails loud on an unresolvable
ref. Runtime resolution already supported branch-only pins, so no changes
needed in bootstrap.rs / install_script.rs / install.ps1.
Contributor
🔎 Lint report:
|
OutThisLife
approved these changes
Jun 2, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the bootstrap installer’s Tauri build.rs so commit pinning is opt-in (via HERMES_BUILD_PIN_COMMIT) and dev builds default to baking only a branch pin, allowing the produced installer to follow the branch HEAD at install time.
Changes:
- Make
HERMES_BUILD_PIN_COMMITthe sole trigger for baking a commit SHA; otherwise emit no commit pin. - Resolve
HERMES_BUILD_PIN_COMMITrefs to an immutable SHA viagit rev-parse --verify <ref>^{commit}, failing loudly when unresolvable (unless it already looks like a SHA). - Improve build-time warnings to distinguish “pinning branch” vs “following branch HEAD”.
Comments suppressed due to low confidence (1)
apps/bootstrap-installer/src-tauri/build.rs:58
- The inline comment says we "Fail loudly" when neither commit nor branch resolves, but the code only emits a cargo warning and continues. This is confusing. Either change the behavior to panic, or update the comment to match the current behavior (warn and allow the build to proceed).
// Fail loudly rather than silently produce a binary that errors
// at runtime with "no install-script pin supplied". A build that
// can't resolve a pin almost certainly indicates a misconfigured
// build environment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
austinpickett
approved these changes
Jun 2, 2026
1 task
alt-glitch
pushed a commit
that referenced
this pull request
Jun 14, 2026
…-pin feat(installer): make commit pinning opt-in, default to branch-follow
T02200059
pushed a commit
to T02200059/hermes-agent
that referenced
this pull request
Jun 18, 2026
…ional-commit-pin feat(installer): make commit pinning opt-in, default to branch-follow
waefrebeorn
pushed a commit
to waefrebeorn/slermes
that referenced
this pull request
Jul 2, 2026
…ional-commit-pin feat(installer): make commit pinning opt-in, default to branch-follow
santhreal
pushed a commit
to santhreal/hermes-agent
that referenced
this pull request
Jul 13, 2026
…ional-commit-pin feat(installer): make commit pinning opt-in, default to branch-follow
Gravezzz
pushed a commit
to Gravezzz/hermes-agent
that referenced
this pull request
Jul 21, 2026
…ional-commit-pin feat(installer): make commit pinning opt-in, default to branch-follow
leewenjie
pushed a commit
to leewenjie/hermes-agent
that referenced
this pull request
Aug 7, 2026
…ional-commit-pin feat(installer): make commit pinning opt-in, default to branch-follow
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The bootstrap installer's build.rs unconditionally baked a commit pin via
git rev-parse HEAD, forcing every dev build to clone an exact SHA at install time. That SHA had to be pushed to origin or the fresh-box clone would fail.Make the commit pin opt-in: by default build.rs bakes ONLY the detected branch, so the installer follows that branch's HEAD at install time. Set HERMES_BUILD_PIN_COMMIT (SHA, tag, or branch name) to bake an immutable commit pin for reproducible/release builds; it is resolved to a SHA via
git rev-parse --verify <ref>^{commit}and fails loud on an unresolvable ref. Runtime resolution already supported branch-only pins, so no changes needed in bootstrap.rs / install_script.rs / install.ps1.