Repository navigation
Proof-or-Stop v0.3.406 — Validation Reuse, Queue Resilience, and Fixture Retention
Overview
This release consolidates six bounded maintenance repairs from v0.3.401 through v0.3.406. It makes validation re-execution reasons durable, aligns reuse lineage with the material-hash policy, removes non-semantic host-session values from validation identity, keeps queued validation visibly alive, bounds machine-queue ancestor probes, and safely limits retained failed-fixture directories.
The release contains 66 commits across 25 files, with 2,024 insertions and 460 deletions since v0.3.400. The package and repository CLI both report version 0.3.406.
v0.3.401 — Durable validation refusal reasons
Problem
When routine validation could not reuse an earlier PASS, the refusal reasons were printed only to stderr. The durable validation_terminal event recorded that execution occurred but not why. Once session output disappeared, repeated executions could no longer be attributed from the event itself.
Resolution
Executed terminal events now retain the reuse evaluation, lineage classification, sorted refusal reasons, and any reason a reusable result was deliberately declined. The no-validator branch also preserves its evaluation. Reused terminals, reuse decisions, gates, and duplicate-suite grouping keys are unchanged.
Current verification recorded four executed scenarios and made all four attributable from terminal data alone. An unchanged rerun still reused its prior result, while observe mode without opt-in remained executed with the exact observe-reuse-not-opted-in decline reason.
v0.3.402 — Material-policy lineage consistency
Problem
The material hash excluded Story metadata, evidence output locations, and registered runtime artifacts, but the shared lineage classifier trusted only Story metadata. A commit containing only excluded non-material data could therefore force routine validation, DONE-required validation, and admissibility to reject an otherwise byte-identical PASS.
Resolution
The shared lineage classifier now trusts exactly the paths already excluded by the material-hash policy. Every material source or configuration path, non-ancestor head, and diff failure remains rejected. The process-fact contract prevents a return to the narrower Story-metadata-only predicate.
The regression covers four reusable non-material scenarios, five refusal controls, and a mutation that attempts to trust every descendant. All 38 checks passed; every material-path control independently detected the unsafe mutation.
v0.3.403 — Host-session-neutral validation identity
Problem
Per-session host values that validation commands do not read were included in routine and DONE-required identity digests. Starting a new host session or changing the host effort setting could invalidate an unchanged PASS and rerun the complete validation plan.
Resolution
CLAUDE_CODE_HOST_SESSION_ID, CLAUDE_EFFORT, and BAGGAGE now join the extensible host-launcher environment list. Ambient values for these keys are excluded from identity and are not passed to validation children. An explicit command.env overlay remains semantic. Ordinary values such as NODE_OPTIONS, CI, TZ, LANG, and PATH still change identity and refuse reuse.
All 32 checks passed. The frozen digest-pinned list remains unchanged, and identity calculation agrees with the actual spawned environment.
v0.3.404 — Queue-wait heartbeat
Problem
A validation queued behind another same-user process could be healthy but silent. Without a queue wait reporter, the CLI idle watchdog killed it as stuck before capacity became available.
Resolution
The validation executor now supplies queue progress at the configured heartbeat interval. While waiting, the CLI reports the command index, label, elapsed time, and holder context. Queue and command deadlines are unchanged.
The real CLI regression queued for three seconds behind a private fixture holder with a one-second idle budget. It emitted eight wait lines and completed successfully. An uncontended control passed, while a deliberately slower-than-idle heartbeat remained correctly killed. All six checks passed.
v0.3.405 — Bounded asynchronous ancestor probing
Problem
Machine-queue waiting used a synchronous ps probe with a one-second timeout. A busy host could cause spawnSync ps ETIMEDOUT to escape the wait loop and crash a valid queued validation. The first asynchronous candidate could also outlive the caller's deadline or abort signal.
Resolution
The ancestor probe is asynchronous, kills its child on abort, and is bounded by both its own ceiling and the caller's remaining capacity-wait time. The caller's active deadline/abort state is checked again before ancestry is interpreted. A failed or unknown probe never admits the waiter; it remains queued and retries on the next poll. Confirmed ancestor conflicts remain refused.
All 14 checks passed, including slow probes, a genuine descendant conflict, a never-answering probe, a short deadline, and caller abort. Deadline and abort cases left no queue ticket and never ran the protected callback.
v0.3.406 — Safe retained-fixture cleanup
Problem
Failed fixture-machine directories were intentionally retained for diagnosis but never bounded. Local evidence recorded 125 retained directories, some several days old and up to 8.1 MB each. A simple age-only cleanup would risk deleting active, partially inspected, or ambiguously owned diagnostic data.
Resolution
Fixture creation now records an owner PID and performs best-effort sibling pruning without allowing cleanup failure to block fixture creation.
- A confirmed live owner is always retained.
- A confirmed absent owner is retained for a ten-minute diagnostic grace; after grace, the 20 newest dead-owner directories are retained.
- A legacy directory is eligible for age cleanup only when no owner record exists and the newest activity anywhere in its bounded tree is older than six hours.
- A present but unrecognized owner record is retained rather than treated as legacy.
- Owner records are opened nonblocking, without following symlinks, and must be regular files smaller than 64 KiB.
- PID liveness is three-state: only
ESRCHproves absence,EPERMproves presence, and any other error remains unknown. - Recorded PIDs must be positive safe integers within the probeable range.
- An incomplete directory scan, unreadable subtree, tree above the 20,000-entry inspection bound, FIFO, symlinked owner record, unrelated path, or unexpected entry is retained.
- Cleanup never follows symlinks and never removes unrelated files or directories.
The final regression seeded 69 prefixed directories and retained 56 according to policy. It passed 17 groups covering old and young legacy data, dead and live owners, fresh nested activity under an old root, incomplete inspection, FIFO and symlink records, six malformed owner schemas, 21 out-of-range PID records, unrelated directories, and symlink preservation.
Before and after
| Area | Before | After |
|---|---|---|
| Executed validation history | Durable events said only that execution occurred. | Events retain the exact reuse evaluation, refusal reasons, lineage, and decline reason. |
| Non-material commits | Materially identical results could be rejected because lineage used a narrower path policy. | All reuse consumers share the material-hash exclusion policy; material paths still fail closed. |
| Host session changes | Session IDs, effort settings, and telemetry baggage changed validation identity. | Ambient host-only values are identity-neutral and absent from child environments. |
| Queue visibility | A healthy queued command could appear idle and be killed. | Capacity waiting emits periodic progress without extending any deadline. |
| Ancestor detection | A slow synchronous ps could crash the waiter. |
Probing is asynchronous, abortable, deadline-bound, and fail-closed. |
| Failed fixture storage | Diagnostic directories accumulated without a retention bound. | Confirmed dead/legacy data is bounded while active, ambiguous, or incompletely inspected evidence is preserved. |
Verification evidence
The exact tagged commit d4ab3af041f18faafb0d6ba75004ef95eb45379a was rebuilt and rechecked before publication.
npm run buildpassed, including the full-suite build-binding check.node scripts/verify-validation-terminal-refusal-reasons.mjspassed 32 checks.node scripts/verify-reuse-lineage-material-policy.mjspassed 38 checks and its unsafe-classifier mutation control.node scripts/verify-reuse-host-session-environment.mjspassed 32 checks.node scripts/verify-validation-queue-wait-heartbeat.mjspassed six real-CLI queue/idle checks.node scripts/verify-machine-queue-ancestor-probe.mjspassed 14 slow, failure, deadline, and abort checks.node scripts/verify-fixture-machine-retention.mjspassed 17 retention and deletion-safety groups.- Static edge validation emitted
U18_STATIC_PASSwith zero needs-review rows, zero nested rows, zero unexpanded commands, 17 intentionally skipped rows, and 1,676 reviewed exceptions. - The remote pre-push gate rebuilt the main package and passed
tsc --noEmitfor lab, graph, utils, and main during both branch and tag publication.
Evidence boundaries and known limitations
- v0.3.401 is an observability repair and does not claim a measured runtime optimization.
- Receipts created with the three newly excluded ambient host keys may need to be earned once under the new identity policy.
- Queue heartbeats do not extend queue or command deadlines. A waiter can still time out under prolonged real contention.
- Unknown ancestor state remains fail-closed and may eventually end in the caller's capacity deadline.
- Fixture cleanup intentionally retains active, ambiguous, malformed, unreadable, oversized, or incompletely inspected candidates. The cap applies only when ownership absence or eligible legacy age is established safely.
- The full repository test matrix was not run. Passing claims are limited to the exact build, six pinned regressions, static scan, and pre-push type checks listed above.
- Three separately reported managed-asset synchronization items remain outside this reviewed release.
- These maintenance repairs do not assert formal completion of the broader benchmark Story.
Upgrade verification
After updating, run:
proof-or-stop --versionThe expected result is Proof-or-Stop 0.3.406.