Repository navigation
refactor(util): read the helper's annotations in #1672's KTLO scan, then use it for the rest (#2047) - #2054
Merged
Conversation
…hen use it for the rest (#2047) - tests/project/test_ktlo_legs_stay_green_1672.py: commands() now reads an annotation written through util/_actions.py at its level -- annotate() or annotation(), as an attribute or a name imported from _actions, by first argument or level= -- and a level it cannot read counts as one no KTLO step may write. pip_install's helper annotation, unseen until now, reads as ${ANNOTATION_LEVEL}. New checks seed copies of util/leg_summary.py. - apt_packages, leg_summary, coverage_report: the annotations batch 1 left literal go through the helper, unescaped as before; output is unchanged.
Owner
Author
|
GOOD TO GO at
Known limits, not blocking: |
Owner
Author
|
Ordering check on |
Contributor
|
Coverage: 91.54% (unit tier, Python 3.15,
Per-file detail: the |
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.
make pylint,make mypy,make isort)make testpasses, and a test case covers the changeWhat is the purpose of your pull request?
refactor— restructures code without changing behaviourDescription of your pull request and other information
The second PR for #2047 (owner's ruling: option (a)).
commands()intest_ktlo_legs_stay_green_1672.py. It now also parses eachutil/script a step runs for_actions.annotate/annotationcalls: by attribute, by imported name or alias, with the level positional orlevel=. A literal level counts as itself, and a name maps to${NAME}. An unreadable level becomes{?}, which fails the guard rather than passing._actions.annotate('error', ...)intoutil/leg_summary.pyfails the guard on every KTLO job (10 failures). The old guard missed it, and seeding'warning'passes.pip_install.pyalready used the helper and was invisible to the old regex. It now reads as${ANNOTATION_LEVEL}, which the guard allows.apt_packages.py,leg_summary.pyandcoverage_report.py. They useescape=Falsewhere a script escapes its own way.main's copies and this PR's give byte-identical stdout, stderr, exit code, outputs and summary: 144/144 cases under/usr/bin/python3.7and 144/144 under 3.14, across four locale settings.90 passedfor the first three). No existing assertion is weakened; the guard only gains reads.