Sanitize public validation reports; fix host-dependent arm64 test#14
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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-reportendpoint, both anonymous-readable on the public demo — embedded host-internal details:paths.*,artifact.path,matrix.path,run_dir)vm_run_dir(the on-host run dir that also holds that run's SSH private key),qemu_command, andserial_logNew
internal/api/sanitize.gostrips 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-smokeCI failureTestQEMUSystemBinaryForARM64pinned-machine virt,accel=kvm, but the accel mode is host-dependent: KVM where/dev/kvmexists (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-kvmform). Explicit kvm/tcg coverage already lives inTestMachineArgsForAccelFallback.Note (not addressed here)
The
kernel-freshnessscheduled 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 vetcleaninternal/api/sanitize_test.gocovers field stripping, non-mutation of the original, and the map path🤖 Generated with Claude Code