Skip to content

DRAFT: LISA ILE driver — drift gate + fair-draw weighting family (pass 1 of N) - #98

Closed
oshaughnessy-junior wants to merge 1 commit into
rift_O4dfrom
claude/lisa-driver-catchup
Closed

DRAFT: LISA ILE driver — drift gate + fair-draw weighting family (pass 1 of N)#98
oshaughnessy-junior wants to merge 1 commit into
rift_O4dfrom
claude/lisa-driver-catchup

Conversation

@oshaughnessy-junior

Copy link
Copy Markdown
Owner

Draft. First milestone of a multi-pass effort to catch the LISA ILE driver up with the main one. Not for review-out-of-draft yet.

The two drivers are a deliberate fork (RO, 2026-08-13: "the overhead of one ring to rule them all is too high"). This does not argue with that — it makes the consequence, drift, mechanically visible so it stays a choice.

Measured

On junior/rift_O4d @ 364a22fd: main 4,883 lines, lisa 2,526, with 132 items (helpers, CLI options, module constants, sampler provenance markers) in main and absent from lisa. Both drivers import the same integrators and expose an identical ok_lnL_methods, so all of that drift is in the driver.

The audit + ledger

audit_lisa_driver_drift.py diffs the two by AST across FUNC/OPTION/CONST/ATTR; make_lisa_drift_ledger.py holds the judgements as ordered family rules.

132/132 classified — PORT 70, NA 43, PHYSICS 11, PORTED 8. An item matching no rule fails --check (fired for real once, on --sampler-anisotropic-bins). "Does not apply to LISA" is a fine answer; silence is not.

Two extraction traps recorded: the drivers use optparse (an argparse-only scan reports zero options), and the provenance readers use getattr(obj,'name',default) — a Call, not an Attribute — so a naive scan reports a real port as a no-op.

The port

The three consumers PR #87 actually fixed — the proposal breadcrumb, .dgrid, the .dslice core — do not exist in this driver, so there was no live bug here. The hazard did: the driver sets igrand_fairdraw_samples from --fairdraw-extrinsic-output, and all seven shared rebind sites already set _rvs_is_fairdraw. The marker was arriving and nothing read it.

Ported ln_weights_from_rvs, ln_weights_for_posterior, _rvs_is_export_resample, _rvs_is_equal_weight, _rvs_len, _rvs_lnL_convention and the marker reads.

Trap avoided: --internal-use-lnL is also accepted for adaptive_cartesian_gpu and portfolio, which set use_lnL without return_lnI and still store linear L. The stored convention is derived from pinned_params['return_lnI'], never the option.

Deliberately not done (both recorded at the site):

  • ln_weights_for_posterior passes use_lnL through unresolved, exactly as main does. That is a latent trap in both drivers; a same-named helper behaving differently across the fork would be worse. Worth fixing in both, together.
  • _truthy_option was moved out of this family once its only caller turned out to be the --interpolate-time normalizer — porting it would have been dead code.

Tests

  • test_lisa_fairdraw_weights.py (29), including an anti-drift test pinning each ported helper AST-identical to main's (docstrings excluded). Revert-checked: six mutations, each caught by its named test, file restored byte-identical.
  • test_lisa_driver_drift.py (7), the gate. Revert-checked both directions.

Both wired into the lisa-check CI job — which already ran nine LISA test files and stayed green through all 2,357 lines of this drift, because all nine are import/contract/smoke level. The gate does not test the physics; it refuses to let a new item through without a recorded human decision.

Confirmed not porting (RO, this thread)

.dslice/.dgrid, --rotation-* (LISA has its own modules/TDI), calibration ("maybe eventually but not in this framework"). All recorded NA with reasons in the ledger.

Still open

70 PORT items across later passes — L0 rescue + warm-start state (15, highest value) first — and 11 PHYSICS items needing a decision, listed in LISA_DRIVER_DRIFT.md.

🤖 Generated with Claude Code

…w weighting family

The two ILE drivers are a deliberate fork (RO, 2026-08-13: "the overhead of one
ring to rule them all is too high").  This does not argue with that.  It makes the
consequence -- drift -- mechanically visible, so it stays a choice.

Measured on junior/rift_O4d @ 364a22f: main is 4,883 lines, lisa 2,526, and 132
items (helpers, CLI options, module constants, sampler provenance markers) exist in
main and not in lisa.  Both drivers import the SAME integrators and expose an
identical ok_lnL_methods, so all of that drift is in the driver.

THE AUDIT.  audit_lisa_driver_drift.py diffs the two by AST across FUNC / OPTION /
CONST / ATTR.  Two extraction traps worth recording: the drivers use optparse, so an
argparse-only scan reports zero options; and the provenance readers use the
getattr(obj,'name',default) form, which is a Call and not an Attribute, so a naive
scan reports a real port as a no-op.  Both are handled.

THE LEDGER.  make_lisa_drift_ledger.py holds the judgements as ordered family rules
-> lisa_drift_ledger.json.  132/132 classified: PORT 70, NA 43, PHYSICS 11, PORTED 8.
An item matching no rule is reported and fails --check; that fired for real once, on
--sampler-anisotropic-bins.  "Does not apply to LISA" is a fine answer; silence is not.

THE PORT.  The three consumers PR #87 actually fixed -- the proposal breadcrumb,
.dgrid, and the .dslice core -- do not exist in this driver, so there was no live w^2
bug here.  The hazard did exist: the driver sets igrand_fairdraw_samples from
--fairdraw-extrinsic-output, and all seven shared rebind sites already set
_rvs_is_fairdraw, so the marker was arriving and nothing read it.  Ported
ln_weights_from_rvs, ln_weights_for_posterior, _rvs_is_export_resample,
_rvs_is_equal_weight, _rvs_len, _rvs_lnL_convention and the marker reads.

The trap avoided: --internal-use-lnL is also accepted for adaptive_cartesian_gpu and
portfolio, which set use_lnL WITHOUT return_lnI and still store linear L.  The stored
convention is therefore derived from pinned_params['return_lnI'], never the option.

Deliberately NOT done, both recorded at the site: ln_weights_for_posterior passes
use_lnL through UNRESOLVED exactly as main does (a latent trap in both drivers -- a
same-named helper behaving differently across the fork would be worse); and
_truthy_option was moved out of this family once its only caller turned out to be the
--interpolate-time normalizer, so porting it would have been dead code.

TESTS.  test_lisa_fairdraw_weights.py (29) including an anti-drift test pinning each
ported helper AST-identical to main's, docstrings excluded.  Revert-checked: six
mutations, each caught by its named test, file restored byte-identical.
test_lisa_driver_drift.py (7) is the gate, revert-checked both directions.  Both wired
into the lisa-check CI job.

That job already ran nine LISA test files and stayed green through all 2,357 lines of
this drift, because all nine are import/contract/smoke level.  The gate does not test
the physics; it refuses to let a new item through without a recorded human decision.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@oshaughnessy-junior

Copy link
Copy Markdown
Owner Author

Superseded by #106, which consolidates this stack onto current rift_O4d (d904e72d), adds RO's review commit, and fixes what an adversarial audit found. Content is included there; closing to leave one PR for the review cycle.

@oshaughnessy-junior
oshaughnessy-junior deployed to private-review-dispatch-rift August 16, 2026 11:18 — 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