Delete the bespoke DAP reviewer assignment code path
Phase D. Depends on the #607678 (closed) data migration having run.
Problem
Closes the last acceptance criterion on #603494 (closed): "The bespoke trigger code introduced in &20711 is removed or replaced."
Implementation — complete inventory (verified)
⚠️ Ordering trap
Removing dap_powered: 2 from the enum deletes the generated predicate reviewer_assignment_dap_powered?. AutoAssignReviewersWorker#perform calls it unconditionally at line 23, so the enum value and the worker branch must be removed in the same commit — otherwise every worker invocation (including plain code_owners projects) raises NoMethodError.
Deletions
ee/app/workers/merge_requests/auto_assign_reviewers_worker.rb— thereviewer_assignment_dap_powered?branch (line 23-25),execute_dap_flow+ its internal event + warn logging (lines 36-59). Theelsebody (AssignService call) becomes the only path. Spec: delete thedap_poweredcontext block (auto_assign_reviewers_worker_spec.rb:105-190).ee/app/services/ai/duo_workflows/recommend_reviewers/execute_service.rb— delete (the worker is the only production caller); deleteexecute_service_spec.rb.ee/app/models/ee/project.rb:736-744— deletedap_powered_recommend_reviewers_available?; delete its spec block (ee/spec/models/ee/project_spec.rb:6327-6380).app/models/project_setting.rb:25— removedap_powered: 2fromREVIEWER_ASSIGNMENT_STRATEGIES(one-line CE change; the EE concern doesn't touch the enum).ee/config/feature_flags/wip/dap_powered_recommend_reviewers.yml— remove; record the outcome of #607676 (closed) here (any catalog gate is a separate, fresh flag).- Fold in the deprecated no-op worker removal (#602537) — exactly four references:
ee/app/workers/merge_requests/execute_merge_request_ready_worker.rb,ee/app/workers/all_queues.yml:3367-3376,config/sidekiq_queues.yml:740,ee/spec/workers/merge_requests/execute_merge_request_ready_worker_spec.rb. It is not subscribed anywhere. (Do not confuse with theai_catalog_flows_execute_merge_request_ready_workflow_triggersqueue — that's the replacement.)
Keep — verified still needed
Ai::DuoWorkflows::RecommendReviewers::ReviewerDataBuilder— its only production caller is theadditional_context_resolveron therecommend_reviewers/v1item (items.rb:203), which is the trigger path after #607673 (closed).- The
recommend_reviewers/v1catalog item itself (items.rb:186-206) and its pot strings — it's the product now. PendingInitialAssignment+ the EEReloadMergeHeadDiffServiceenqueue and the draft→ready enqueue inEE::MergeRequests::UpdateService— still serve thecode_ownersstrategy. Note the EEReloadMergeHeadDiffServiceoverride also ownssync_code_owner_approval_rules; it is not reviewer-assignment-only machinery.- The
auto_assign_reviewersinternal event definition (ee/config/events/auto_assign_reviewers.yml) — still fired byAssignServicewithlabel: 'code_owners', and itslabeldescription ("The assignment strategy used") stays accurate. - The
project_settings.reviewer_assignment_strategycolumn. - Stale rows with value
2(if any escaped Phase C) degrade gracefully: unmapped enum reads asnil,StrategyFactory.buildreturnsnil,AssignServiceskips with'No strategy available'— no crash (verified against Rails 7.2 enum deserialize; covered bystrategy_factory_spec.rb:32-40).
Measurement continuity — resolved
There are no metric definitions consuming auto_assign_reviewers (nothing in config/metrics/ or ee/config/metrics/), so deleting the worker's label: 'dap_powered' event call breaks no dashboard. Trigger-driven runs are already measured by the trigger_ai_catalog_item internal event emitted per run with the catalog item id, event type, and item properties (run_service.rb:443-459, granular since 6d643e58d193). Record in the rollout notes that DAP reviewer-assignment adoption is thereafter read from trigger_ai_catalog_item filtered to the Recommend Reviewers item, replacing auto_assign_reviewers[label=dap_powered].
Optional adjacent cleanup
app/models/project_setting.rb:42 carries ignore_column :code_owner_reviewer_assignment_strategy, remove_with: '19.0', remove_after: '2026-04-22' — past its remove-after date; can ride along.
Acceptance criteria
- No references to
dap_poweredremain outside the Phase C migration - Enum value and worker branch removed in the same commit (no
NoMethodErrorwindow) -
ReviewerDataBuilderstill reachable from the trigger path -
code_ownersstrategy behaviour unchanged - Measurement hand-off recorded:
trigger_ai_catalog_item(Recommend Reviewers item) replacesauto_assign_reviewers[label=dap_powered] -
MergeRequests::ExecuteMergeRequestReadyWorkerno-op removed (#602537)