Skip to content

v1.7.5

Latest

Choose a tag to compare

@github-actions github-actions released this 18 Oct 22:20
Immutable release. Only release title and notes can be modified.
b18c40f

init can leave the working tree exactly as it found it

If a script runs commitlore init as part of checking that a checkout is clean,
this is the release you want.

init writes one file inside the working tree: the PreToolUse injection hook
at .claude/settings.json. It is untracked, so after init the tree is no
longer clean — and a caller whose whole job is to verify a clean checkout then
sees its own observation as a change:

git status --porcelain --untracked-files=all   # empty
commitlore init --mcp-scope none --no-unattended </dev/null
git status --porcelain --untracked-files=all   # ?? .claude/settings.json

--mcp-scope none reads as "register nothing", but it never covered that file:
everything else init wires lands under .git/, in git config, or in the
host's own configuration, and git status reports none of it.

commitlore init --no-agent-hooks

Skips that one write and changes nothing else. Measured against a scratch
repository with an empty HOME:

  • all eight steps run and report 0 — release, hooks, trust, index, agent
    integration, MCP registration, policy, final check;
  • all four git hooks are installed: commit-msg, prepare-commit-msg,
    post-commit, pre-push;
  • the directive author string is set in git config;
  • git status --porcelain --untracked-files=all is empty;
  • the verdict is init: ready, exit 0.

The step still reports what it did not do, rather than going quiet about a step
it skipped.

The verdict had to survive it too

With the hook declined, inject-runtime is the only doctor row that needs
attention — so a first version of this handed back a clean checkout and exit
1
, which trades a dirty tree for a failed verdict. The final check now leaves
that row out of its verdict when the caller declined the hook, out of the
verdict only and never out of the report
: the row still prints, with a line
saying why it was not counted. Anything else still fails the verdict — with a
policy file the resolver rejects, the same flag reports exit 1.

Reproducing it needs a fresh HOME

With the Claude Code plugin installed, the step already skips the write, so a
run against a developer's own HOME looks like a non-reproduction. The
fresh-HOME case is the automated one, which is where the report came from.

init --help now says which steps write inside the working tree and which write
outside it.


This is a patch release. It adds one flag and changes no default.

Canonical source: efb6563; Canonical
dist/commitlore.mjs SHA-256:
f6a8b8e65a0e46abe3c1ebbe3104eb52127aa540acb7d5e4ac5df4d6d9fd4531

Full Changelog: v1.7.4...v1.7.5