Skip to content

cl-weave v0.8.0

Choose a tag to compare

@takeokunn takeokunn released this 19 Jul 06:20
v0.8.0
9854451

Runtime hardening and concurrency safety harvested from the development
worktrees. Behavior-preserving for well-formed input; the changes bound
pathological input, remove quadratic hot paths, and make shared state
thread-safe.

Fixed

  • mocks: O(n²) call recording → amortized O(1); copy-tree on recorded
    arguments (infinite loop on cyclic/shared structure) → cycle-safe graph copy;
    a clear/register race that corrupted result slots → generation-guarded writes;
    nested/overlapping spies restored out of order → proper LIFO spy stacks.
  • snapshots: non-atomic :supersede writes (file corruption on crash) →
    temp-file + atomic rename under a lock; O(n²) diff → O(n).
  • watch: change detection keyed on write-date alone (missed same-second
    edits, false-fired on touch) → existence+mtime+size+content-hash signature;
    O(n²) assoc scans → hash; dependency specs resolved via
    resolve-dependency-spec.
  • concurrency: worker pool defaulted to one OS thread per test (resource
    exhaustion on large suites) → bounded pool; cooperative cancellation and
    guaranteed thread cleanup on error.
  • reporters/matchers: improper/circular-list safety in one-of-candidates
    and run-result normalization; *print-circle* bound around cyclic failure
    printing; shrinker errors no longer double-wrapped.

Changed

  • DoS caps on retry / timeout / worker / shard / bail / candidate counts and
    close-to precision; numeric-token length guard; CPU-based default worker
    count.
  • logic, shrinking, and tag/dependency normalizers rewritten recursion →
    iterative with explicit cycle rejection.
  • Registry locking for concurrent registration; string-name validation on
    register-suite/register-test.
  • Test selection/collection rebuilt from per-node subtree walks to precomputed
    O(1) hash indexes.
  • CI: hardened workflows (SHA-pinned actions, concurrency cancel-in-progress,
    least-privilege permissions, fork-PR secret gating) and per-check
    validationCommands asserting each artifact's schema/shape.

Notes

  • normalize-bail now returns t (re-mapped downstream to bail-limit 1);
    register-suite/register-test require string names.
  • The subprocess-isolation rewrite is not in this release — it triggered a
    Linux-only sb-cover "Recursive lock attempt" cascade and is deferred to its
    own PR after Linux-side debugging.

Full Changelog: v0.7.0...v0.8.0