Skip to content

v0.13.0

Choose a tag to compare

@sdsrss sdsrss released this 19 Sep 23:48
· 92 commits to main since this release

New-user lifecycle QA: install → use → update → self-heal → uninstall, driven
end to end against a genuine claude plugin marketplace add sdsrss/loop_eng
install into an isolated CLAUDE_CONFIG_DIR on Claude Code 2.1.278. The
enforcement layer passed every leg on the real artifact — evidence-gate denied
a Write to .loop/evidence/ with CLAUDE_PLUGIN_ROOT resolved to the cache
path, the stop-gate blocked a red contract and machine-wrote
"generated_by": "run-contract.sh" / "all_green": false, /autoloop armed
via ${CLAUDE_PLUGIN_ROOT} and reached ALL GREEN, the hash-lock caught a
post-arm rewrite (exit 77), and a runner deleted from the cache produced the
fail-closed block that names /plugin update loop-eng. What the sweep found
was on the edges: one packaging defect, three places where a real environment
dependency lived only in a code comment, one quiet corner of the hash-lock, and
two release-blocking facts that were checklist lines rather than tests. Test
suite 411 → 456 assertions.

Release smoke (RELEASING.md §1, re-run against this release's content at
0.13.0 after the version bump; the earlier 0.12.2 run is superseded rather than
carried over, because a smoke that names a version has to have run on it): PASS
on Claude Code 2.1.278, machine-verified rather than model-reported. Step 4 —
the model's Write to .loop/evidence/smoke.log was DENIED, the file did not
land under --permission-mode bypassPermissions, and an instrumented deny()
logged a real root= path rather than the <loop-eng plugin root> placeholder,
so CLAUDE_PLUGIN_ROOT reaches hook processes. Step 5 — a false criterion
blocked the stop (BLOCK n=1) and run-contract.sh machine-wrote
"all_green": false. Step 6 — a full /loop-eng:autoloop round reached
"all_green": true on two criteria, hello.txt held hi, and .loop/active
and .loop/criteria.sha256 were removed by the gate rather than by the model,
which is reachable only if ${CLAUDE_PLUGIN_ROOT} expanded inside the command
markdown.

Source-type disclosure, owed by the rule this release adds to RELEASING.md §1:
the marketplace was added by local path, because 0.13.0 was not yet pushed and
marketplace add owner/repo can only take the default branch. The instrumented
markers named the source copy, confirming it enforced while the version-pinned
plugins/cache/ copy did not — exactly what that new rule predicts, verified on
its first two uses. The GitHub-source path, which is the one real users get, is
re-smoked against the released tag per §3 Post-ship.

Pre-ship review: an independent reviewer with no authoring context returned
SHIP with no BLOCKER, having driven every fail-closed exit in a sandbox (78
missing criteria, 77 post-arm tamper, 77 locked-with-no-SHA-tool, 73 unwritable
.loop and .loop/evidence, plus the stop-gate's block-ceiling, missing-runner,
timeout-124 and green-disarm paths) and mutation-tested both new suites. It also
raised one HIGH and six MEDIUM/LOW findings, all fixed above or recorded as
known. Three of those were absolute claims the author asserted without checking
what else could produce the state they named — the reason author ≠ reviewer is
a rule here and not a courtesy.

fix: the two timer scripts shipped non-executable. install-timer.sh and
uninstall-timer.sh were recorded in git as 100644, while README documents
both as bare-path commands (skills/loop-eng/scripts/install-timer.sh <polish| autoloop> <repo>). A marketplace install materializes the tree with its
recorded modes, so the first line a new user pasted answered Permission denied — reproduced in the installed cache copy, not just the repo. Their two
siblings in the same directory, unattended-polish.sh and
unattended-autoloop.sh, were already 100755, which is why the gap survived:
every test in the suite invokes these scripts as bash <path>, a form that
works at any mode, so nothing exercised the documented one. Now 100755.

