fix(ci): master Test workflow green on Python 3.12 and ubuntu-26.04
🧪 Test / 🧪 Lock + lint (push) Waiting to run

- 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:
Kevin Veen-BirkenbachandClaude Opus 5.5 committed 2026-11-25 09:20:36 +00:00
1 parent d3bc54f401
commit 888ebb40af
8 files changed
+71 -25

No files matched your search

+7 -1
View File
@@ -1,14 +1,17 @@
from __future__ import annotations
import json
import os
import re
import time
import unittest
from pathlib import Path
from unittest import mock
from hub_support import ASK, HUB, REPO_ROOT
from kvb_orchestrator import scores
from test_hub_match import MatchCase, git, merge_repo, move_head
from test_hub_operator_tasks import rules_dir, staged_diff
ORDER = ["fix", "break", "tokens", "velocity", "security", "legal", "architecture", "score"]
FULL = "🎯 Fix: 95 % · 💥 Break: 3 % · 💸 Tokens: 100 % · ⏱️ Velocity: 100 % · 🛡️ Security: 99 · ⚖️ Legal: 98 · 🏛️ Architecture: 97 · 🏆 Score: 96"
@@ -34,7 +37,10 @@ class TestMergeDiff(MatchCase):
status, _, body = self.call("GET", "/api/runner/previews", None, self.client())
self.assertEqual(status, 200, body)
self.assertEqual([(row["id"], row["worktree"], row["tree"], row["head"]) for row in json.loads(body)["reviews"]], [(review, str(self.repo), tree, None)])
self.run_runner(register=False)
home = self.outside / "medusa-home"
rules_dir(home / staged_diff.RULES_HOME.relative_to(Path.home()) / Path(staged_diff.RULES_TAIL.replace("*", "")).parent)
with mock.patch.dict(os.environ, {"HOME": str(home), "XDG_CACHE_HOME": str(home / ".cache")}):
self.run_runner(register=False)
card = self.card(f"review:{review}")
self.assertEqual([(entry["path"], entry["status"], entry["additions"]) for entry in card["files"]], [("app.py", "M", 1)])
self.assertIn("+added = 2", card["files"][0]["patch"])