test(ai): use real stage check for flows without include

What does this MR do and why?

This MR updates the AI Catalog flow creation spec to use the real Gitlab::Llm::StageCheck.available? implementation when testing flow creation with experiment and beta features disabled and the flow definition has no include section.

Previously, enable_ai_catalog stubbed StageCheck.available? to always return true, meaning the spec could pass without verifying the actual StageCheck behavior.

This change explicitly restores the original implementation for the :ai_catalog_flow_agent_references feature flag, ensuring the test exercises the real StageCheck rather than relying on the stub.

No production code is changed.

References

Screenshots or screen recordings

Not applicable — this is a test-only change.

Before

The StageCheck.available? stub always returned true, potentially allowing the spec to pass without exercising the real implementation.

After

The spec calls the original StageCheck.available? implementation for :ai_catalog_flow_agent_references.

How to set up and validate locally

Run the focused spec:

bundle exec rspec ee/spec/services/ai/catalog/flows/create_service_spec.rb

Run local MR validation:

gitlab-check

Validation results:

  • RSpec: 78 examples, 0 failures.
  • RuboCop: 1 file inspected, no offenses detected.
  • git diff --check: passed.
  • No blocked or failed checks.

MR acceptance checklist

  • The change is limited to the relevant AI Catalog flow creation spec.
  • No production code is modified.
  • The existing test coverage is retained.
  • The focused RSpec suite passes.
  • RuboCop reports no offenses.
  • No whitespace errors detected.
  • The change addresses the reported review feedback.
  • No screenshots are applicable for this test-only change.

Merge request reports

Loading
Loading