Trigger AI Root Cause Analysis Generation
tm.generate_testExecutionRCADispatches AI-powered root cause analysis for failed tests, skipping those with existing or pending RCA. Credits are charged only for newly triggered analyses. Confirm scope before use.
Instructions
Dispatches AI-powered RCA generation for every failed test under the given scope: any combination of job_ids, stage_ids, task_ids, or test_ids (at least one required, each array capped at 100 IDs). Jobs/stages/tasks always route to the HyperExecute analyzer; test_ids route to the correct analyzer automatically per test, so a mixed batch is fine. A test whose RCA already exists or is currently generating is skipped automatically and not charged - only newly-dispatched tests cost credits, so it is safe to pass a broad scope (e.g. an entire job) without first checking which tests already have RCA. Returns how many were newly triggered vs. skipped (and why), and the estimated credits used. DANGER: this spends REAL organizational AI credits and cannot be undone - do not call speculatively or on a broad scope 'just to see'. Credits are all-or-nothing: if the organization's balance is insufficient for the whole scope, NOTHING is dispatched (a 402 is returned instead) rather than partially triggering. A scope resolving to more than 10,000 failed tests is rejected (413) - narrow it first. Use tm.get_testExecutionRCA beforehand to check whether RCA already exists for the tests you care about, and confirm with the user before calling this on anything but a small, deliberately-chosen scope.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| job_ids | No | ||
| task_ids | No | ||
| test_ids | No | ||
| stage_ids | No |