Fix Unix installer portability in sandboxed Linux - #93
Merged
Conversation
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.
What changed
/dev/fd.lddoutput before matching it, avoiding thepipefailandgrep -qSIGPIPE interaction that selected the glibc asset on Alpine./dev/fd, runs the real installer, and executes the installed CLI.Scope
CLI tooling only. This changes the Unix installer and its CI coverage; no backend, frontend, API, sample, or release artifact code changes.
Runtime flow
sequenceDiagram participant Caller as CLI installer caller participant Installer as Unix installer participant Runtime as Linux runtime participant Server as Release server Caller->>Installer: Start installation Installer->>Runtime: Inspect ldd output alt musl runtime Runtime-->>Installer: Report musl Installer->>Server: Download x64-musl archive and checksum else glibc runtime Runtime-->>Installer: Report glibc Installer->>Server: Download x64 archive and checksum end Installer->>Runtime: Extract archive Installer->>Runtime: Find binary without dev fd Installer->>Runtime: Install and execute binary Runtime-->>Caller: Return version outputInstaller structure
classDiagram class Installer { +String platform +String archLabel +String binaryName +detectRuntime() +selectBinary() +install() } class LinuxRuntime { +String libc +Boolean hasDevFd } class ReleaseArchive { +String assetName +String checksum } class InstalledBinary { +String name +version() } Installer --> LinuxRuntime : inspects Installer --> ReleaseArchive : downloads ReleaseArchive *-- InstalledBinary : contains Installer --> InstalledBinary : installsRisk assessment
Medium-low. This touches the direct installation path, so a regression could block new CLI installs. The implementation replaces one non-portable discovery loop with standard
findandsed, preserves the unnamed-binary fallback, and is covered by the existing macOS/Linux matrix plus the new isolated Linux proof.User impact
Users can install ArchAgent inside Vercel Sandbox and other Linux environments without
/dev/fd. Alpine and other musl users now receive the correctlinux-x64-muslartifact instead of the glibc artifact.Testing
Canonical end-to-end proof
scripts/test-installer-without-dev-fd.shis the canonical proof.The script reads top-to-bottom as the user/system story:
archagent-linux-x64-musl.tar.gzfixture and checksum;/dev/fdand asserts that boundary before invokinginstall.sh;0.3.1.It failed before the fix with
/dev/fd/63: No such file or directoryafter checksum verification, then passed after the fix while explicitly downloading the musl archive.Focused verification
./scripts/test-installer-without-dev-fd.sh— passed./scripts/test-installer-default-url.sh— passedbash -n install.sh scripts/create-unix-fixtures.sh scripts/test-installer-without-dev-fd.sh— passedshellcheck -e SC2016 install.sh scripts/create-unix-fixtures.sh scripts/test-installer-without-dev-fd.sh— passedactionlint -shellcheck= .github/workflows/installer-smoke-test.yml— passedgit diff --check— passedThe exact
curl ... | bashwrapper is not part of the proof; the test executes the same installer file directly after crossing the release HTTP boundary. Existing Ubuntu, macOS, and Windows installer smoke jobs remain the broader CI gate.Follow-ups and known issues
No deferred installer correctness work is known. The test pins the Alpine image digest; its package installation still depends on Alpine's package network, as the existing installer tests depend on their fixture tooling.