Skip to content

ci: add a runtime contract job covering the supported Python versions - #96

Merged
abrignoni merged 1 commit into
mainfrom
ci/runtime-contract
Jul 26, 2026
Merged

ci: add a runtime contract job covering the supported Python versions#96
abrignoni merged 1 commit into
mainfrom
ci/runtime-contract

Conversation

@abrignoni

Copy link
Copy Markdown
Owner

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 every scripts/artifacts/*.py and exercises the real PluginLoader
  • .github/workflows/python_runtime_contract.yml — runs the admin/test/scripts suite on 3.10, 3.11 and 3.12, triggered by changes under scripts/ as well as admin/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.txt installed:

  • The suite passes today: 15 tests OK
  • Injecting a multi-line f-string into an artifact fails it, naming the offending file and line
  • VLEAPP has no such breakage today, so this is preventive

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

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>
@abrignoni abrignoni added the Needs Cross Core Leveling for a PR that needs to be applied across other cores. remove once leveled to all. label Jul 26, 2026
@abrignoni
abrignoni merged commit 183df82 into main Jul 26, 2026
3 checks passed
@abrignoni
abrignoni deleted the ci/runtime-contract branch July 26, 2026 00:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs Cross Core Leveling for a PR that needs to be applied across other cores. remove once leveled to all.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant