From 8a91f0f783ece5030cd864a49e0ae4c0dd32ff2b Mon Sep 17 00:00:00 2001 From: Michael Chus Date: Wed, 29 Jul 2026 18:11:24 +0300 Subject: [PATCH] fix(webui): repair broken scenario Run button onclick, dedupe build.sh overlay staging MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - page_scenario.go: onclick built via JSON.stringify() embedded raw double quotes inside a double-quoted HTML attribute, truncating the attribute so the click handler never compiled; pass the name through an escaped data-scenario-name attribute instead. - build.sh: overlay staging rsyncs (OVERLAY_DIR->stage, stage->includes.chroot) ran without --delete, so a scenario removed from the repo (a9924b0) stayed baked into every ISO built from the persistent stage cache since — the "second script" in the Scenario page's list. - blackbox: rewritten around a deterministic local zip + incremental patch-the-changed-suffix onto removable media, instead of walking/copying ~90 files through a synchronous ntfs-3g FUSE mount every cycle. journalctl captures are now "--since last sync" (were "--since boot", growing with uptime) and metrics.db is excluded (was copied whole every cycle). - scenario: nvbandwidth-acs-ab now escalates GPU count (same-socket pair, other socket's pair, one cross-socket pair, all GPUs) under each ACS state instead of always running all 6 GPUs at once, using a new `bee gpu-bandwidth-groups` subcommand that discovers socket layout from `nvidia-smi topo -m` at runtime — gpu_indices is host-specific, so this can't be baked into the scenario file. Co-Authored-By: Claude Sonnet 5 --- audit/cmd/bee/main.go | 72 ++++++ audit/internal/app/blackbox.go | 72 +++++- audit/internal/app/blackbox_archive.go | 183 ++++++++++++++ audit/internal/app/blackbox_archive_test.go | 235 ++++++++++++++++++ audit/internal/app/bundle_layout.go | 15 +- audit/internal/app/support_bundle.go | 2 +- .../platform/nvidia_topology_groups.go | 125 ++++++++++ .../platform/nvidia_topology_groups_test.go | 85 +++++++ audit/internal/webui/page_scenario.go | 2 +- iso/builder/build.sh | 4 +- .../bee/scenarios/nvbandwidth-acs-ab.json | 42 +++- scenarios/nvbandwidth-acs-ab.json | 42 +++- 12 files changed, 847 insertions(+), 32 deletions(-) create mode 100644 audit/internal/app/blackbox_archive.go create mode 100644 audit/internal/app/blackbox_archive_test.go create mode 100644 audit/internal/platform/nvidia_topology_groups.go create mode 100644 audit/internal/platform/nvidia_topology_groups_test.go diff --git a/audit/cmd/bee/main.go b/audit/cmd/bee/main.go index cfdff8f..01b77bc 100644 --- a/audit/cmd/bee/main.go +++ b/audit/cmd/bee/main.go @@ -8,6 +8,7 @@ import ( "io" "log/slog" "os" + "os/exec" "runtime/debug" "strconv" "strings" @@ -88,6 +89,8 @@ func run(args []string, stdout, stderr io.Writer) (exitCode int) { return runBenchmark(args[1:], stdout, stderr) case "bee-worker": return runBeeWorker(args[1:], stdout, stderr) + case "gpu-bandwidth-groups": + return runGPUBandwidthGroups(args[1:], stdout, stderr) case "version", "--version", "-version": fmt.Fprintln(stdout, Version) return 0 @@ -111,6 +114,7 @@ func printRootUsage(w io.Writer) { bee run (bare name is looked up as scenarios/.json on removable media) bee benchmark nvidia [--profile standard|stability|overnight] bee bee-worker --export-dir `+app.DefaultExportDir+` --task-id TASK-001 + bee gpu-bandwidth-groups [--stage