@imdeadpool/guardex 8.4.20 → 8.4.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/src/review/bug-hunter.js +23 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@imdeadpool/guardex",
|
|
3
|
-
"version": "8.4.
|
|
3
|
+
"version": "8.4.21",
|
|
4
4
|
"description": "Guardian T-Rex for your multi-agent repo. Isolated worktrees, file locks, and PR-only merges stop parallel Codex & Claude agents from overwriting each other's work. Auto-wires Oh My Codex, Oh My Claude, OpenSpec, and Caveman.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"preferGlobal": true,
|
|
@@ -65,5 +65,5 @@
|
|
|
65
65
|
"prepublishOnly": "node scripts/prepublish-bump-version.js",
|
|
66
66
|
"postinstall": "node -e \"require('./src/heavy').installReport()\""
|
|
67
67
|
},
|
|
68
|
-
"gitHead": "
|
|
68
|
+
"gitHead": "b2ff7aee228e8ef3400143ef87d9fac7f2f19a7f"
|
|
69
69
|
}
|
package/src/review/bug-hunter.js
CHANGED
|
@@ -3,7 +3,12 @@ const { parseDiffLineMap } = require('./diff');
|
|
|
3
3
|
const SOURCE =
|
|
4
4
|
'https://github.com/codexstar69/bug-hunter/blob/b412f9885e3ec074625a88c862c3f5b6724ec3b4/skills/hunter/SKILL.md';
|
|
5
5
|
const MAX_FINDINGS = 8;
|
|
6
|
-
const SEVERITIES = new
|
|
6
|
+
const SEVERITIES = new Map([
|
|
7
|
+
['low', '🔵 Low'],
|
|
8
|
+
['medium', '🟡 Medium'],
|
|
9
|
+
['high', '🟠 High'],
|
|
10
|
+
['critical', '🔴 Critical']
|
|
11
|
+
]);
|
|
7
12
|
|
|
8
13
|
function bugHunterEnabled(env = process.env) {
|
|
9
14
|
return /^(1|true|yes|on)$/i.test(String(env.GUARDEX_REVIEW_BUG_HUNTER || '').trim());
|
|
@@ -62,10 +67,25 @@ function bugHunterLines(result) {
|
|
|
62
67
|
} else if (result.status === 'clean') {
|
|
63
68
|
lines.push('No behavioral findings in the supplied diff.');
|
|
64
69
|
}
|
|
65
|
-
|
|
70
|
+
const count = result.findings.length;
|
|
71
|
+
if (count > 0) {
|
|
72
|
+
if (result.status === 'partial') lines.push('');
|
|
73
|
+
lines.push(
|
|
74
|
+
`**${count} behavioral finding${count === 1 ? '' : 's'}** · Expand a finding for its evidence.`
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
for (const [index, finding] of result.findings.entries()) {
|
|
66
78
|
const path = finding.path.length > 240 ? `…${finding.path.slice(-240)}` : finding.path;
|
|
79
|
+
const name = path.split('/').at(-1);
|
|
80
|
+
const shortName = name.length > 60 ? `…${name.slice(-60)}` : name;
|
|
67
81
|
lines.push(
|
|
68
|
-
|
|
82
|
+
'',
|
|
83
|
+
index === 0 ? '<details open>' : '<details>',
|
|
84
|
+
`<summary><strong>${SEVERITIES.get(finding.severity)}</strong> · <code>${escapedText(shortName)}:${finding.line}</code></summary>`,
|
|
85
|
+
'',
|
|
86
|
+
`<p>${escapedText(finding.message)}</p>`,
|
|
87
|
+
`<p><strong>Location:</strong> <code>${escapedText(path)}:${finding.line}</code></p>`,
|
|
88
|
+
'</details>'
|
|
69
89
|
);
|
|
70
90
|
}
|
|
71
91
|
lines.push('', `[Bug Hunter methodology](${SOURCE}) · Does not affect the merge gate.`);
|