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
+12 -12
View File
@@ -889,7 +889,7 @@ func TestBuildSupportBundleIncludesExportDirContents(t *testing.T) {
t.Fatalf("read tar entry: %v", err)
}
names = append(names, hdr.Name)
if contains(hdr.Name, "/export/bee-audit.json") {
if contains(hdr.Name, "/export/reanimator.json") {
body, err := io.ReadAll(tr)
if err != nil {
t.Fatalf("read audit entry: %v", err)
@@ -906,15 +906,15 @@ func TestBuildSupportBundleIncludesExportDirContents(t *testing.T) {
}
for _, want := range []string{
"/system/ip-link.txt",
"/system/ip-link-stats.txt",
"/techdump/kernel-aer-nvidia.txt",
"/techdump/lspci-nvidia-bridges-vv.txt",
"/techdump/pcie-aer-sysfs.txt",
"/techdump/ethtool-info.txt",
"/techdump/ethtool-link.txt",
"/techdump/ethtool-module.txt",
"/techdump/mstflint-query.txt",
"/livecd/host/ip-link.txt",
"/livecd/host/ip-link-stats.txt",
"/export/gpu/kernel-aer-nvidia.txt",
"/export/gpu/lspci-nvidia-bridges-vv.txt",
"/export/gpu/pcie-aer-sysfs.txt",
"/export/network/ethtool-info.txt",
"/export/network/ethtool-link.txt",
"/export/network/ethtool-module.txt",
"/export/network/mstflint-query.txt",
} {
var found bool
for _, name := range names {
@@ -930,10 +930,10 @@ func TestBuildSupportBundleIncludesExportDirContents(t *testing.T) {
var foundRaw bool
for _, name := range names {
if contains(name, "/export/bee-sat/memory-run/verbose.log") {
if contains(name, "/tasks/bee-sat/memory-run/verbose.log") {
foundRaw = true
}
if contains(name, "/export/bee-sat/memory-run.tar.gz") {
if contains(name, "/tasks/bee-sat/memory-run.tar.gz") {
t.Fatalf("support bundle should not contain nested SAT archive: %s", name)
}
}