Repository navigation
Conversation
… checks that parameter covers its rows The coverage check anti-joins a sparse constant-side parameter against the rows a constraint builds. Where the constraint's where requires that parameter on its AND spine, the mask kept only rows where it has a value, and the loader refuses a where that reads a dim outside the constraint's, so the anti-join can find nothing. It is skipped there. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011o3uXC8ofHZk34Wpb3uFtR
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011o3uXC8ofHZk34Wpb3uFtR
Merging this PR will not alter performance
Comparing Footnotes
|
…stant-check # Conflicts: # CHANGELOG.md
…l checked Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015LJh8zKF2v86hQ9rhfka1q
FBumann
marked this pull request as draft
November 11, 2026 10:39
This branch has not been 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.
Note
The following content was generated by AI.
A constraint like
sector's balance (where: demand,== demand) no longer checks thatdemandcovers its rows: the mask already kept only rows wheredemandhas a value. Thesectorbuild at its largest size is about 11% faster.Why the check cannot fail there
refuse_short_constantsanti-joins each sparse constant-side parameter against the rows the constraint builds. It is now skipped for a parameter the constraint'swhererequires on itsANDspine, that is,certain_names(c.where). A name thewherereads only under anoror anotis still checked. Two facts make the skip safe:ParameterDefinedneeds a non-null, finite value there, andParameterComparisonis false on a null.wherethat reads a parameter with a dim outside the constraint's dims (where-parameter 'c' reads dims ['k'] outside the frame ['t']). The check keys on the parameter's dims that the constraint also has, so every key it would ask for is the coordinate of a row the mask kept. This holds whether or not the constant side then sums one of those dims away.So the anti-join can only ever find zero missing coordinates for such a parameter. A parameter under a shift is unchanged: the old check also anti-joined the unshifted keys, and
constant_sidestill finds a shifted gap as a null on the rows pass._certain_namesinpredicates.pybecomescertain_names, becausecoverage.pynow reads it.Probe, mutation table and gates
New
tests/test_absence.py::test_the_coverage_check_skips_a_parameter_the_mask_requiresrecords which parameters the check asks for:coverage.pyfrommain)where: ccwhere: c > 0cwhere: w > 0(cstill asked)where: c or w > 0(cstill asked)The
orcase was added after review (d1d5ed1). Without it, widening the skip to every name thewherereads left the full suite green, whilewhere: 'c or w > 0'over a shortcwas then accepted with no error instead of refused.Mutations of
required = certain_names(c.where)inrefuse_short_constants, by hand (git checkout --to restore,__pycache__dropped on both sides, tree clean after each), ontests/test_absence.py:frozenset())wherereads (c.where.names_read)c only under an or)The existing tests that refuse a short constant side, including
test_a_where_is_the_escape_from_the_constant_side_check, still pass.Gates at d1d5ed1:
pixi run check5605 passed, 566 skipped, 4 xfailed.A/B, build only (`sps.build`, no solver), this container (4 cores, not the publishing machine)
Base 6e797ad, head this branch before the merge of
main. One process per measurement, alternated base/head three times. Each process timessps.build5 times (9 forsector m). Numbers are min / median per process, in seconds.where)At
sector mthe difference is within this machine's noise.nodalhas nowhereon its balance and does not change. Since then, the branch has added a test only, and nosrc/change landed onmainbetween 6e797ad and 2588883.Not done here: the right-hand side of the same constraint still joins
demandonto the rows a second time. That is #2036.🤖 Generated with Claude Code
https://claude.ai/code/session_011o3uXC8ofHZk34Wpb3uFtR
https://claude.ai/code/session_015LJh8zKF2v86hQ9rhfka1q