fix(app): capture PCIe link / AER diagnostics at boot, not just on demand

pcie-nvidia-link.txt, pcie-nvidia-link-under-load.txt, and
kernel-aer-nvidia.txt only ever lived in supportBundleCommands, which
exclusively runs inside the on-demand "Download Support Bundle" web UI
action. The blackbox USB auto-sync worker never calls that function -
it only mirrors whatever CaptureTechnicalDump already wrote into the
live export tree at boot. So these three files were structurally
unreachable from a blackbox pull no matter how fresh the build was;
earlier analysis of a real blackbox misattributed their absence to
build/version drift instead.

Move the underlying scripts into shared exported constants
(platform.PCIeNvidiaLinkScript, PCIeNvidiaLinkUnderLoadScript,
KernelAERNvidiaScript) and add them to techDumpNvidiaCommands, so
CaptureTechnicalDump captures all three once at boot (bee-audit is
oneshot, so the ~8s bee-gpu-burn cost for the under-load sample is a
one-time boot cost, not a per-sync-cycle one) alongside the existing
nvidia-smi-* dumps. supportBundleCommands still re-runs the same
scripts on demand for a fresher sample - that's intentional, not a
duplicate to clean up.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Mikhail Chusavitin
2026-08-24 18:39:28 +03:00
co-authored by Claude Sonnet 5
parent b11018ac5e
commit ba250330d5
4 changed files with 81 additions and 49 deletions
+16
View File
@@ -0,0 +1,16 @@
package app
import "testing"
func TestTechdumpBucketForPCIeLinkFiles(t *testing.T) {
cases := map[string]string{
"pcie-nvidia-link.txt": "gpu",
"pcie-nvidia-link-under-load.txt": "gpu",
"kernel-aer-nvidia.txt": "gpu",
}
for name, want := range cases {
if got := techdumpBucketFor(name); got != want {
t.Errorf("techdumpBucketFor(%q) = %q, want %q", name, got, want)
}
}
}