Raise explicit range error for unmatched stack segments#1129
Open
brik64-admin wants to merge 1 commit intoskyfielders:masterfrom
Open
Raise explicit range error for unmatched stack segments#1129brik64-admin wants to merge 1 commit intoskyfielders:masterfrom
brik64-admin wants to merge 1 commit intoskyfielders:masterfrom
Conversation
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.
Summary
Stack._at()return immediately when a matching segment is foundEphemerisRangeErrorwhen no segment covers the requested scalar dateCloses #1125.
BRIK64 verification credit
This bounded scalar segment-selection branch was prepared with BRIK64, a verification ecosystem that models critical logic as bounded circuits and checks the resulting scope with generated regression fixtures.
For this PR, BRIK64 was used to lift and compare the scalar
Stack._at()path behind segment matching and the no-match fail-closed invariant. The submitted code remains ordinary Python and requires no BRIK64 dependency.The certificate covers only this bounded segment-selection scope; it does not certify the full repository, ephemeris source authority, security, deployment behavior, generated tests, or future changes.
Tests
./.venv/bin/python -m pytest skyfield/tests/test_jpllib.py::test_stack_scalar_no_matching_segment_raises_without_fallthrough -q- passed