CIP: give the master sample mask a name it keeps - #357
Merged
Merged
Conversation
oshaughnessy-junior
deployed
to
private-review-dispatch-rift
September 16, 2026 14:22 — with
GitHub Actions
Active
oshaughnessy-junior
force-pushed
the
claude/cip-indx-ok-scope
branch
from
September 17, 2026 12:39
c608a91 to
d0ddbd3
Compare
oshaughnessy-junior
deployed
to
private-review-dispatch-rift
September 17, 2026 12:39 — with
GitHub Actions
Active
oshaughnessy-junior
deployed
to
private-review-dispatch-rift
September 17, 2026 12:52 — with
GitHub Actions
Active
`indx_ok` names the master mask, applied to samples[p], dat_logL, joint_prior and joint_s_prior. Six later blocks rebound the same name for throwaway local cuts: three spin-prior range cuts in the reweighting chain, and the "significant points" subset in three corner-plot blocks. Nothing read the master mask after its four applications, so this was a trap rather than a bug -- a new block indexing with `indx_ok` gets an array of the right length and the wrong meaning, with no error. The local cuts are now indx_in_range and indx_significant. Un-rename the result and its AST equals base. The reweighting chain also has two elif branches with byte-identical conditions, so the second never runs. 3dc31ff added both in one commit and copy-pasted the guard, and the intent is recoverable. It is NOT fixed here. Dropping the `not` reaches a body that reads samples["s1x"]/["s1y"], which an aligned-spin chiz coordinate set does not have, so a CLI combination that completes today dies on KeyError instead -- the CODE PATH NOT YET WORKING exit does not cover it, being an elif on 'chiz_plus' that `s1z` claims first. The branch stays dead and the comment carries the anti-instruction. test_cip_indx_ok_scope.py pins the naming, statically, over CIP and the EOS driver, and runs in .travis/test-posterior.sh. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
oshaughnessy-junior
force-pushed
the
claude/cip-indx-ok-scope
branch
from
September 19, 2026 12:57
cb347d2 to
f9e75c3
Compare
oshaughnessy-junior
marked this pull request as ready for review
September 19, 2026 12:57
oshaughnessy-junior
had a problem deploying
to
private-review-dispatch-rift
September 19, 2026 12:57 — with
GitHub Actions
Error
oshaughnessy-junior
deployed
to
private-review-dispatch-rift
September 19, 2026 12:57 — with
GitHub Actions
Active
oshaughnessy-junior
deployed
to
private-review-dispatch-rift
September 19, 2026 13:34 — with
GitHub Actions
Active
This branch was successfully deployed
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.
Cleanup found while reviewing #355. Not a live bug. Rebased onto
4adf96500.indx_okhad two meaningsThe master post-integration mask is applied to
samples[p],dat_logL,joint_priorandjoint_s_prior. Six later blocks rebound the same name for local cuts: three spin-priorrange cuts, three "significant points" subsets in the corner plots. Nothing reads the master
mask after those four applications, so nothing was wrong; a new block indexing with
indx_okwould get an array of the right length and the wrong meaning, with no error. Renamed to
indx_in_rangeandindx_significant. The fit-point mask earlier in the file keeps itsname: it has one meaning and is dead before the master mask is built.
#361 walked into this while I had the branch open. It added
indx_ok = np.logical_and(indx_ok, divisible_sampling_density(...))to two of these blocks,chaining off the local cut, and gave the cartesian branch's version its own name
indx_pw.Same instinct, and the rebase carries those lines over as
indx_in_range.The driver diff contains no executable change. Un-rename the branch and its AST equals
4adf96500, token for token. That check alone cannot see a missed occurrence, sinceun-renaming is idempotent, so the new guard covers that half: it fails if any
indx_okreadsurvives past the mask. Neither new name appears anywhere upstream, so no binding is captured.
The dead
elifis left deadTwo branches of the reweighting chain have byte-identical conditions, so the second never
runs.
3dc31ff53added both in one commit and copy-pasted the guard, and the intent isrecoverable: the first is labelled "Uniform sampling" and leaves
prior_weightalone, thesecond divides it out, which is what
--pseudo-uniform-magnitude-prior-alternate-samplingneeds.
I first dropped the
not, arguing the branch stays unreachable behind theCODE PATH NOT YET WORKINGsys.exit(0). Adversarial review showed that is wrong: the exitis an
elifonchiz_plusthats1zclaims first, soslips past it. Measured: base exits 0, the guard edit exits 1 on
KeyError: 's1y'after theintegral is paid for, because the body reads
samples["s1x"]and["s1y"], which analigned-spin chiz coordinate set does not have. The branch is reachable only where it raises.
Reverted. The branch stays dead and the comment records the intent, why a guard edit does not
deliver it, and not to retry without fixing the body.
Verified on this base
4adf96500.travis/test-posterior.sh, incl. the plotting arm4adf96500vs on this branch.travis/test-ci-roster.pyTests
test_cip_indx_ok_scope.py, static, over CIP andutil_ConstructEOSPosterior.py, wired into.travis/test-posterior.sh. It asserts the anchor exists, thatindx_okis never reboundafter the mask is applied, that later reads only re-mask another
samples[...]entry, andthat no helper rebinds it via
global. The EOS driver already passes; it is in scope becausea repo-wide sweep found exactly two module-level
dat_logL = dat_logL[mask]sites.Adversarial review found three holes in an earlier version of the guard, all fixed: a foreign
re-mask passed, a helper one indent deeper was invisible while a top-level one went red on
correct code, and a missing driver skipped rather than failed. Mutants caught: each rename
reverted, a missed load, a foreign re-mask, a
globalrebind, a missing driver, the anchorremoved. A correct top-level helper stays green. Unmutated control on both sides, in a
throwaway worktree.
Gate 7c: skipped deliberately
No production-style multi-stage run. The driver diff has no executable change, so nothing an
operator types can reach different behaviour. RO agreed. If one is ever wanted, the settings
are in
~/pr223_e2e/S240426s_batchmode/common_args.txt.🤖 Generated with Claude Code