Repository navigation
Prove the shared Li tolerance floor without sorting all pixels - #1086
Merged
Merged
Conversation
trissim
force-pushed
the
perf/li-tolerance-observed-witness-20261006
branch
from
October 6, 2026 22:35
05bed1c to
8ffd365
Compare
trissim
changed the base branch from
fix/native-payload-domain-composition-20261006
to
main
October 6, 2026 22:35
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.
Li thresholding currently sorts all distinct pixel values to calculate its stopping tolerance. An observed positive pixel gap no greater than twice the existing floor proves that the complete-array tolerance equals the floor; this change uses that exact witness and retains the original full calculation when no witness exists. It leaves NumPy float32 reduction order and threshold calculation unchanged.
Closes #1085. This threshold-only change is independent of the pending mixed-device composition changes.
Validation: 17 existing focused threshold hotpath tests passed, including strided/transposed inputs, a close pair missed by the sample, constants, sparse values, and NaN/Inf. A saved genuine Vitra normalized-protein replay matched the original production helper and Li threshold exactly across 19 controls. Seven alternating owner-timing pairs measured old Li 30.37 ms versus new 11.54 ms (18.84 ms median reduction); this is numerical-owner evidence only, not whole-pipeline savings or an additive primary/secondary claim.
Replay input SHA256:
a4b6ade8b70376390e578f9938bdb92a44f4b2fa12607922a0566d9ccf91c9cc; original production source:684f14077476f9b58c1830a5113afe9977b8106e. No pipeline recapture or environment changes.Ordinary main receiving on
478942fc54a8e3fa6b33539a72dc8f9ba46cde81: one Vitra source well, one worker/thread on CPU5, warmup plus three measured repetitions. All four complete declared image/CSV/database/inventory comparisons passed. Median complete SERVER_PIPELINE_JOB 0.973018 s versus retained guarded stock CP 2.966630 s (3.049×); total 1.228103 versus 2.967356 s (2.416×). Registry/kernel/server startup and scientific comparison excluded. This is an independent whole-pipeline observation on merged main, not isolated per-patch causation or a refreshed whole-cohort minimum. Receipt/report custody remains at/home/ts/.local/state/openhcs-maintenance/20261006/vitra-main-li-witness-ordinary-v1; report SHA256828a0eb4b2d99c3363b320b8d7233f3b1e1e9bda8072fbd0afcfb2bf6a8668e8.