Feat/self update - #13
Merged
Merged
Conversation
The tests added in #12 were never run through the project's own gate. Two things were wrong and both fail CI rather than the test suite, so `go test` passing hid them: sentinel_test.go struct fields unaligned, so `gofmt -l` is non-empty and `make check` exits 1 before it reaches go vet statusline_test.go `err != ErrNoTTY` instead of errors.Is, which golangci-lint's errorlint rejects Neither is a behaviour change. Both would have blocked the next push.
Adds `kirobuff update`, which resolves the latest published release, compares it to the running build, and replaces the binary in place. kirobuff update -check report only, change nothing kirobuff update download, verify, replace kirobuff update -force proceed from a dev build Three decisions worth recording: Verification fails closed. install.sh warns and continues when checksums.txt is missing, which is right for a first install: some binary beats none. An update already has a working binary on disk, so an unverifiable download has nothing to offer and is refused instead. A dev build stops rather than proceeding. A locally built binary reports version "dev", which no comparison can order. Treating it as older than everything would let a stray `kirobuff update` overwrite a build someone is mid-debug on, so it declines and explains, and -force overrides. Windows is declined explicitly. Those releases are zip, not tar.gz. Adding an untested extraction path to the one command that overwrites the binary is worse than saying it is not supported and pointing at the release page. The replacement is a rename within the target directory, so it is atomic: an interrupted update leaves either the old binary or the new one. The current binary is moved to .old first because Windows will not rename over a running image. Symlinks are resolved before writing, so a linked install replaces the target rather than the link. Repo is a constant, not a flag. Pointing a self-updater at an arbitrary repository is how it installs someone else's binary under this name. Stdlib only, matching the rest of the project. Tests drive an httptest server and touch no network.
`kirobuff install` iterates persona.Registry(), which holds tech-cofounder and nothing else, so the statusline hook lands on that agent's config only. The default Kiro CLI session has no agent config file for a hook to live in, and gets no tab title. The summary printed after install claimed the feature unconditionally, which reads as a bug report waiting to happen: the user follows the instructions, sees no title in their default session, and concludes it is broken. Output text and docs only. Behaviour is unchanged.
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.
No description provided.