Skip to content

DRAFT: LISA ILE driver — AV state, anisotropic bins, collapse gate (pass 5a, stacked on #100) - #101

Merged
oshaughnessy-junior merged 2 commits into
claude/lisa-sampler-plumbingfrom
claude/lisa-av-state
Aug 16, 2026
Merged

DRAFT: LISA ILE driver — AV state, anisotropic bins, collapse gate (pass 5a, stacked on #100)#101
oshaughnessy-junior merged 2 commits into
claude/lisa-sampler-plumbingfrom
claude/lisa-av-state

Conversation

@oshaughnessy-junior

Copy link
Copy Markdown
Owner

Draft. Stacked on #100 (→ #99#98). Base is claude/lisa-sampler-plumbing, so this diff is pass 5a only.

Closes 5 of the 94 remaining gap items (gap 94 → 89): --sampler-save-state, --sampler-load-state, --sampler-anisotropic-bins, --reject-collapsed-live-volume, _reject_if_collapsed.

All four are sampler-agnostic. The saved state is the AV sampler's own live-volume grid, which carries no detector convention; the bin allocation is per-axis on that same grid.

The one thing to carry forward

The main driver calls its collapse gate twice — on the first run and on the replica pool — because replication can turn a healthy first run into a collapsed pool, and gating only the first would silently bypass the flag for exactly the case pooling introduces.

This driver has no replica pooling yet, so only the first call exists here. That is recorded in the helper's docstring, in the drift ledger, and in a test asserting the warning is still written where whoever ports --mc-error-replicas will be working.

Hoisting

The helpers are module-level rather than nested (as _reject_if_collapsed is in main), because this driver has two analyze_event variants and nesting would mean two copies. A test pins the hoisted body AST-identical to main's nested one.

This exposed a false positive in the drift audit — now fixed

The audit compared FUNC items by qualified name, so main's analyze_event._reject_if_collapsed did not match this driver's correctly-hoisted top-level _reject_if_collapsed. The item would have sat in the gap forever no matter how well it was ported.

A gate that cannot be satisfied is a gate people learn to ignore. FUNC items are now matched on the bare name as well.

Tests

test_lisa_av_state.py (27), wired into lisa-check. Revert-checked with 8 mutations: the lost AV-method restriction on save, bins not reaching portfolio members, bins ceasing to be opt-in, a gate that ignores its flag, a gate that fires on healthy runs, a collapse no longer announced, the gate moved before the not(res) guard, and deletion of the second-call-site warning. Each caught by its named test; file restored byte-identical.

🤖 Generated with Claude Code

…collapse gate

Pass 5a of the catch-up.  Closes 5 of the 94 remaining gap items (gap 94 -> 89):
--sampler-save-state, --sampler-load-state, --sampler-anisotropic-bins,
--reject-collapsed-live-volume, and _reject_if_collapsed.

All four are sampler-agnostic.  The saved state is the AV sampler's own live-volume grid,
which carries no detector convention; the bin allocation is per-axis on that same grid.

THE ONE THING TO CARRY FORWARD.  The main driver calls its collapse gate TWICE -- on the
first run AND on the replica pool, because replication can turn a healthy first run into a
collapsed POOL, and gating only the first would silently bypass the flag for exactly the
case pooling introduces.  This driver has no replica pooling yet, so only the first call
exists here.  That is recorded in the helper's docstring, in the drift ledger, and in a
test that asserts the warning is still written where whoever ports --mc-error-replicas
will be working.

The helpers are hoisted to module level rather than nested (as _reject_if_collapsed is in
main), because this driver has TWO analyze_event variants and nesting would mean two
copies.  A test pins the hoisted body AST-identical to main's nested one.

THIS EXPOSED A FALSE POSITIVE IN THE DRIFT AUDIT, now fixed.  It compared FUNC items by
QUALIFIED name, so main's analyze_event._reject_if_collapsed did not match this driver's
correctly-hoisted top-level _reject_if_collapsed, and the item would have sat in the gap
forever no matter how well it was ported.  A gate that cannot be satisfied is a gate people
learn to ignore.  FUNC items are now matched on the bare name as well.

TESTS.  test_lisa_av_state.py (27), wired into lisa-check.  Revert-checked with 8
mutations: the lost AV-method restriction on save, bins not reaching portfolio members,
bins ceasing to be opt-in, a gate that ignores its flag, a gate that fires on healthy runs,
a collapse that is no longer announced, the gate moved before the not(res) guard, and
deletion of the second-call-site warning.  Each caught by its named test; file restored
byte-identical.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@oshaughnessy-junior
oshaughnessy-junior deployed to private-review-dispatch-rift August 16, 2026 01:07 — with GitHub Actions Active
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant