Skip to content

Feat/self update - #13

Merged
AlleyBo55 merged 3 commits into
masterfrom
feat/self-update
Jul 26, 2026
Merged

Feat/self update#13
AlleyBo55 merged 3 commits into
masterfrom
feat/self-update

Conversation

@AlleyBo55

Copy link
Copy Markdown
Owner

No description provided.

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.
@AlleyBo55
AlleyBo55 merged commit 248ec2e into master Jul 26, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant