Repository navigation
v0.2.2 — instrument and ledger hardening + the H3R gate experiment
v0.2.2 — instrument and ledger hardening + the H3R gate experiment
Two batons: instrument and ledger hardening (goal v022-bat1-instrument) and
the H3R high-risk-step gate experiment (goal v022-bat2-h3r). Product behavior
is unchanged — the H3R prototype ships dormant.
Fixed
- drive judged progress by a done-step jump alone. A long step that committed
code and recorded evidence but never ranstep donestill read as zero progress
and was wound down asstuckafter two segments. Progress is now the documented
state set — done steps ∪ subject head trees ∪ evidence-ledger green nodes ∪
handoff/salvage registrations (core/progress.js) — so a step's commits and
evidence count even before it closes. Dirty trees are deliberately not a signal. - The waterline watch was blind to non-GLM providers.
core/cost.js's rolling
SQL recognized two model names and counted everything else as zero, so on a
DeepSeek session both the 1600-point warning line and drive's 400-point budget
read as idle. The pricing table is now enumerated with sources — units stated in
yuan per million tokens — and the SQL is generated from it (ADR-0023). - The ablation harness's engine spawn had no wall-clock hard cap: ADJ-38's fix
had reachedcore/headless.jsbut not the ablation pipeline. - Six stale claims the code had outgrown were retired, and the handoff-snapshot
directory is now enumerated and exempted from the doctor's scar patrol (it is a
reset-surviving family, not a stray shell).
Added
- Lock contention is observable.
withLockrecords acquisitions, waits,
wait-time total/max and timeouts intoloop/metrics.json; a newlzy doctor
lockrow surfaces them. A probe measured the real critical section across this
repo and three dogfood repos: worst case 58.9 ms against the 5 s wait window
(0.012× of it). - The H3R high-risk-step gate prototype (ADR-0022), shipped dormant.
core/h3r.jsholds the judgment surface — a risk word list plus an explicit
[risk:high]plan marker — andcore/drive.jschecks it at the top of each
segment. A hit winds the segment loop down cleanly before spawning: no engine
call, no tokens, and the 7-field handoff snapshot carrying the recovery path is
written.LZY_ABLATE_H3R_GATEexactly"1"WAKES it — the inverse of the
LZY_ABLATE_*family's semantics, which is why ADR-0022 quotes the operative
pre-registration sentence. Left alone, behavior is byte-identical to 0.2.1. - Ablation trials can run through
lzy loop drive(h3r-trial.mjs,
h3r-batch.mjs, theH3R-A/H3R-B/H3R-Carm variants,extractH3rMetrics,
aggregateH3r). The harness had never exercised drive — every earlier batch
spawned the engine directly — while the gate lives only in drive's segment loop. - ADR-0023: the multi-provider pricing convention (units stated explicitly, an
enumerated table with sources, the waterline SQL generated from that table).
The H3R experiment, in one paragraph
Report: docs/reviews/2026-h3r-gate-report.md; ablation ledger docs/ablation.md
#31. The gate's mechanics work; its enforcement point does not. A
single-instrument run proves the gate stops a reachable risky step in 2 seconds
with zero engine calls and a clean 7-field snapshot, and no bypass attempt. In the
24-trial grid it never fired — because 15 of 24 trials (62.5%) finished the entire
plan inside one segment (the segment prompt says one step per segment), so a
per-segment check never gets the chance to run: the gate was bypassed, not
defeated. The pre-registered "zero differentiation ⇒ the task set has no
measurement power" label is rejected by the evidence — the traps did fire, in
9 of 12 runs — the enforcement point is what failed. An unplanned find with real
value: 3 of 24 runs were stopped by the goal-level gate when the in-segment
model raised the goal's own risk to high, proving that coarse goal-level gate does
fire in practice. Disposition of the machine form stays a human review item;
nothing is promoted or downgraded automatically.
Notes
The 24-trial grid ran on the release version face (payloadHash 7c635b86558a…), captured before the text-layer edits that followed it — the report
records this in §9.6 rather than claiming the grid ran on the final 0.2.2 payload.
Coverage boundary
Live evidence covers arm64 guests (Parallels VMs on an Apple Silicon host). x64
coverage follows the official ZCode download matrix (three platforms × dual arch) by
documentation; the detection paths are architecture-independent (environment-based).
Upgrade
From 0.0.10 and newer: lzy update (spawns a fresh child process to deploy the new
plugin payload). From older versions: manual two-step (npm i -g lazyzcode && lzy install). Requires the ZCode desktop app (logged in), Node ≥ 22, and git.
Full changelog: https://github.com/Acfufu/lazyzcode/blob/main/CHANGELOG.md