Show the finished comment as a comment
All checks were successful
CI Smoke / host-smoke (push) Successful in 1s
CI Smoke / container-smoke (push) Successful in 3s

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

Assistant: claude-code
Assistant-Model: sonnet
Assistant-Process: 295952@bnt-lap001
Assistant-Session: e93f64ad-516c-46eb-9666-aad8d300c477
This commit is contained in:
tegwick 2026-09-29 18:05:34 +02:00
parent 128d109dea
commit 1d1087fa7f
2 changed files with 9 additions and 2 deletions

View file

@ -602,8 +602,8 @@ def _overview_view(c: Ctx, ov: dict) -> str:
def _close(c: Ctx) -> str:
run = c.run
if c.finished:
note = f" - {e(run.data['outcome_note'])}" if run.data.get("outcome_note") else ""
return (f"<div id=close class=step><h2>Run finished: {e(run.data['outcome'])}</h2><p>{note}</p>{c.app.locked_note(run)}"
note = f"<p>Comment: {e(run.data['outcome_note'])}</p>" if run.data.get("outcome_note") else ""
return (f"<div id=close class=step><h2>Run finished: {e(run.data['outcome'])}</h2>{note}{c.app.locked_note(run)}"
"<p class=note>The outcome is part of this runbook's score and maturity evidence at this revision.</p></div>")
fl = c.fl
steps = [run.data["steps"][s]["state"] for s in fl.steps]

View file

@ -140,6 +140,13 @@ def test_a_closed_run_says_it_is_locked_and_refuses_every_change(srv, pack):
assert run_of(srv, base).data["outcome"] == "abandoned"
def test_the_finished_comment_is_shown_as_a_comment_not_as_a_stray_dash(srv):
base, _ = start(srv, "rtut.showcase-lighthouse-v2")
post(srv, f"{base}/finalize", outcome="abandoned", note="gave up on step two")
body = req(srv, "GET", base)[2]
assert "<p>Comment: gave up on step two</p>" in body and "<p> - " not in body
def test_the_record_file_is_read_only_after_closing_and_tampering_is_called_out(srv):
base, _ = start(srv, "rtut.showcase-lighthouse-v2")
post(srv, f"{base}/finalize", outcome="abandoned")