chore(scheduler): Execute ci-health-agent and fix critical bugs

Co-authored-by: PR0M3TH3AN <[email protected]>
This commit is contained in:
google-labs-jules[bot]andPR0M3TH3AN committed 2026-02-17 19:58:43 +00:00
1 parent 65a3afc7e4
commit 5e99e81f2d
14 files changed
+2256 -18

No files matched your search

+15 -3
View File
@@ -158,7 +158,8 @@ function extractIdentifiers(content) {
const ids = new Set();
const lines = content.split(/\r?\n/);
for (const line of lines) {
if (/(issue|incident|failure)[-_\s]*id/i.test(line)) {
// Match "failure id" as a distinct word phrase (ignores "failure identifiers" or "failure IDs")
if (/(?:issue|incident|failure)[-_\s]*id\b/i.test(line)) {
const match = line.match(/([A-Za-z0-9._-]{3,})\s*$/);
if (match) ids.add(match[1]);
}
@@ -242,8 +243,19 @@ async function checkFailureTracking({ sinceMs }) {
for (const file of recentTestLogs) {
const content = await fs.readFile(file.filePath, 'utf8').catch(() => '');
if (FAILURE_KEYWORD_RE.test(content)) {
const ids = extractIdentifiers(content);
// Filter out passing TAP lines, comments, and YAML blocks to avoid false positives on test descriptions
const relevantContent = content.split(/\r?\n/)
.filter((line) => {
const trimmed = line.trim();
return !/^ok\s+\d+/.test(trimmed) &&
!trimmed.startsWith('#') &&
!trimmed.startsWith('>') &&
!/^(failureType|code|name|stack|operator|expected|actual):/.test(trimmed);
})
.join('\n');
if (FAILURE_KEYWORD_RE.test(relevantContent)) {
const ids = extractIdentifiers(content); // Extract from full content to find IDs anywhere
if (!ids.size) {
logsWithFailureNoIds.push(path.relative(process.cwd(), file.filePath));
}