test: tests/test-packaging.sh (new, 12 assertions) closes that blind spot
by asserting the git-index mode of every script README invokes bare-path. The
candidate list is derived from README rather than written down — a runner
documented tomorrow is covered tomorrow — and the scan fails closed if its
pattern ever matches nothing, so the suite cannot go green while checking zero
files. It also pins the converse: hooks.json spawns every hook through
bash "<path>", so hook modes are deliberately not part of the contract.

docs: a Requirements table in README. jq/python3, a SHA-256 tool,
timeout/gtimeout, curl, systemctl, and the bash ≥ 4.4 floor were each
probed at run time and documented only in the script that probes them. Two of
those absences silently weaken a guard, which is exactly the class that should
not live in a comment. Each row states what actually degrades; every claim was
grep-verified against the probing script.

test: the parser-less evidence-gate is now pinned (+2 assertions). With
neither jq nor python3 the gate fails open — deliberate, since a PreToolUse
hook must never brick a session, but it was the one environment where the gate
looks installed and enforces nothing, and no test covered it. Both halves are
now asserted: the exit code stays 0, and the stderr warning that is a human's
only signal stays present. README states the consequence and its bound,
measured rather than reasoned: on a parser-less box a hand-forged
{"all_green": true} in .loop/results.json was overwritten by
run-contract.sh on the next stop attempt and the stop was still blocked
(exit 2). The evidence-gate is defense-in-depth; the stop-gate is load-bearing
and needs no parser.

docs: two traps in RELEASING.md. (1) The pre-flight now validates the
plugin manifest by path — given . the validator finds marketplace.json
first and reports "contents": [], a green that checked no command, agent, or
skill; the one expected --strict warning (root CLAUDE.md) is named so any
other is a blocker. (2) §1 now requires adding the marketplace by its GitHub
source: a directory source runs the plugin from the source directory,
leaves plugins/marketplaces/ empty and never executes the version-pinned
plugins/cache/ copy that every path in steps 3–4 points at. Confirmed by
running the same smoke once per source type with a marker in deny() in both
copies. Instrumenting the cache under a directory source yields an empty log
that reads exactly like "the hook never fired" — the fourth instance of that
family in these two steps.

fix(run-contract): a missing hash-lock is no longer silent. The integrity
check ran under [ -f "$ACTIVE" ] && [ -f "$SHA_LOCK" ], so a missing
criteria.sha256 skipped it entirely and a lockless run was indistinguishable
from a locked one — the corner where "weakening an armed contract can never
pass silently" stopped being true. Armed, no lock, and a SHA-256 tool present
now warns on stderr and stamps "contract_lock": "absent" into
results.json.

It reports the state, not a cause, and that distinction is this entry's own
correction: the first draft asserted that arm-contract.sh "drops the lock in
exactly one case" and told the reader to re-arm through it. Both halves were
wrong. arm-contract.sh omits the lock on two paths (no hashing tool, and no
criteria.tsv at arm time), and commands/autoloop.md documents a last-resort
arm that is a bare touch .loop/active — on which the warning fired every run
and prescribed re-running a script that path exists because it is unavailable.
Caught by the pre-ship reviewer, not by the author. The message now states only
what the code can observe: the tamper check did not run.

Deliberately a warning, not a refusal — every route to this state is
legitimate, and failing closed would strand a live loop whose only exit is
deleting .loop/active, trading a documented residual for a new way to lose
work. The ledger carries it because a green contract lets the stop-gate exit 0,
which discards hook output. Every arm of the branch is tested (+13 assertions),
including the two that must stay silent: a machine with no hashing tool, and
the documented touch .loop/active fallback, which must warn without
misdiagnosing.

