ci: add a runtime contract job covering the supported Python versions - #96
Merged
Conversation
VLEAPP had no job that imports artifact modules, so nothing verified that a change still parses on the older Python versions users are told to run. Syntax accepted by a newer interpreter is not always accepted by an older one: a multi-line expression inside an f-string needs 3.12 (PEP 701). ALEAPP hit exactly this: a 3.12-only f-string reached main and stayed broken until it began failing unrelated pull requests (ALEAPP #986, filter widened in ALEAPP #989, ported to iLEAPP in iLEAPP #1761). This completes the set. Adds test_artifact_imports.py, which imports every scripts/artifacts/*.py and exercises the real PluginLoader, and a workflow running the admin/test/scripts suite on 3.10, 3.11 and 3.12, triggered by changes under scripts/ as well as admin/test/scripts/. Verified on a real 3.10 environment: the suite passes today, and injecting a multi-line f-string into an artifact fails it with the offending file and 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.
Completes the runtime-contract protection across the LEAPP family (ALEAPP #989, iLEAPP #1761).
Problem
VLEAPP has no job that imports artifact modules, so nothing verifies that a change still parses on the older Python versions users are told to run.
Syntax accepted by a newer interpreter is not always accepted by an older one. A multi-line expression inside an f-string, for instance, requires 3.12 (PEP 701), and most of us develop on 3.12+.
ALEAPP hit exactly this: a 3.12-only f-string reached main and sat there until it started failing CI on unrelated pull requests (fixed in ALEAPP #986, filter widened in ALEAPP #989, ported to iLEAPP in iLEAPP #1761).
What this adds
admin/test/scripts/test_artifact_imports.py— imports everyscripts/artifacts/*.pyand exercises the realPluginLoader.github/workflows/python_runtime_contract.yml— runs theadmin/test/scriptssuite on 3.10, 3.11 and 3.12, triggered by changes underscripts/as well asadmin/test/scripts/Thresholds are floors, not exact counts (against 38 artifact modules and 74 plugins today), so ordinary additions and removals do not fail the build while a collapse in what loads still does.
Verification
On a real Python 3.10 environment with
requirements.txtinstalled:Note on the version matrix
The README says "Python 3.9 or above", but the matrix starts at 3.10 because 3.9 reached end of life in October 2025 and the other cores test from 3.10. Worth either updating the README or adding 3.9 to the matrix if 3.9 really is still supported.
🤖 Generated with Claude Code