(runID int64, runOutputDir string, verbose bool)
| 889 | } |
| 890 | |
| 891 | func parseAgentLogIfRequested(runID int64, runOutputDir string, verbose bool) { |
| 892 | awInfoPath := filepath.Join(runOutputDir, "aw_info.json") |
| 893 | engine := extractEngineFromAwInfo(awInfoPath, verbose) |
| 894 | if engine == nil { |
| 895 | if verbose { |
| 896 | fmt.Fprintln(os.Stderr, console.FormatInfoMessage("No engine detected (aw_info.json missing or invalid); skipping agent log rendering")) |
| 897 | } |
| 898 | return |
| 899 | } |
| 900 | if err := parseAgentLog(runOutputDir, engine, verbose); err != nil { |
| 901 | if verbose { |
| 902 | fmt.Fprintln(os.Stderr, console.FormatWarningMessage(fmt.Sprintf("Failed to parse agent log for run %d: %v", runID, err))) |
| 903 | } |
| 904 | return |
| 905 | } |
| 906 | logMdPath := filepath.Join(runOutputDir, "log.md") |
| 907 | if fileutil.FileExists(logMdPath) { |
| 908 | fmt.Fprintln(os.Stderr, console.FormatSuccessMessage(fmt.Sprintf("✓ Parsed log for run %d → %s", runID, logMdPath))) |
| 909 | } |
| 910 | } |
| 911 | |
| 912 | func parseFirewallLogsIfRequested(runID int64, runOutputDir string, verbose bool) { |
| 913 | if err := parseFirewallLogs(runOutputDir, verbose); err != nil { |
no test coverage detected