From c8cf6f86cda5f8a0beaffeadd4c85c4d237a5d9a Mon Sep 17 00:00:00 2001 From: Jason Lernerman Date: Sun, 12 Jul 2026 20:14:21 -0400 Subject: [PATCH] reuse runReporter for the non-TUI interactive report file The interactive branch hand-rolled the temp-file report and omitted the broken-agent note, agent log path, and dashboard URL that the TUI's report file includes via runReporter.Finish. --- cmd/lk/simulate_ci.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/cmd/lk/simulate_ci.go b/cmd/lk/simulate_ci.go index fe9e953c..0de3880c 100644 --- a/cmd/lk/simulate_ci.go +++ b/cmd/lk/simulate_ci.go @@ -177,10 +177,9 @@ func runSimulateCI(ctx context.Context, config *simulateConfig) error { // A terminal is watching; we just couldn't open the TUI (e.g. stdin // isn't a TTY). Keep it to counts and pointers, the per-scenario // transcripts go to a report file like the TUI's. - if f, err := os.CreateTemp("", "lk-simulate-report-*.txt"); err == nil { - writeRunResults(asciiWriter{f}, run, agent) - f.Close() - out.Statusf("Run report: %s", f.Name()) + dashboardURL := simulationDashboardURL(config.pc.ProjectId, runID) + if path := newRunReporter().Finish(run, agent, brokenAgent, dashboardURL); path != "" { + out.Statusf("Run report: %s", path) } total, _, passed, failedN := simulationJobCounts(run) fmt.Fprintf(out.ResultWriter(), "%d total, %d passed, %d failed\n", total, passed, failedN)