DRAFT: LISA ILE driver — AV + --internal-use-lnL was a silent no-op (stacked on #101) - #102
Closed
oshaughnessy-junior wants to merge 1 commit into
Closed
DRAFT: LISA ILE driver — AV + --internal-use-lnL was a silent no-op (stacked on #101)#102oshaughnessy-junior wants to merge 1 commit into
oshaughnessy-junior wants to merge 1 commit into
Conversation
Found by adversarial audit, NOT by the drift gate. The main driver has:
if opts.sampler_method =="AV" and opts.internal_use_lnL:
return_lnL=True
pinned_params.update({"use_lnL":True})
with the comment "without this, --internal-use-lnL --sampler-method AV passed the
ok_lnL_methods check but silently did nothing, so exp(lnL) overflowed at high SNR when no
logarithm offset was set." The LISA driver had branches for GMM, adaptive_cartesian_gpu
and portfolio -- and none for AV.
High SNR is the LISA MBHB regime, so this is the case rather than an edge, and it matters
more now that the preceding passes push AV and portfolio into LISA production.
This is a PRE-EXISTING defect, not one the catch-up introduced; the catch-up is what made
it worth finding. It is also a behaviour change for anyone already running
--sampler-method AV --internal-use-lnL on this driver: they were silently getting the
linear-integrand path, and will now get the log-space one the option asks for. Kept as its
own commit and its own PR so it can be reviewed or dropped independently of the ports.
WHY THE DRIFT AUDIT COULD NOT SEE IT. A missing `if` branch is not a FUNC, OPTION, CONST
or ATTR, so it produces zero gap items. The audit is a name-presence set difference:
behaviour behind a shared name is invisible to it. That limitation is now documented in
LISA_DRIVER_DRIFT.md, and test_lisa_use_lnL_branches.py closes this particular hole by
extracting the per-sampler pinned_params branch TABLE from both drivers and comparing them.
The table comparison immediately earned itself: it shows the portfolio branch still differs
by exactly the three --internal-gmm-* forwards (gmm_adaptive, gmm_defensive_frac,
gmm_inflate), which are the deferred GMM pass. That delta is asserted EXACTLY rather than
skipped, so any other divergence in that branch still fails and the test tightens by itself
when the GMM pass lands.
Revert-checked: removing the AV branch fails test_AV_sets_use_lnL_under_internal_use_lnL
and test_branch_table_matches_the_main_driver[AV]; file restored byte-identical.
Two related items the audit raised and this does NOT fix, both reported rather than
silently patched:
* bin/..._lisa lines ~2423 and ~3145 read sampler._rvs["integrand"] UNGUARDED (the
neighbouring argmax reads are guarded). Under AV that key can be absent, so
--maximize-only would KeyError. What those lines should print instead is a judgement
call, not a mechanical port.
* sampler.ntotal is not carried by _snapshot_pass_state, so a rejected warm pass reports
cold lnZ beside the warm pass's ntotal. Identical in the main driver, so it is a shared
defect rather than drift.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
oshaughnessy-junior
deployed
to
private-review-dispatch-rift
August 16, 2026 01:20 — with
GitHub Actions
Active
oshaughnessy-junior
deployed
to
private-review-dispatch-rift
August 16, 2026 11:01 — with
GitHub Actions
Active
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Draft. Stacked on #101 (→ #100 → #99 → #98).
This is a pre-existing LISA defect, not one the catch-up introduced — the catch-up is what made it worth finding. Kept as its own PR so it can be reviewed or dropped independently of the ports.
What
The main driver has:
with the comment: "without this,
--internal-use-lnL --sampler-method AVpassed theok_lnL_methodscheck but silently did nothing, soexp(lnL)overflowed at high SNR when no logarithm offset was set."The LISA driver had branches for GMM,
adaptive_cartesian_gpuand portfolio — and none for AV.High SNR is the LISA MBHB regime, so this is the case rather than an edge, and it matters more now that the preceding passes push AV and portfolio into LISA production.
--sampler-method AV --internal-use-lnLon this driver: they were silently getting the linear-integrand path and will now get the log-space one the option asks for.Why the drift gate could not see it
A missing
ifbranch is not aFUNC,OPTION,CONSTorATTR, so it produces zero gap items. The audit is a name-presence set difference — behaviour behind a shared name is invisible to it. That limitation is now documented inLISA_DRIVER_DRIFT.md(in #99), andtest_lisa_use_lnL_branches.pycloses this particular hole by extracting the per-samplerpinned_paramsbranch table from both drivers and comparing them.The table comparison immediately earned itself: it shows the portfolio branch still differs by exactly the three
--internal-gmm-*forwards (gmm_adaptive,gmm_defensive_frac,gmm_inflate) — the deferred GMM pass. That delta is asserted exactly rather than skipped, so any other divergence still fails and the test tightens by itself when the GMM pass lands.Revert-checked: removing the AV branch fails
test_AV_sets_use_lnL_under_internal_use_lnLandtest_branch_table_matches_the_main_driver[AV]; file restored byte-identical.Reported, not silently patched
Two related items the audit raised that this PR does not fix, because both are judgement calls rather than mechanical ports:
sampler._rvs["integrand"]unguarded (the neighbouringargmaxreads are guarded). Under AV that key can be absent, so--maximize-onlywouldKeyError. What those lines should print instead is your call.sampler.ntotalis not carried by_snapshot_pass_state, so a rejected warm pass reports cold lnZ beside the warm pass'sntotal. Identical in the main driver, so it is a shared defect rather than drift.🤖 Generated with Claude Code