Isolation between parallel jobs

Hello Guys, how is it going?

Hi, I would like to understand more about isolation between jobs when they are running in parallel.

I have the following context:

(...)

variables:
  GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_PROJECT_PATH/job-$CI_JOB_ID

job_a:
   parallel:
      matrix:
        - type: foo
          class: bar
        - type: fizz
          class: buzz
        - type: jazz
          class: bass
   script:
     - rm -rf ./temp
     - mv some_folder/${type} ./temp/
     - some_command --using ${class} > ./output/artifact_${type}
   artifacts:
     path:
       - ./output/

(...)

That pipeline triggers 3 parallel jobs for job_a, and provides 3 artifacts, and the content of artifacts is not correct. Sometimes I got on job_a [foo, bar] the artifact named artifact_foo but with the content expected with the values jazz and bass for example.

That means, the execution of the jobs has interfered on each other, and some context leak happened.

Is that the expected behavior? am I missing something?

I am using GitLab Community Edition v17.0.2 and latest version of gitlab runner.

Thanks in advance.