Skip to content

fix(operator): follow-ups of the #109 review (handover peers, claim window, docs) - #110

Merged
akosidencio merged 1 commit into
devfrom
fix/v0.2.1-r2-operator-review-2
Nov 30, 2026
Merged

akosidencio merged 1 commit into
devfrom
fix/v0.2.1-r2-operator-review-2

Conversation

@akosidencio

Copy link
Copy Markdown
Member

Follow-ups from an independent review of #109 (2b0080b..55ab968). The review found that all three of #109's claims hold in every code path and nothing blocks the release. This PR addresses its remaining points.

Point Change
Medium: within one namespace, permission to create a FeatureFlag still amounts to permission to read that namespace's Secrets (a FeatureFlag author can send them to their own URL) Documented in the README (a new top-level section, now placed before the approval section) and in the CHANGELOG Security entry. A stricter design (opt-in Secret label or server-URL allowlist) would be a further behaviour change, so it is proposed for 0.3.0.
Low–Medium: a peer that can never take over still counted at handover, so the flag stayed in Checkgate for good Only peers allowed to use their token Secret count.
Low: a refused 0.2.0 FeatureFlag is deleted without cleanup The upgrade page and README now say to move the Secret before deleting it.
Info: the recent condition made the operator forget its own lost request after about 3 minutes of downtime Removed. createdNear alone bounds what can be claimed, whatever the downtime.
Docs nits README heading order and list indentation fixed. The CRD field doc for tokenSecretRef.namespace now mentions the refusal (CRD regenerated with controller-gen v0.16.5).

Evidence

Run on 55ab968 first:

  • FAIL TestHandoverIgnoresPeersThatCannotTakeOver: the flag was kept alive by a refused peer.
  • FAIL TestProposalRecordSurvivesOperatorDowntime: the operator's own request was not recognised after 10 minutes of downtime.
  • PASS, pinning down behaviour that was untested: deleting a refused FeatureFlag makes 0 calls; a refused conflict loser makes 0 calls; a request created an hour before the proposal is not claimed; an unreadable created_at is not claimed; an ambiguous match with an unknown requester is not claimed and not withdrawn.

After the fix: all 11 targeted tests pass, the full suite passes under -race -count=3, envtest ×3 passes (CRD upgrade from 0.2.0, lifecycle, conflicts), real-server run-real-server.sh passes, and the VitePress build plus check-docs-site.py is ok.

…indow, docs)

- A FeatureFlag whose token Secret is refused no longer counts as a peer
  that will take a flag over, so deleting the manager deletes the flag
  instead of leaving it in Checkgate for good.
- Lost-reply recovery relies on the request's creation time alone; the
  extra "recent record" condition made the operator forget its own request
  after ~3 minutes of downtime (CrashLoopBackOff), and createdNear already
  bounds what can be claimed.
- Tests: refused peer at handover, deleting/conflict-losing refused
  FeatureFlags call nothing, claim after downtime, no claim of an older or
  unreadable-created_at request, ambiguous match with unknown requester.
- Docs: same-namespace residual (FeatureFlag create ~ Secret read in that
  namespace), move cross-namespace Secrets before deleting such objects,
  README section order and indentation, CRD field doc (CRD regenerated).
@akosidencio
akosidencio merged commit 6f91875 into dev Nov 30, 2026
36 checks passed
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.

1 participant