Skip to content

ci(agents): accept common controller condition stamping and generalize shared-mock check - #868

Merged
lukas016 merged 1 commit into
mainfrom
chore/agents-rules-common-condition
Nov 17, 2026
Merged

lukas016 merged 1 commit into
mainfrom
chore/agents-rules-common-condition

Conversation

@ron96g

@ron96g ron96g commented Nov 17, 2026

Copy link
Copy Markdown
Member

Summary

  • 02-no-reconcile-loops / observed-generation: Handlers that implement handler.Handler[T] run under the common controller (common/pkg/controller). The controller sets ObservedGeneration on every condition before it writes the status, and writes the status only when it changed. The check now accepts that. A handler that sets a common/pkg/condition condition through SetCondition, and does not write the status itself, no longer gets a CRITICAL UNCLEAR. The rule gains an allowed example taken from admin/internal/handler/environment/handler.go:20.
  • 15-prefer-shared-mocks / duplicates-shared-mock: The check now describes the kinds of shared mocks in general terms instead of listing specific ones.

Why

The audit of #816 blocked on route.SetCondition(condition.NewReadyCondition(...)) in the gateway route handler, a line #816 doesn't touch. The judge couldn't see that the common controller sets ObservedGeneration. The 15-prefer-shared-mocks wording change was also only in #816 and belongs with the rule changes.

Tests

…lize shared-mock check

Handlers run under the common controller set conditions built by
common/pkg/condition; the controller stamps ObservedGeneration and writes
the status only when it changed, so the observed-generation check of
02-no-reconcile-loops now passes them. Adds a sourced allowed example.

The duplicates-shared-mock check of 15-prefer-shared-mocks names the kinds
of shared mocks generically instead of listing specific ones.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@ron96g
ron96g requested a review from lukas016 November 17, 2026 10:15
@ron96g ron96g changed the title chore(agents): accept common controller condition stamping and generalize shared-mock check ci(agents): accept common controller condition stamping and generalize shared-mock check Nov 17, 2026
@lukas016
lukas016 merged commit cf86697 into main Nov 17, 2026
12 checks passed
@lukas016
lukas016 deleted the chore/agents-rules-common-condition branch November 17, 2026 10:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants