Skip to content

v0.1.9

Choose a tag to compare

@github-actions github-actions released this 06 Oct 04:10
· 26 commits to main since this release

Two fixes to how Forgelore decides a command failed, both found by leaving
it running on its own repository and reading what it recorded.

Fixed

A slow machine stopped it measuring, silently. The hook's budget was
checked before the first lookup, but the expensive part — opening the
index — happens before that. On a machine slow enough to spend the budget
there, nothing was recorded: no injection, no ledger line, and a report
showing fewer errors than really happened while saying nothing about the
difference. That is paying the whole cost and throwing away the result.

The budget now limits how many lookups happen, not whether any does. The
first always runs; the deadline applies from the second. Found by a CI
runner slower than any machine this was developed on.

A guess that comes to nothing now leaves nothing behind. Since v0.1.6 a
successful command whose output looks like an error is treated as a failure,
because a build piped through head exits zero and that is the only way to
see it. Running Forgelore on its own repository measured what that costs:
thirteen inferred failures in one session, not one of them real. They
were scripts printing error examples while the matchers were being worked
on. Nothing was injected, because nothing matched — but the ledger filled
with misses for commands that never failed, and the report's "nothing
known" count stopped meaning anything.

So an inferred failure that matches nothing is no longer recorded at all:
no ledger line, no session state. The lookup still happens, and a match is
still injected and still counted, because then something really was known.

Narrowing by command shape was tried first and the same measurement killed
it: all thirteen came from commands containing a pipe or a chain, so "only
infer when the exit status could have been masked" would have caught every
one. There is no signal in a hook payload that separates output which is
an error from output which is about one, and the risk that remains is
stated plainly in
ADR-0022:
a guess that does match injects a line into a session where nothing broke.

Upgrading

npm install -g forgelore        # or
curl -fsSL https://raw.githubusercontent.com/forgeprint/forgelore/main/scripts/install.sh | bash

Nothing to migrate. No fingerprint changes, so every record still matches
what it matched before. The record schema is 1 and the mapping format is 2.

gh attestation verify forgelore_linux_amd64 -R forgeprint/forgelore
npm audit signatures

Which agents this release supports

Agent Checked against a running agent
Claude Code 2.1.290 hooks, both MCP protocol eras, usage reader A
Copilot CLI 1.0.91 hooks only — its MCP client has never been connected B
Gemini CLI 0.62.0 hooks only — its MCP client has never been connected B
Codex CLI nothing; the mapping is a reading of the documentation unverified
Cursor researched, not started —