fix(unattended): the bash ≥ 4.4 floor is checked, not just stated. Both
drivers carried "Requires bash >= 4.4" as a header comment and nothing else, so
on stock macOS bash 3.2 they STARTED, did real work, and only then died on the
first empty-array expansion under set -u — the worst shape for an unattended
writer, which for unattended-autoloop.sh may already have let a session
commit. They now refuse up front with exit 78 (EX_CONFIG) and a message naming
the requirement. Verified on real bash 3.2.57 via the docker recipe in
CLAUDE.md: both exit 78. A separate BASH_VERSION check runs first and stays
its own statement, because a non-bash shell dies on the array subscript in the
version test with a bare "Bad substitution" — the :-0 default never applies,
since the failure is in the subscript syntax rather than the value. Found by
the pre-ship reviewer, who noticed the README row this batch added claimed a
guard that did not exist.

docs: the Requirements table said things that were not so. Same review. The
timeout row omitted the unattended drivers; systemctl omitted
uninstall-timer.sh; there was no row at all for the claude CLI, which
install-timer.sh hard-requires — a stronger dependency than three of the rows
that were listed. The table now also records an asymmetry it surfaced:
unattended-polish.sh probes only timeout and never falls back to
gtimeout, unlike its three siblings, so on macOS-with-coreutils a scheduled
polish runs uncapped while autoloop does not. Pre-existing, documented here,
not fixed in this release. The "(CI-tested)" claim is narrowed to the four
scripts test-bash32 actually covers — update-notify.sh is a registered hook
and is in neither of that job's lists. The table's preamble, which promised
everything "degrades rather than failing", now says which rows weaken a guard
and which refuse outright.

test: tests/test-manifest.sh (new, 20 assertions) turns two RELEASING.md
checklist lines into failures. "A version bump touches THREE fields across TWO
files" was a thing a human remembered; now a drifted metadata.version or
plugins[].version fails the suite, as does a missing CHANGELOG section for the
shipped version. It also asserts every shipped component .md has frontmatter
(without one, a command loads as nothing and nothing fails), and that each
agent's name: matches its filename — the Task tool dispatches on that field,
and the platform validator does not check it. JSON is parsed by explicit path
with python3 and the marketplace entry is selected BY NAME: plugins[] is an
array, and a positional grep reads the wrong field the day a second entry
appears. Where the claude CLI is installed the suite also runs
claude plugin validate (credential-free, verified against an empty
CLAUDE_CONFIG_DIR) and asserts zero errors with the root-CLAUDE.md warning
as the only warning — strict-grade rigor without tripping on the one warning
the plugins reference documents as unavoidable and unsuppressable. Every
assertion was mutation-tested: bumping plugin.json alone, stripping a
frontmatter block, and typo-ing an agent name each turn the suite red.

ci: the manifest gate is live on the Linux leg. npm i -g @anthropic-ai/claude-code on ubuntu only — manifest validity is
platform-independent, so paying for it on all three legs buys nothing, and the
validator needs no credentials. Not softened with || true: an install that
failed quietly would switch the gate off while CI still reported green, the
silent-disarm shape this repo exists to refuse. Unpinned for the same reason a
plugin's verdict comes from the CLI its users run. Show tool versions now
prints claude --version so each run states whether the gate was live rather
than leaving it inferred.

docs: CLAUDE.md no longer states the plugin cache is enforcing. It claimed
loop-eng "is also installed as a marketplace plugin (user scope)" as
unconditional fact; on this machine it is not installed at all, which makes the
guidance a trap in the other direction — an agent assuming a stale cache
enforces will misread which copy it is testing. Now conditional, with the
one-line claude plugin list check, a pointer to arm-contract.sh's
armed from line as the authority over any belief, and the directory-vs-GitHub
source distinction.

docs: one file outlives an uninstall. The update notifier's throttle stamp
at ${XDG_CACHE_HOME:-~/.cache}/loop-eng/update-check.json sits outside
~/.claude/ on purpose (so it survives a version bump rather than being
orphaned in the version-pinned cache), and /plugin uninstall does not know
about it. README now says so, with the one-line rm and what the file holds.