ci: cover the entry points in the runtime contract - #382
Merged
Conversation
The runtime contract watches scripts/ and admin/test/scripts/, but not rleapp.py or rleappGUI.py, so a change to either could break on the oldest supported Python and only surface when a user ran it. The two are checked differently. rleapp.py guards startup with '__main__', so it is imported outright, catching import-time errors as well as syntax. rleappGUI.py builds its window at module level and cannot be imported without a display, so it is compiled instead, which still catches the syntax-level breakage this guards against. Levelled from iLEAPP #1770. Verified on Python 3.10: passes today, and a multi-line f-string in the GUI fails with the offending line. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Levels the entry-point coverage from iLEAPP #1770.
Problem
The runtime contract triggers on
scripts/**andadmin/test/scripts/**, but not on the entry points themselves. A change breaking either on the oldest supported Python would only surface when a user ran the tool.Why the filter alone is not enough
Adding the paths without a test would make the job run and go green while testing nothing about the entry points. So the test comes with it.
Two files, two techniques
if __name__, so importing is safe and catches import-time errors as well as syntaxVerification on Python 3.10
The GUI file was restored afterwards.
🤖 Generated with Claude Code