Add goldengen accounting assertion, worked example, and testing docs#139
Merged
sourcehawk merged 3 commits intoJun 1, 2026
Merged
Conversation
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
0fe4fcd
into
feature/version-matrix-goldens
2 of 3 checks passed
sourcehawk
added a commit
that referenced
this pull request
Jun 1, 2026
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.
Towards #134.
Completes the goldengen feature with its completeness check, a runnable example, and the testing documentation.
What this adds
AssertCompleteaccounting on*Generator[T]. Called from a consumer'sTestMainasos.Exit(gen.AssertComplete(m.Run())), it proves the universe of registered mutation names across all fixtures equalsunion(Requires names) ∪ Exclude. It returns the incoming code unchanged when the tests already failed or accounting holds; otherwise it prints the violations (unaccounted mutation, stale Exclude/Requires name, empty name) to stderr and returns nonzero. Registration is version-independent, so each fixture is built once to gather the registered set.examples/version-matrix/: a StatefulSet built through goldengen with three version-gated mutations over the sharedExampleAppCRD. It exercisesRun(with a-updateflag wired throughWithUpdate) andAssertCompletefromTestMain. The committedtestdata/shows the two generated regime goldens and the coverage manifest for the version universe8.7.0,8.8.2,8.9.0.docs/testing.md: thegoldenhelpers (AssertYAML/AssertComponentYAML/Serialize/SerializeComponent) and the fullgoldengenworkflow (matrix declaration, the four Requires/Forbids assertions, firing-set classification with a diagram, the ascending version-ordering convention, the manifest, and theLoadMatrixYAML loader). Linked from the README documentation table.Verification
make allandmake build-examplesboth pass.Note: the
LoadMatrixsection documents the loader that ships in the sibling PR (#135) against its locked signature, so the feature's documentation is complete in one place.🤖 Generated with Claude Code