Skip to content

feat: drop harnesses and installed_at from the installed-version marker - #151

Merged
e0ipso merged 7 commits into
mainfrom
feature/69--drop-harnesses-installed-at-installed-version-marker
Nov 24, 2026
Merged

e0ipso merged 7 commits into
mainfrom
feature/69--drop-harnesses-installed-at-installed-version-marker

Conversation

@e0ipso

@e0ipso e0ipso commented Nov 24, 2026 •

Copy link
Copy Markdown
Owner

Closes #150.

The committed .ai/kenkeep/.state/installed-version held two fields that do not belong in a shared file. installed_at changed on every install, and harnesses recorded one developer's harness choice as the team's inventory. The marker now holds only schema_version, package and version. init and doctor find harnesses from the committed host registrations.

Changes

  • registeredHarnesses(root, templatesDir) lists every adapter with registration evidence. registrationEvidence no longer throws when a settings path is a directory or cannot be read.
  • Repair (init on an initialized repo) restores the hook scripts of every registered harness and installs any --harnesses id that has no registration. It never writes the marker, so git status stays clean.
  • Upgrade refreshes every registered harness plus every --harnesses id. A named harness is refreshed even with no registration, so its writer still refuses a malformed config. The marker is written only when its content changes.
  • doctor audits every registered harness. A harness registrations check replaces the inventory drift check. It errors for --harness X when X is not registered and warns when nothing is registered.
  • status prints kenkeep v<version> with no date and reads the marker through the shared reader.
  • Docs, PRD.md, AGENTS.md and the kenkeep nodes are updated. Accepted trade-off: doctor cannot detect a deleted registration.

Schema version

The marker keeps schema_version: 1. Its reader is a plain zod object that strips unknown keys, so a legacy marker parses and the next upgrade drops the old fields. AGENTS.md and the bump-policy node record this as an exception to the policy.

Mixed CLI versions

The new CLI reads legacy markers, so nothing breaks for anyone on this release. A kenkeep CLI older than this release rejects the new three-field marker as Malformed ... installed_at: Required in init and doctor, so upgrade the CLI across the team together. To retire a harness, delete its host registration.

Verification

  • npm run build, npm run lint, npm run typecheck, npm run typecheck:tests: exit 0.
  • npx vitest run: 94 files, 966 tests passed.
  • Built CLI in a scratch git repo: marker has three keys; init and init --upgrade twice each leave git status --porcelain empty; deleting .ai/kenkeep/hooks/ and running init --harnesses claude restores claude and codex; a legacy marker survives doctor, status and repair unchanged and loses installed_at/harnesses on upgrade; doctor shows registered: claude, codex, errors for --harness cursor, and warns with no registrations.
  • npm run format:check fails on docs/_includes/callout.html and src/lib/fs-atomic.ts, which this PR does not touch. Every file it changes passes prettier.

🤖 Generated with Claude Code

e0ipso and others added 6 commits November 24, 2026 23:33
Add registeredHarnesses(root, templatesDir), which lists every adapter
whose committed host registration names the shared hook path or carries a
shipped plugin. registrationEvidence no longer throws when the settings
path is a directory or cannot be read; it reports no evidence.

Plan 69, phase 1.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
doctor now scopes its harness checks to every harness with committed
registration evidence instead of the installed-version inventory. The
"harness inventory" drift check is replaced by a "harness registrations"
check: it lists the registered harnesses, warns when none is registered,
and errors when --harness names a harness with no registration.

Plan 69, phase 2.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The committed .ai/kenkeep/.state/installed-version now holds only
schema_version, package and version. installed_at changed on every
install, and harnesses recorded one developer's harness choice as the
team's inventory.

init finds harnesses from committed host registrations instead:

- Repair restores the missing hook scripts of every registered harness
  and fully installs any --harnesses id with no registration. It never
  writes the marker, so git status stays clean.
- Upgrade refreshes every registered harness plus every --harnesses id.
  A named harness is refreshed even with no registration, so its writer
  still refuses a malformed config. The marker is written only when its
  content changes, so a repeat run leaves it byte-identical.
- status prints the version only and reads the marker through the shared
  reader.

The marker keeps schema_version 1. Its reader is a plain zod object that
strips unknown keys, so removing the fields relaxes the reader. This is a
deliberate exception to the strict bump policy.

Plan 69, phase 3. Closes #150.

BREAKING CHANGE: kenkeep CLIs older than this release reject the new
marker as "Malformed ... installed_at: Required" in init and doctor.
Upgrade the kenkeep CLI for the whole team together. The new CLI reads
legacy markers; the next `init --upgrade` drops installed_at and
harnesses. To retire a harness, delete its host registration; there is no
inventory to edit.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Add a writeInstalledMarker helper and use it in every fixture that only
needs the marker to exist. Add unit coverage for the marker reader and
writer: legacy keys are stripped, a non-string version is rejected, the
record is deterministic, and identical content is not rewritten.

Plan 69, phase 4.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The install marker no longer lists harnesses. Update the installation,
troubleshooting and architecture docs, PRD.md, AGENTS.md and the kenkeep
nodes: init and doctor find harnesses from committed host registrations,
doctor reports a missing registration or no registration at all, and it
cannot detect a deleted registration. Record the schema-version policy
exception for the install marker.

Plan 69, phase 4.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
writeInstalledVersionIfChanged returned whether it wrote, and only a unit
test read it. The test now checks the file content and mtime. Share the
legacy-marker fixture and the package.json version lookup through
tests/helpers.ts instead of building them in three test files.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@e0ipso e0ipso changed the title feat!: drop harnesses and installed_at from the installed-version marker feat: drop harnesses and installed_at from the installed-version marker Nov 24, 2026
The test expected doctor to exit 0, which needs the claude binary on
PATH. CI has none, so doctor reported it and exited 1. Stub the harness
binaries as the other doctor tests do.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@e0ipso
e0ipso merged commit 1bba4db into main Nov 24, 2026
1 check passed
github-actions Bot pushed a commit that referenced this pull request Nov 24, 2026
## [1.20.0](v1.19.4...v1.20.0) (2026-11-24)

### Features

* drop harnesses and installed_at from the installed-version marker ([#151](#151)) ([1bba4db](1bba4db)), closes [#150](#150)
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 1.20.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make installed-version marker safe to track: drop harnesses and installed_at

1 participant