Skip to content

Feat/statusline auto install - #12

Merged
AlleyBo55 merged 4 commits into
masterfrom
feat/statusline-auto-install
Jul 26, 2026
Merged

Feat/statusline auto install#12
AlleyBo55 merged 4 commits into
masterfrom
feat/statusline-auto-install

Conversation

@AlleyBo55

Copy link
Copy Markdown
Owner

No description provided.

version next reported major for a release where nothing broke. The cause is
self-referential: the commit that documented this very mechanism contains the
phrase "BREAKING CHANGE footer" while explaining it, and the check searched the
whole body for the phrase.

Conventional Commits defines it as a footer: line-anchored, with a colon. Now
matched with (?mi)^BREAKING[ -]CHANGE: so discussing a breaking change is no
longer the same as making one.

The regression test uses the exact prose that caused it, and asserts that
indented text, mid-line mentions and a colon-less phrase are all not footers,
while BREAKING-CHANGE: and lowercase still are.

Effect: the pending release goes from v1.0.0 to v0.2.0, which is what actually
happened.

Assisted-by: Claude:claude-opus-4.7 kiro-cli gofmt go-vet go-test golangci-lint
Trying to push v0.2.0 from master, the hook blocked it with
[blocker] protected-branch. Pushing a tag is not pushing a branch, and the
check was reading only the checked-out branch name.

git hands a pre-push hook the refs on stdin, one line per ref:

  <local ref> <local sha> <remote ref> <remote sha>

preflight now reads them. When every ref is under refs/tags/ the branch checks
are skipped and a tag-push finding says why. A mixed push, or a manual run with
no stdin, still gets every check.

This is the failure mode that matters most for a guardrail: a false positive on
legitimate work is how people learn to type --no-verify, and after that the tool
protects nothing. Found by using it, not by reading it.

Also detects a deletion push, where the local sha is all zeroes.

Assisted-by: Claude:claude-opus-4.7 kiro-cli gofmt go-vet go-test golangci-lint
Seven parallel invocations against a cap of six produced seven active modes.
Every process ran Active(), saw room, and created a symlink before any of them
had written one: time-of-check to time-of-use. Easy to hit for real, because a
shell loop with & is how someone enables several modes at once.

On and Off now hold an exclusive lock across the whole read-then-write. The lock
is an O_EXCL create, atomic on every filesystem this runs on and needing no
platform-specific syscall. A lock older than 30s is treated as abandoned, so a
process killed mid-operation cannot wedge the command, and a fresh lock produces
an error naming the file rather than a silent hang.

It lives beside the mode library rather than in the steering directory, because
Kiro CLI loads every file under steering and a lock file is not steering.

Verified against the real binary: seven concurrent kirobuff mode on calls now
produce six symlinks.

Assisted-by: Claude:claude-opus-4.7 kiro-cli gofmt go-vet go-test golangci-lint
Add step 3 to kirobuff install that automatically installs the
statusline (tab-title HUD) on every persona's agent config. Users
no longer need to run kirobuff statusline install separately.

Also add tests to bring coverage from 84.9% to 88.9%, above the
85% floor: power, discover, eval, mode, sentinel, statusline.
@AlleyBo55
AlleyBo55 merged commit fde8b06 into master Jul 26, 2026
1 of 2 checks passed
AlleyBo55 added a commit that referenced this pull request Jul 26, 2026
* fix(ci): the statusline commit left the tree failing gofmt and errorlint

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.

* feat(update): check for and install a newer release

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.

* docs(statusline): say that the hook does not reach the default agent

`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.
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