* Build a precise failure issue title for known failure classes. * Falls back to the generic failure title when no specific class matches. * @param {Object} options * @param {string} options.workflowName * @param {boolean} options.isTimedOut * @param {boolean} options.hasMissingSafeOutputs * @
(options)
| 282 | * @returns {string} |
| 283 | */ |
| 284 | function buildFailureIssueTitle(options) { |
| 285 | const { workflowName } = options; |
| 286 | if (options.hasDailyAICExceeded) return `[aw] ${workflowName} exceeded daily AI credits budget`; |
| 287 | if (options.maxAICreditsExceeded) return `[aw] ${workflowName} exceeded max AI credits`; |
| 288 | if (options.aiCreditsRateLimitError) return `[aw] ${workflowName} hit AI credits rate limit`; |
| 289 | // Keep HTTP 400 below AI-credits signals: quota/rate-limit indicates an account-level |
| 290 | // budget state that should take precedence when both classes are detected. |
| 291 | if (options.http400ResponseError) return `[aw] ${workflowName} hit HTTP 400 bad request`; |
| 292 | if (options.hasAppTokenMintingFailed) return `[aw] ${workflowName} failed to mint GitHub App token`; |
| 293 | if (options.hasLockdownCheckFailed) return `[aw] ${workflowName} failed lockdown check`; |
| 294 | if (options.hasStaleLockFileFailed) return `[aw] ${workflowName} has stale lock file`; |
| 295 | if (options.isTimedOut) return `[aw] ${workflowName} timed out`; |
| 296 | if (options.hasToolDenialsExceeded) return `[aw] ${workflowName} exceeded tool denial limit`; |
| 297 | if (options.hasCacheMissMisconfiguration) return `[aw] ${workflowName} has cache-memory miss misconfiguration`; |
| 298 | if (options.hasReportIncomplete) return `[aw] ${workflowName} reported incomplete result`; |
| 299 | if (options.hasMissingSafeOutputs) return `[aw] ${workflowName} produced no safe outputs`; |
| 300 | if (options.hasMissingTool) return `[aw] ${workflowName} is missing required tool`; |
| 301 | if (options.hasMissingData) return `[aw] ${workflowName} is missing required data`; |
| 302 | if (options.hasAssignmentErrors) return `[aw] ${workflowName} failed to assign agent`; |
| 303 | return `[aw] ${workflowName} failed`; |
| 304 | } |
| 305 | |
| 306 | /** |
| 307 | * Generate a precise failure-match marker for failure issue bodies. |
no outgoing calls
no test coverage detected