From c1f0f7824ef902f83ccb25e19a7f95740d1ce474 Mon Sep 17 00:00:00 2001 From: Mikhail Chusavitin Date: Thu, 9 Jul 2026 16:38:07 +0300 Subject: [PATCH] platform: mirror per-drive disk reports into techdump Storage acceptance runs already write disk--report.txt (per-drive health + pseudographic resource bars) into the timestamped bee-sat run dir. Also mirror it into techdump, a sibling of baseDir under the same export dir, so a support bundle surfaces these reports alongside the rest of the diagnostics without anyone having to dig into a specific bee-sat run dir. Co-Authored-By: Claude Sonnet 5 --- audit/internal/platform/sat.go | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/audit/internal/platform/sat.go b/audit/internal/platform/sat.go index 8028e9b..6855141 100644 --- a/audit/internal/platform/sat.go +++ b/audit/internal/platform/sat.go @@ -718,6 +718,15 @@ func (s *System) RunStorageAcceptancePack(ctx context.Context, baseDir string, e } sort.Strings(devices) + // Disk reports (per-drive health + pseudographic resource bars) are also + // mirrored into techdump, a sibling of baseDir under the same export dir, + // so support bundles surface them alongside the rest of the diagnostics + // without requiring anyone to dig into a timestamped bee-sat run dir. + techDumpDir := filepath.Join(filepath.Dir(baseDir), "techdump") + if err := os.MkdirAll(techDumpDir, 0755); err != nil { + return "", err + } + var summary strings.Builder stats := satStats{} fmt.Fprintf(&summary, "run_at_utc=%s\n", time.Now().UTC().Format(time.RFC3339)) @@ -771,7 +780,9 @@ func (s *System) RunStorageAcceptancePack(ctx context.Context, baseDir string, e } } reportText := GenerateDiskReportText(index+1, devPath, deviceOutputs, time.Now().UTC()) - _ = os.WriteFile(filepath.Join(runDir, "disk-"+prefix+"-report.txt"), []byte(reportText), 0644) + reportName := "disk-" + prefix + "-report.txt" + _ = os.WriteFile(filepath.Join(runDir, reportName), []byte(reportText), 0644) + _ = os.WriteFile(filepath.Join(techDumpDir, reportName), []byte(reportText), 0644) } writeSATStats(&summary, stats)