(message: string)
| 78 | } |
| 79 | |
| 80 | error(message: string): void { |
| 81 | // Throttle rapid errors to prevent log spam |
| 82 | const now = Date.now(); |
| 83 | if (now - this.lastErrorTime < this.ERROR_THROTTLE_MS) { |
| 84 | return; |
| 85 | } |
| 86 | this.lastErrorTime = now; |
| 87 | |
| 88 | logger.error(`[Evaluation Error] ${message}`); |
| 89 | |
| 90 | if (process.env.GITHUB_ACTIONS) { |
| 91 | // Escape special characters for GitHub Actions |
| 92 | const escapedMessage = message.replace(/\r?\n/g, ' ').replace(/::/g, ' '); |
| 93 | console.log(`::error::${escapedMessage}`); |
| 94 | } |
| 95 | } |
| 96 | |
| 97 | private logPeriodicUpdate(): void { |
| 98 | if (this.completedTests === 0 || this.completedTests === this.totalTests) { |
no outgoing calls