Expose registered mutations and firing-set; export golden serializer#136
Merged
sourcehawk merged 6 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>
…#132) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…rce (#132) 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>
sourcehawk
added a commit
that referenced
this pull request
Jun 1, 2026
3a43546
into
feature/version-matrix-goldens
2 of 3 checks passed
sourcehawk
added a commit
that referenced
this pull request
Jun 1, 2026
Co-Authored-By: Claude Opus 4.8 (1M context) <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.
Towards #132
Description
Adds the read-only framework introspection surface and golden serializer export that the version-matrix golden generator (later sub-PRs) builds on. No reconcile-path behavior changes; every addition is an inert getter or a thin wrapper.
What changed
concepts.MutationInspectorinterface (pkg/component/concepts/mutation_inspector.go):RegisteredMutations() []stringandFiringSet() ([]string, error).generic.BaseResource: iterates its existingMutations. A nilFeaturefires unconditionally; otherwiseFeature.Enabled()decides.RegisteredMutationsdedupes in registration order;FiringSetpreserves registration order and propagates gate errors wrapped with the mutation name.*component.Componentas the deduplicated union across managed (non read-only) resources, mirroring thePreviewiteration. Read-only resources and resources that do not implement the interface contribute nothing; a managed resource'sFiringSeterror is wrapped with the resource identity and propagated.var _ concepts.MutationInspector = (*Resource)(nil)compile-time assertion on every primitiveResource(all 21 single-kind primitives and the 4 unstructured sub-resources: static, task, workload, integration). The assertion makes a missed primitive a build failure.golden.Serialize(obj, scheme)andgolden.SerializeComponent(objs, scheme)as thin wrappers over the existing privateserializeObject. RefactoredCompareComponentYAMLto reuseSerializeComponent(DRY); output stays byte-identical.New public surface
concepts.MutationInspector interface { RegisteredMutations() []string; FiringSet() ([]string, error) }golden.Serialize(client.Object, *runtime.Scheme) ([]byte, error)golden.SerializeComponent([]client.Object, *runtime.Scheme) ([]byte, error)Testing
BaseResource,Component, the statefulset anchor, and the golden serializer.BaseResource: dedup, nil-gate-fires, enabled/disabled gates, gate-error propagation.Component: union of registered mutations and firing-sets, read-only exclusion, error propagation.var _assertions cover the remaining 24 resource types at compile time.Serializeis byte-identical to whatCompareYAMLwrites;SerializeComponentjoins multi-document YAML identically toCompareComponentYAML; existing golden tests still pass.make allis green (fmt, lint, test, test-examples, build-examples).