Remove mark_mergeability_checking_in_worker feature flag
Removes the mark_mergeability_checking_in_worker feature flag. It has been enabled for 100% of projects on GitLab.com since 2026-09-28 with no regressions, so the checking merge status is now always written by MergeRequestMergeabilityCheckWorker instead of during the GET request that enqueues it.
Detailed context for AI agents
What does this MR do and why?
MergeRequests::MergeabilityCheckService#async_executeno longer callsmerge_request.mark_as_checkingbefore enqueuing the worker. The merge request staysuncheckeduntil the job runs, so the controller GET request that triggers the check does not write to the database.MergeRequestMergeabilityCheckWorker#performnow always callsMergeRequest.batch_mark_as_checking([merge_request.id])before running the check. This is a guardedUPDATE ... WHERE merge_status IN (unchecked, cannot_be_merged_recheck)so it does not overwrite a verdict written after the record was loaded.- Removes the
mark_as_checking_in_worker?helper and its comment from the service. - Deletes the flag definition
config/feature_flags/gitlab_com_derisk/mark_mergeability_checking_in_worker.yml. - Removes the three flag-disabled spec contexts in the worker spec,
after_create_service_spec.rbandmergeability_check_service_spec.rb. The remaining examples already assert the flag-on behaviour (status left for the worker, hooks fire withunchecked, worker marks checking and does not overwrite a later verdict).
Behaviour kept: the verdict write (mark_as_mergeable / mark_as_unmergeable) in MergeabilityCheckService#execute is unchanged. No schema or data change. The MergeRequest#mark_as_checking instance method is still used by other callers and is left in place.
Rollout history (from the rollout issue): staging and the test project 2026-09-24, gitlab-org/gitlab 2026-09-24, 10% and 25% of projects 2026-09-25, 50% and 100% 2026-09-28. Watched the detect_writes_on_get log entries for Projects::MergeRequests::ContentController#cached_widget and the worker duration dashboard; nothing regressed.
References
- Rollout issue: #630354 (closed)
- Feature issue (GET requests that write): #628132 (closed)
- Introduced by: !256999 (merged)
Screenshots or screen recordings
Not applicable, backend-only flag removal.
How to set up and validate locally
- Open a merge request on GDK and push a new commit to its source branch.
- In the Rails console,
MergeRequest.last.merge_statusreadsuncheckeduntilMergeRequestMergeabilityCheckWorkerruns, thenchecking, thencan_be_mergedorcannot_be_merged. - Loading the MR page with Sidekiq paused leaves the status at
uncheckedand writes nothing to the database.
Verification
bundle exec rspec spec/workers/merge_request_mergeability_check_worker_spec.rb spec/services/merge_requests/mergeability_check_service_spec.rb- 66 examples, 0 failures.bundle exec rspec spec/services/merge_requests/after_create_service_spec.rb- 25 examples, 0 failures.- Rubocop clean on all five changed Ruby files.
MR acceptance checklist
Evaluated against the MR acceptance checklist. Flag removal only, no new risk in quality, performance, reliability, security, or maintainability.