df
Some checks failed
smoke-mm / Install & smoke test mm --help (push) Has been cancelled

This commit is contained in:
2025-12-29 17:05:03 -08:00
parent 226de9316a
commit c019c00aed
104 changed files with 19669 additions and 12954 deletions

View File

@@ -3,6 +3,7 @@
The TUI is a frontend to the CLI, so it must use the same pipeline executor
implementation as the CLI (`CLI.PipelineExecutor`).
"""
from __future__ import annotations
import contextlib
@@ -149,7 +150,10 @@ class PipelineRunner:
try:
with capture_rich_output(stdout=stdout_buffer, stderr=stderr_buffer):
with contextlib.redirect_stdout(stdout_buffer), contextlib.redirect_stderr(stderr_buffer):
with (
contextlib.redirect_stdout(stdout_buffer),
contextlib.redirect_stderr(stderr_buffer),
):
if on_log:
on_log("Executing pipeline via CLI executor...")
self._executor.execute_tokens(list(tokens))
@@ -166,7 +170,11 @@ class PipelineRunner:
# Pull the canonical state out of pipeline context.
table = None
try:
table = ctx.get_display_table() or ctx.get_current_stage_table() or ctx.get_last_result_table()
table = (
ctx.get_display_table()
or ctx.get_current_stage_table()
or ctx.get_last_result_table()
)
except Exception:
table = None
@@ -259,7 +267,11 @@ class PipelineRunner:
try:
hist = list(getattr(ctx, "_RESULT_TABLE_HISTORY", []) or [])
snap["_RESULT_TABLE_HISTORY"] = [
(t, (items.copy() if isinstance(items, list) else list(items) if items else []), subj)
(
t,
(items.copy() if isinstance(items, list) else list(items) if items else []),
subj,
)
for (t, items, subj) in hist
if isinstance((t, items, subj), tuple)
]
@@ -269,7 +281,11 @@ class PipelineRunner:
try:
fwd = list(getattr(ctx, "_RESULT_TABLE_FORWARD", []) or [])
snap["_RESULT_TABLE_FORWARD"] = [
(t, (items.copy() if isinstance(items, list) else list(items) if items else []), subj)
(
t,
(items.copy() if isinstance(items, list) else list(items) if items else []),
subj,
)
for (t, items, subj) in fwd
if isinstance((t, items, subj), tuple)
]
@@ -278,7 +294,9 @@ class PipelineRunner:
try:
tail = list(getattr(ctx, "_PENDING_PIPELINE_TAIL", []) or [])
snap["_PENDING_PIPELINE_TAIL"] = [list(stage) for stage in tail if isinstance(stage, list)]
snap["_PENDING_PIPELINE_TAIL"] = [
list(stage) for stage in tail if isinstance(stage, list)
]
except Exception:
pass