platform/app: restructure support bundle/blackbox mirror into device-type export/, status/, tasks/, livecd/

Replaces the flat export/ + techdump/ + system/ + systemd/ layout (two
same-named-but-different techdump/ dirs, disk reports duplicated between a
SAT run dir and techdump/) with one shared categorizeExportTree used by both
BuildSupportBundle and the blackbox USB mirror:

- export/{cpu,memory,storage,gpu,network,platform}/ — raw vendor-tool
  output grouped by device type, plus export/reanimator.json ready to POST
  to Reanimator's /ingest/hardware endpoint.
- status/ — computed diagnosis (component-status.json, runtime-health.*,
  and metrics.db, previously missing from every bundle entirely).
- tasks/ — bee's own task-run bookkeeping (bee-sat/, bee-bench/, task
  reports, service logs) where duplication with export/ is expected.
- livecd/{gui,host}/ — live-boot/kiosk-session-only diagnostics, kept out
  of the hardware-facing tree.

Drops the redundant disk-report mirror write in RunStorageAcceptancePack
and the now-dead syncDirectoryTree/removeMissingPaths; adds a size+mtime
skip in copyPath so the blackbox mirror doesn't rewrite unchanged files
every cycle. README.md rewritten to match.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Mikhail Chusavitin
2026-07-28 14:33:26 +03:00
co-authored by Claude Sonnet 5
parent e03267a72f
commit fa618d5abb
6 changed files with 412 additions and 233 deletions
-10
View File
@@ -822,15 +822,6 @@ 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))
@@ -898,7 +889,6 @@ func (s *System) RunStorageAcceptancePack(ctx context.Context, baseDir string, e
reportText := GenerateDiskReportText(index+1, devPath, deviceOutputs, time.Now().UTC())
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)