Foundational flows cascading does not work for projects within Subgroups

Problem

  • Seeded DB with Ai::Catalog::Flows::SeedFoundationalFlowsService.new(current_user: User.first, organization: Organizations::Organization.first).execute
  • Created a group abc
  • Created a project under abc called project_abc
  • Created a subgroup under abc called def
  • Created a project under abc/def called project_def
  • Foundational flows are enabled by default in the application settings, so all groups have Allow foundational flows checked but none of the flows are actually checked.
  • I enabled Duo Code Review for group abc and 2 consumers were created: 1 for group abc and 1 for project project_abc
  • The service account ai-code-review-v1-abc was created
  • The service account ai-code-review-v1-abc was added to the project project_abc
  • I was expecting consumers for group def and project project_def to also be created, but were not. Is that correct?
  • I was expecting to use the service account ai-code-review-v1-abc for project project_def, but it was not added to that project.

Desired Outcome

Subgroup structures don't prevent foundational flow cascading.

Suggested solution

Remove the attempt to create subgroup consumers.

Edited by Sebastian Rehm