Dbt artifact different when generated by job

I have my dbt cloud project which is hooked to a fabric warehouse. I was trying to implement a dashboard in power BI which would retrieve and present the dbt execution logs. Initially I wanted to do this with elementary-dbt, that would create the tables in fabric with all my dbt logs and then I’d get to exploit these tables in power BI. I realized later on that elementary is not yet available when working with fabric so that was a bummer. Now comes my new idea. I’d create the log tables in fabric myself and then get all the dbt logs from the dbt artifact, and specifically run_results.json. My issue is that when I run dbt build or dbt test in the console (the terminal inside the dbt cloud studio) I can see failed tests.

    {
  "status": "fail",
  "timing": [
    {
      "name": "compile",
      "started_at": "2025-09-11T14:39:09.827465Z",
      "completed_at": "2025-09-11T14:39:09.832783Z"
    },
    {
      "name": "execute",
      "started_at": "2025-09-11T14:39:09.833303Z",
      "completed_at": "2025-09-11T14:39:11.363201Z"
    }
  ],
  "thread_id": "Thread-2 (worker)",
  "execution_time": 1.5377166271209717,
  "adapter_response": {
    "_message": "OK",
    "rows_affected": -1
  },
  "message": "Got 4 results, configured to fail if != 0",
  "failures": 4,
  "unique_id": "xxxxxxxxxxxxxxxx.not_null_table_name.d24288c64",
  "compiled": true,
  "compiled_code": "select something ",
  "relation_name": null,
  "batch_results": null
},

When I run a dbt cloud job that does the same thing (dbt build) and then I retrieve the artifact associated to it I see the test but it says it succeeded.

    {
  "status": "success",
  "timing": [
    {
      "name": "compile",
      "started_at": "2025-09-11T11:03:53.169960Z",
      "completed_at": "2025-09-11T11:03:53.177520Z"
    },
    {
      "name": "execute",
      "started_at": "2025-09-11T11:03:53.181019Z",
      "completed_at": "2025-09-11T11:03:53.181029Z"
    }
  ],
  "thread_id": "Thread-3 (worker)",
  "execution_time": 0.038109779357910156,
  "adapter_response": {},
  "message": null,
  "failures": null,
  "unique_id": "test.xxxxxx.not_null_table_name.8a1231ac",
  "compiled": true,
  "compiled_code": "select something",
  "relation_name": null,
  "batch_results": null
},

Also note that the actual build failed because of the failed tests, but there’s no trace of that in the json.

14:57:26  Finished running 23 table models, 70 data tests, 34 view models in 0 hours 7 minutes and 11.24 seconds (431.24s).
14:57:26  
14:57:26
14:57:26  Completed with 1 error, 0 partial successes, and 0 warnings:
14:57:26  
14:57:26
14:57:26  Failure in test not_null_table_name (models/silver/table_name.yml)
14:57:26
14:57:26    Got 4 results, configured to fail if != 0
14:57:26  
14:57:26
14:57:26    compiled code at long link etc
14:57:26  
14:57:26
14:57:26  Done. PASS=108 WARN=0 ERROR=1 SKIP=18 NO-OP=0 TOTAL=127

Being new to dbt I cannot comprehend how the same command invoked in 2 different ways gives me a different artifact. I replaced the table names in this post but they are all from the same test/table.