feat(helpers4-common): add h4_arch_musl_triple and h4_github_latest_tag - #95
Merged
Conversation
…_tag Extracted from duplicated logic in git-absorb and bitwarden-secrets-manager: - h4_arch_musl_triple maps uname -m to the x86_64-unknown-linux-musl / aarch64-unknown-linux-musl target-triple convention those two features' Rust binaries use. - h4_github_latest_tag <owner/repo> [prefix] resolves a GitHub repo's latest release tag, optionally filtered by prefix for a monorepo publishing several tools under one repo (bitwarden/sdk-sm's bws- releases). github-dev's own arch mapping (amd64/arm64/armv6, GitHub CLI's own asset-naming convention) is a different scheme, not a duplicate of the musl triple above, so it stays feature-local. An "official installer" helper (curl-installer scripts used by nub, vite-plus, claude-dev) was evaluated too, but each invocation differs in ways that matter (fatal vs. degraded failure, different su argument-passing styles, different env vars) — forcing a shared wrapper risked the same kind of silent behavior change already found and fixed once in vite-plus's own installer call, so left feature-local. Purely additive — existing features' behavior is unchanged until they opt in (see the git-absorb/bitwarden-secrets-manager follow-up, which needs this published first since dependsOn resolves from GHCR). Verified both functions directly against the real GitHub API in a container: h4_arch_musl_triple, h4_github_latest_tag against tummychow/git-absorb (no prefix) and bitwarden/sdk-sm with a bws- prefix, and the pipefail-safe empty-result path on a nonexistent repo. Closes the "Factor arch mapping / GitHub latest-release / official- installer patterns into helpers4-common" roadmap item. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…helpers Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
✅ PR Validation Passed
📋 Pipeline Status
🤖 Generated by @helpers4 CI • 2026-09-09 |
baxyz
added a commit
that referenced
this pull request
Sep 9, 2026
…_github_latest_tag Drops the inline architecture-detection and latest-release-resolution logic in favor of the shared helpers added in helpers4-common (PR #95), which this feature already depends on. No behavior change — verified directly in a container: git-absorb still resolves and installs the latest release correctly through the new code path. Needs helpers4-common's h4-common-arch-helpers PR merged and republished first — dependsOn resolves from GHCR, not this repo's local src/ tree. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
baxyz
added a commit
that referenced
this pull request
Sep 9, 2026
…arch/latest-release helpers Drops the inline architecture-detection and latest-release-resolution logic (including its own bws- prefix filtering for the sdk-sm monorepo) in favor of the shared helpers added in helpers4-common (PR #95), which this feature already depends on. No behavior change — verified directly in a container: bws still resolves and installs the latest release correctly through the new code path. Needs helpers4-common's h4-common-arch-helpers PR merged and republished first — dependsOn resolves from GHCR, not this repo's local src/ tree. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2 tasks
baxyz
added a commit
that referenced
this pull request
Sep 9, 2026
…_github_latest_tag Drops the inline architecture-detection and latest-release-resolution logic in favor of the shared helpers added in helpers4-common (PR #95), which this feature already depends on. No behavior change — verified directly in a container: git-absorb still resolves and installs the latest release correctly through the new code path. Needs helpers4-common's h4-common-arch-helpers PR merged and republished first — dependsOn resolves from GHCR, not this repo's local src/ tree. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
baxyz
added a commit
that referenced
this pull request
Sep 9, 2026
…arch/latest-release helpers Drops the inline architecture-detection and latest-release-resolution logic (including its own bws- prefix filtering for the sdk-sm monorepo) in favor of the shared helpers added in helpers4-common (PR #95), which this feature already depends on. No behavior change — verified directly in a container: bws still resolves and installs the latest release correctly through the new code path. Needs helpers4-common's h4-common-arch-helpers PR merged and republished first — dependsOn resolves from GHCR, not this repo's local src/ tree. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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.
Summary
git-absorbandbitwarden-secrets-manager:h4_arch_musl_triple(uname -m → Rust musl target-triple) andh4_github_latest_tag <owner/repo> [prefix](GitHub latest-release resolution, with prefix filtering for monorepos likebitwarden/sdk-sm).github-dev's own arch mapping uses a different convention (GitHub CLI's own asset naming), not a duplicate — left feature-local.nub/vite-plus/claude-dev) was evaluated but not extracted — each invocation differs in ways that matter (fatal vs. degraded failure, differentsuargument-passing, different env vars); forcing a shared wrapper risked the same kind of silent bug just found and fixed invite-plus's own installer call.helpers4-common— no existing feature's behavior changes until it opts in.Consumer refactor (
git-absorb,bitwarden-secrets-managerswitching to use these) is a separate, follow-up PR —dependsOnresolves from the published GHCR registry, so it needs this merged and republished first.Test plan
h4_arch_musl_triple,h4_github_latest_tagagainsttummychow/git-absorbandbitwarden/sdk-smwith abws-prefix, plus the pipefail-safe empty-result path on a nonexistent repo)