Your free trial has ended.

Try the live demo or log in .

fce48e27

Created Cancelled

By: ValentinHirschi <valentin.hirschi@gmail.com>

step memo: a full per-thread memo stops memoising; light steps only where the memo cannot change (memo-audit)

Coordinator / independent memo audit (notes/memo-audit.md), two defects of the batch-6 light
steps (a4aed5f0), both silent (wrong coefficient, no panic):
- Class H: the per-thread memo reset itself at MEMO_ENTRIES (2^20) entries inside a request and
  its indices restarted at 0, while ModularRecorder::scale_handle and the layered HANDLES cache
  handle -> coefficient for the whole request (local handles included). A full memo now keeps its
  entries and stops memoising (new keys: None -> direct computation, as the full shared memo
  does); the limits change still resets it. No cost below the bound, values unchanged. Batch 5
  (7142e80e) has the same reset but no request-long index cache: every Held is resolved right
  after its lookup there, so main is not affected.
- Class A-light: light handles carry a bare shared-memo index resolved later through the current
  memo; valid only inside a counted request. PStepper now records whether its request is counted
  and switches light steps on only for a counted request or on the calling thread of a one-thread
  request (local handles): not on the uncounted 1-worker pool of RUSTRED_ORDERED_LAYERED=on at one
  thread, nor under the cfg(test) RUSTRED_TEST_ORDERED_THREADS override. Debug assertion on a
  shared light handle outside a counted request.
Tests (the audit's patch + one for the wipe fix, propagator::step_memo::tests::memo_audit_*; run
alone, one test thread): Held::Shared survives a memo replacement (silent and panic variants),
light handles follow the current memo (documents shared_value), and (ignored, 2^20 entries) a full
local memo keeps its indices within a request.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
GitHub
1 of 1 jobs done 1 Cancelled More jobs to come