fix(unify): repair what the night merges broke between lanes
937c2c0 added the line prefix KEPT to watch.py, which shadowed the state directory path watch.KEPT that gates.py and the queue cleanup use; the prefix is now KEPT_LINE. The receipts page test gets an identity revealed() since page-dom.js wraps names through it after the firewall merge, the operator tasks test expects the Home tab of 008, and the hub view id fixture uses a non-ASCII word the English check accepts. Accepted MEDUSA false positives, re-keyed by the rename: MM-SCAN-058 at watch.py:1417 and WM-SCAN-354 at watch.py:1418.
🎯 Fix: 92 %
💥 Break: 2 %
💸 Cost: –
⏱️ Time: –
🛡️ Security: 100 %
🏆 Score: 90
🚦 Gate: ✅ 90/5, cost and time <= 100, security 100 %
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
0470152304
commit
1e5aac8a37
4 files changed
+6
-6
No files matched your search
@@ -184,7 +184,7 @@ IN_USE = re.compile(
|
||||
r"image is being used by (?:running|stopped) container \S+$",
|
||||
re.MULTILINE,
|
||||
)
|
||||
OK, KEPT = "ok: ", "kept (in use): "
|
||||
OK, KEPT_LINE = "ok: ", "kept (in use): "
|
||||
GUARD_REFUSED = 3
|
||||
SHIM = '#!/bin/sh\nexec {python} -I {watch} guard {real} {report} "$@"\n'
|
||||
REFUSALS = {
|
||||
@@ -1415,12 +1415,12 @@ def remove_leftovers(prefix: list[str]) -> list[str]:
|
||||
for image in dict.fromkeys(fields[0] for fields in rows if fields[1:] == [NONE, NONE] and IMAGE_ID.fullmatch(fields[0])):
|
||||
code, _, err = run_step([*prefix, "rmi", image], False)
|
||||
in_use = code != 0 and IN_USE.search(err.decode(errors="replace")) is not None
|
||||
lines.append(KEPT + shown(prefix, ["rmi", image]) if in_use else result_line(code, shown(prefix, ["rmi", image])))
|
||||
lines.append(KEPT_LINE + shown(prefix, ["rmi", image]) if in_use else result_line(code, shown(prefix, ["rmi", image])))
|
||||
return lines
|
||||
|
||||
|
||||
def cleanup_failures(results: list[str]) -> list[str]:
|
||||
return [line for line in results if not line.startswith((OK, KEPT))]
|
||||
return [line for line in results if not line.startswith((OK, KEPT_LINE))]
|
||||
|
||||
|
||||
def guard_env(directory: Path, report: Path, binaries: dict[str, str | None]) -> dict[str, str]:
|
||||
|
||||
Reference in new issue
Block a user