Skip to content

Sanitize public validation reports; fix host-dependent arm64 test#14

Merged
ErenAri merged 2 commits into
mainfrom
fix/sanitize-public-report-and-arm64-test
Jun 16, 2026
Merged

Sanitize public validation reports; fix host-dependent arm64 test#14
ErenAri merged 2 commits into
mainfrom
fix/sanitize-public-report-and-arm64-test

Conversation

@ErenAri

@ErenAri ErenAri commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

What

Two fixes, prompted by a bug captured while screenshotting the demo.

1. Sanitize public validation reports (the captured bug)

The finished-validation JSON — shown in the Technical JSON report drawer and re-fetchable via the history run-report endpoint, both anonymous-readable on the public demo — embedded host-internal details:

  • absolute host filesystem paths (paths.*, artifact.path, matrix.path, run_dir)
  • per-target vm_run_dir (the on-host run dir that also holds that run's SSH private key), qemu_command, and serial_log

New internal/api/sanitize.go strips these before the report leaves the host, on all three exits (sync validate, async validate job, history run-report). The compatibility evidence a viewer actually wants (load/attach/verifier/BTF/functional results, kernel info, classification, timings, artifact sha256/size) is preserved. The on-disk report is untouched for operators with shell access.

2. Fix arm64-build-smoke CI failure

TestQEMUSystemBinaryForARM64 pinned -machine virt,accel=kvm, but the accel mode is host-dependent: KVM where /dev/kvm exists (local + x86 CI), TCG on the arm64 runner. The test now asserts only the host-independent arm64 shape (-machine virt,accel=..., not the x86 -enable-kvm form). Explicit kvm/tcg coverage already lives in TestMachineArgsForAccelFallback.

Note (not addressed here)

The kernel-freshness scheduled run is red by design — it's a non-blocking weekly drift signal (--fail-on-stale) reporting 16/31 baselines behind by minor in-series patch bumps. Remediation is refreshing cached images + re-running the matrix, a separate maintenance task.

Test

  • go test ./cmd/... ./internal/... ./pkg/... green; go vet clean
  • New internal/api/sanitize_test.go covers field stripping, non-mutation of the original, and the map path

🤖 Generated with Claude Code

ErenAri and others added 2 commits June 17, 2026 02:21
Two fixes:

1. Strip host-internal fields from validation reports served over HTTP.
   The finished-run JSON (web validate flow + history run-report endpoint,
   both anonymous-readable on the public demo) embedded absolute host paths,
   the per-target VM run directory (which also holds that run's SSH private
   key), the full QEMU command line, and the serial-log path. New
   internal/api/sanitize.go clears these before the report leaves the host;
   the compatibility evidence (load/attach/verifier/BTF/functional results,
   kernel info, classification, timings) is preserved. The on-disk report is
   untouched for operators with shell access.

2. Fix arm64-build-smoke failure. TestQEMUSystemBinaryForARM64 pinned
   "-machine virt,accel=kvm", but the accel mode depends on whether the host
   exposes /dev/kvm: KVM locally and on x86 CI, TCG on the arm64 runner. The
   test now asserts only the host-independent arm64 shape ("-machine
   virt,accel=...", not the x86 -enable-kvm form); explicit kvm/tcg coverage
   already lives in TestMachineArgsForAccelFallback.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@ErenAri
ErenAri merged commit e1e4ab0 into main Jun 16, 2026
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant