Repository navigation
feat(goldenrec): coverage gate for golden fixtures - #327
Merged
Merged
Conversation
CheckCoverage: required populated columns, values (with @manifest references), families and namespace kinds. xtcp2-golden check reads DIR/../coverage.json. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
CheckCoverage reports required columns never populated, required values
missing ("@manifest.KEY" expands to the fixture manifest's list), and
missing families and namespace kinds. xtcp2-golden check applies
../coverage.json; the committed one describes today's 7_3_1 fixture.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
main fails checks.nix-fmt on the binaries inherit added in #324. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
gosec G703 on the os.ReadFile of a path built from the argument. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 25, 2026
# Conflicts: # nix/default.nix
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.
The golden fixture shows what the collector emits for the microVM workload, but nothing stops a workload change from quietly no longer populating a column. This adds a coverage gate, so the planned wider workload (every congestion algorithm, loss, more TCP states, socket options, NIC and locality) can be added red-first. No workload change here. Done test-first.
Feature
goldenrec.CoverageandCheckCoverage(Profile, Coverage, refs). A fixture must have:populatedcolumns nonzero;valuespresent in listed columns;familiesandkinds(namespace kinds) with rows.@manifest.KEYexpands to the list underKEYin the fixture'smanifest.json, so a requirement can follow the guest kernel (e.g. every congestion algorithm it offers)profileListedlists, so coverage can't name ASNs, uids or container namesxtcp2-golden check DIRappliesDIR/../coverage.jsonwhen it exists, sochecks.golden-recordspicks it up unchangedpkg/xtcp/testdata/golden/coverage.jsondescribes today's7_3_1fixture: 71 populated columns, 18 value sets (zero and empty values left out), families 2/10, kinds container/host/namedcoverage.jsonis read throughos.Rootlike the fixture filesTests
TestCheckCoverage,TestRunCheckCoverage,TestManifestRefs: table-driven, all four categoriesTestRunCheckCommittedCoverage: the committed fixtures meet the committed coverageRed (tests commit, before the feature)
Green
go test ./...and the nix checks (gofmt, go-vet, nix-fmt, lint-baseline, golangci ×3, redteam-lint, golden-records, test-fuzz-all) pass. Includes thenix/default.nixnixfmt commit from #326, since main failschecks.nix-fmt.🤖 Generated with Claude Code