[CI] rules incoherent when used whith &&, || and pattern matching

Summary

Using rules inside a CI job is not working as expected when using Conjunction / Disjunction (&&, ||) and Pattern matching

Steps to reproduce

variables:
  t: t # define a varable so if $t will evaluate to true

test_that_fail:
  script:
    - echo "Hello, I'm running"
  rules:
    - if: $f && $CI_JOB_NAME =~ /test*/  || $t
      when: always
    - when: manual

The job will be manual despite it should be always

It seems the if evaluation stop after evaluating the patter matching and return the result too early.

Example Project

Here is a minimal example on gitlab.com: link

Possible fixes

A workaround is to split the if statement