Gate Cells claims verification behind attribute flag

What does this MR do and why?

Cells::Claims::VerificationService now respects the per-attribute rollout flag on cells_claims_attribute, so one flag gates both claiming and verification. Previously it only gated the live save path.

Three changes:

  • Cells::Claimable#cells_claims_metadata skips any attribute where cells_claims_enabled_for_attribute? returns false.
  • VerificationService gains a memoized enabled_claim_types helper, used for the claim_types: argument to ClaimService#list_records.
  • VerificationService returns early, logging a warning, when no attribute of the model is enabled.

The metadata filter and the claim_types filter must ship together. Filtering metadata alone would leave remote claims unmatched locally, and diff_record would destroy them via missing_attribute_in_local.

The empty-case guard exists because an empty claim_types array means no filter in the protobuf request, not match-nothing. Without it, a fully disabled model would fetch and destroy every claim.

One attribute is affected today: ServiceDeskSetting#project_key_address_slug. Its flag, cells_claims_service_desk_settings_project_key_address_slugs, has never been enabled anywhere, but cells_claims_verification_worker_service_desk_setting has been enabled in production since 2026-03-27. Verification has therefore been claiming this attribute regardless of its flag. Claims already written are left in place, not destroyed.

References

How to set up and validate locally

  1. Set up cells in the GDK, per https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/howto/cells.md#setting-up-cells-locally.
  2. In rails console, run Feature.disable(:cells_claims_service_desk_settings_project_key_address_slugs), then confirm ServiceDeskSetting.where.not(project_key_address_slug: nil).first.cells_claims_metadata no longer includes that attribute.
  3. Run Cells::Claims::VerificationService.new(ServiceDeskSetting, timeout: 1.minute).execute and confirm no new claim rows for that attribute via gdk psql -d topology_service -c "SELECT * FROM claims;".

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Marco Gregorius

Merge request reports

Loading
Loading