fix(ci): master Test workflow green on Python 3.12 and ubuntu-26.04
🧪 Test / 🧪 Lock + lint (push) Canceled after 0s
🧪 Test / 🧪 Lock + lint (push) Canceled after 0s
- CI installs PyYAML (new dependency group test) so the staged-diff secret rules load; the Update workflow also installs the orchestrator requirements - operator.py: termios.IUTF8 falls back to 0o40000 on Python 3.12, where the terminal prompt crashed with AttributeError - operator.py: the run preview trusts filters of the system and global git config (git-lfs on runner images) and stays off for repo or command filters, and when git cannot name a filter's scope - test_radio feeds the listener its stdin through an own pipe, since 3.12 communicate() flushes a closed proc.stdin - test_hub_match_content gives the runner a MEDUSA rules home instead of the host's - test_queue_hung uses a script named docker, since a multicall sleep refuses that name 🎯 Fix: 93 % 💥 Break: 3 % 💸 Tokens: – ⏱️ Velocity: – 🛡️ Security: 100 % 🏆 Score: 90 🚦 Gate: ✅ 90/5, tokens and velocity <= 100, security 100 % Created-with: https://s.veen.world/skills Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
d3bc54f401
commit
888ebb40af
8 files changed
+71
-25
No files matched your search
@@ -53,7 +53,8 @@ Args:
|
||||
answer, is skipped with the reason and stays open (unready()).
|
||||
Otherwise a preview of what the command changes, its output indented, and asks [y]es /
|
||||
[s]kip / [c]ancel / [d]iff / [q]uit; d shows the full diff. A repo
|
||||
whose git config names filter commands gets no preview. c asks for a
|
||||
whose git config names filter commands outside the system and global
|
||||
config gets no preview. c asks for a
|
||||
reason (empty: back to the question), sets the row as shown stopped
|
||||
with it and sends it as a message; a row changed since it was shown
|
||||
is not cancelled. y runs the command in its directory,
|
||||
@@ -207,6 +208,9 @@ INDENT = " "
|
||||
LABEL = 11
|
||||
OUTPUT = " "
|
||||
QUEUE_COLUMNS = ("position", "id", "status", "task", "eta_min")
|
||||
IUTF8 = getattr(termios, "IUTF8", 0o40000)
|
||||
TRUSTED_SCOPES = frozenset({"system", "global"})
|
||||
CONFIG_ANSWERS = (0, 1)
|
||||
|
||||
|
||||
def fail(message: str) -> None:
|
||||
@@ -542,11 +546,15 @@ def git_tree(directory: str) -> bool:
|
||||
|
||||
def filtered(directory: str) -> bool:
|
||||
try:
|
||||
return subprocess.run(
|
||||
[*GIT, "config", "--get-regexp", r"^filter\."], cwd=directory, env=git_env(), capture_output=True, check=False
|
||||
).returncode == 0
|
||||
found = subprocess.run(
|
||||
[*GIT, "config", "--show-scope", "--name-only", "--get-regexp", r"^filter\."],
|
||||
cwd=directory, env=git_env(), capture_output=True, text=True, check=False,
|
||||
)
|
||||
except OSError:
|
||||
return False
|
||||
if found.returncode not in CONFIG_ANSWERS:
|
||||
return True
|
||||
return any(line.partition("\t")[0] not in TRUSTED_SCOPES for line in found.stdout.splitlines())
|
||||
|
||||
|
||||
def evidence(check: str, directory: str, full: bool) -> list[tuple[list[str], str]]:
|
||||
@@ -606,7 +614,7 @@ def whole_characters(read: Callable[[str], str | None]) -> Callable[[str], str |
|
||||
if not sys.stdin.isatty():
|
||||
return read(prompt)
|
||||
mode = termios.tcgetattr(sys.stdin.fileno())
|
||||
termios.tcsetattr(sys.stdin.fileno(), termios.TCSANOW, [mode[0] | termios.IUTF8, *mode[1:]])
|
||||
termios.tcsetattr(sys.stdin.fileno(), termios.TCSANOW, [mode[0] | IUTF8, *mode[1:]])
|
||||
try:
|
||||
return read(prompt)
|
||||
finally:
|
||||
|
||||
Reference in new issue
Block a user