fix: 'check' returns combined output (was silent on success)

The check composite returned ActionResult with no output on success, so the
dashboard's 'Check All' (and the CLI) showed nothing when checks passed — only
a failing sub-verb ever produced output. It now accumulates each sub-verb's
output with a ✓/✗ marker (lint / type-check / test), on both success and
failure, so the output panel always shows what ran.

Also fixes lan-info's type-check: socket.getaddrinfo sockaddr is loosely typed,
so str(infos[0][4][0]) makes the address an unambiguous str.

core 94 green; ruff clean; verified POST /programs/lan-info/check returns output.
This commit is contained in:
2026-06-15 09:40:46 -07:00
parent 71994bbaf9
commit 392d9039d8

View File

@@ -338,14 +338,20 @@ async def run_action(verb: str, name: str, comp: ProgramSpec, root: Path) -> Act
program=name, action="check", status="error",
output="No checkable verbs available.",
)
sections: list[str] = []
for sub in subs:
result = await run_action(sub, name, comp, root)
mark = "" if result.status == "ok" else ""
body = result.output.strip()
sections.append(f"{mark} {sub}" + (f"\n{body}" if body else ""))
if result.status != "ok":
return ActionResult(
program=name, action="check", status="error",
output=f"{sub} failed:\n{result.output}",
output="\n\n".join(sections),
)
return ActionResult(program=name, action="check", status="ok")
return ActionResult(
program=name, action="check", status="ok", output="\n\n".join(sections)
)
# 1. Declared command overrides the stack default.
declared = _declared_commands(comp, verb)