feat(bootstrap): Unix self-install + multi-platform release artifacts#130
Merged
Conversation
Split the Windows-only bootstrap command into platform files. The current
Windows behavior moves byte-identically into bootstrap_windows.go; a new
bootstrap_unix.go implements Linux/macOS:
- install to ${XDG_DATA_HOME:-$HOME/.local/share}/endstate/bin, copy binary to
lib/endstate and chmod 0755 (the copy is non-executable by default)
- symlink $HOME/.local/bin/endstate -> the installed binary, re-pointed
idempotently (existing target removed first)
- never edit PATH or shell rc files; addedToPath is always false; a one-line
PATH hint is printed to stderr when $HOME/.local/bin is off PATH (JSON shape
unchanged)
- self-copy guard: skip the copy when the running binary already resolves to the
install target, so re-bootstrapping via the installed symlink never truncates it
The BootstrapData payload (installPath/shimPath/addedToPath) is preserved on every
platform; on Unix shimPath is the symlink path.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Build-tagged tests so the suite stays green on all three CI OSes. Unix tests redirect HOME/XDG_DATA_HOME to t.TempDir and assert the 0755 binary, symlink target, idempotent re-run, payload fields, and stale-file re-point. Windows tests redirect LOCALAPPDATA and assert the binary+shim and idempotency without invoking real setx. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Add a publish-unix-artifacts job on ubuntu-latest that cross-compiles with CGO_ENABLED=0 for linux/amd64, linux/arm64, darwin/amd64, darwin/arm64, producing endstate-<os>-<arch> plus a lowercase-hex .sha256 sibling, uploaded to the same release with the same version-embedding ldflags as the Windows job. The Windows publish-artifacts job is unchanged. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…tall Add the unix-engine-self-install OpenSpec change (proposal, tasks, spec delta) against the bootstrap-full-sync capability: MODIFIED Windows requirements scoped explicitly to Windows, ADDED Unix requirements for the install layout, symlink, no-PATH-mutation rule, idempotent re-pointing, and the self-copy guard. Add a distribution paragraph to docs/COMPATIBILITY.md. Co-Authored-By: Claude Fable 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
Closes the distribution gap surfaced after the platform arc: the engine runs on Linux/macOS, but releases shipped only
endstate.exeandendstate bootstrapwas Windows-only.endstate bootstrapon Linux/macOSbootstrap_windows.go(existing behavior, byte-identical) /bootstrap_unix.go${XDG_DATA_HOME:-~/.local/share}/endstate/bin/lib/endstate(chmod 0755) + symlink~/.local/bin/endstateaddedToPath: false, one-line stderr hint when~/.local/binisn't on PATH (precedent:capture.gowinget-retry warning)installPath/shimPath/addedToPath;shimPath= symlink on Unix)Release artifacts (protected area — maintainer-authorized)
publish-unix-artifactsjob (ubuntu-latest matrix):endstate-{linux,darwin}-{amd64,arm64}+.sha256, CGO_ENABLED=0, same ldflags version-embedding and trigger model as the windows job; per-artifact asset verification. Windows job untouched.OpenSpec + docs
unix-engine-self-install: delta againstbootstrap-full-sync(Unix layout/symlink/no-PATH-mutation requirements; Windows behavior preserved)docs/COMPATIBILITY.md: distribution noteVerification
go test ./...green (hermetic, build-tagged per platform),go vet,GOOS=windows+GOOS=darwinbuilds greenopenspec validate --all --strict72/72bootstrap→ XDG layout + 0755 binary + symlink verified, re-run idempotent, installed binary executes via symlink (capabilitiesOK)🤖 Generated with Claude Code