mit einem Klick
encapsulate-paired-ops
// Review that paired operations and fields that always appear together are encapsulated in a helper or nested struct.
// Review that paired operations and fields that always appear together are encapsulated in a helper or nested struct.
Write or review Kueue PR release notes. Use when a user asks to draft, refine, validate, or combine release notes for a Kueue pull request, especially when deciding whether the note should be framed as a bugfix, feature, observability improvement, or breaking change.
Review that algorithm comments match the implementation. Use when a comment describes a formula or algorithm and you want to verify it matches what the code actually does.
Review that new CRD fields have complete godoc comments with enum value descriptions.
Review that local variables with unnecessarily wide scope are extracted into helper functions.
Review that new feature-gated behavior has explicit gate checks on all reachable code paths.
Review that update/mutation logic has integration test coverage in test/integration/.
| name | encapsulate-paired-ops |
| description | Review that paired operations and fields that always appear together are encapsulated in a helper or nested struct. |
| license | Apache-2.0 |
| metadata | {"copyright":"The Kubernetes Authors"} |
Flag (operations): Two function calls that always appear together (e.g., subtractPendingResources + inadmissibleWorkloads.delete, or addPendingResources + inadmissibleWorkloads.insert).
Ask: Wrap them in a single helper so callers cannot forget one half. The invariant should be enforced by the API, not by convention.
Flag (fields): Two struct fields that must always be set and cleared together (e.g., inflight + inflightResources).
Ask: Encapsulate them in a nested struct so they are updated atomically. This eliminates the "what if field A is nil but field B is not" inconsistency.