argusqa-os 9.6.4 → 9.6.6

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "argusqa-os",
3
- "version": "9.6.4",
3
+ "version": "9.6.6",
4
4
  "mcpName": "io.github.ironclawdevs27/argus",
5
5
  "description": "Argus — AI-powered automated dev-testing platform using Chrome DevTools MCP and Claude Code",
6
6
  "keywords": [
@@ -246,8 +246,19 @@ async function main() {
246
246
  // Step 5: Audit each affected route via crawlRouteCheap
247
247
  // Preserve path prefix (e.g. /project/ in GitHub Pages) — .origin would strip it
248
248
  const baseUrl = targetUrl.replace(/\/$/, '');
249
- for (const route of affected) {
250
- const url = new URL(route.path, targetUrl).href;
249
+
250
+ // Normalize route paths — crawlRouteCheap builds URLs via string concat (baseUrl + route.path)
251
+ // so paths without a leading slash produce malformed URLs like https://example.comlogin
252
+ const normalizedAffected = affected.map(r => {
253
+ if (!r.path.startsWith('/')) {
254
+ console.log(`::warning::Route path "${r.path}" has no leading slash — normalizing to "/${r.path}". Update argus.routes.json to use a leading slash.`);
255
+ return { ...r, path: `/${r.path}` };
256
+ }
257
+ return r;
258
+ });
259
+
260
+ for (const route of normalizedAffected) {
261
+ const url = `${baseUrl}${route.path}`;
251
262
  console.log(`[argus] → Auditing ${url}`);
252
263
 
253
264
  try {
@@ -276,6 +287,18 @@ async function main() {
276
287
  }
277
288
  }
278
289
 
290
+ // Guard: if every route failed with an exception, the app was unreachable after
291
+ // the preflight check (e.g. race condition where app died between check and crawl).
292
+ // Throwing here causes the step to exit 1, which correctly blocks the merge.
293
+ const routeFailCount = perRoute.filter(r => r.error).length;
294
+ if (routeFailCount > 0 && routeFailCount === perRoute.length) {
295
+ throw new Error(
296
+ `All ${perRoute.length} route audit(s) failed — Chrome could not reach the app. ` +
297
+ `Ensure TARGET_DEV_URL is accessible throughout the job. ` +
298
+ `First error: ${perRoute[0].error}`,
299
+ );
300
+ }
301
+
279
302
  // Step 6: Compute aggregate summary and merge-block decision
280
303
  const summary = {
281
304
  critical: allFindings.filter(f => f.severity === 'critical').length,
@@ -289,13 +312,13 @@ async function main() {
289
312
  false;
290
313
 
291
314
  // Step 7: Write GitHub Actions outputs and step summary
292
- writeGithubOutputs({ blocked, summary, affectedRoutes: affected });
293
- writeStepSummary(buildStepSummary({ blocked, summary, affectedRoutes: affected, perRoute, findings: allFindings, changedFiles: files, blockOn }));
315
+ writeGithubOutputs({ blocked, summary, affectedRoutes: normalizedAffected });
316
+ writeStepSummary(buildStepSummary({ blocked, summary, affectedRoutes: normalizedAffected, perRoute, findings: allFindings, changedFiles: files, blockOn }));
294
317
 
295
318
  // Step 8: Emit JSON result to stdout for downstream pipeline steps
296
319
  const result = {
297
320
  prUrl, targetUrl,
298
- affectedRoutes: affected.map(r => r.path),
321
+ affectedRoutes: normalizedAffected.map(r => r.path),
299
322
  changedFiles: files,
300
323
  findings: allFindings,
301
324
  perRoute,
@@ -306,7 +329,10 @@ async function main() {
306
329
  console.log(JSON.stringify(result, null, 2));
307
330
 
308
331
  if (blocked) {
309
- console.error(`::error::Argus PR Validator: ${summary.critical} critical finding(s) found. Merge blocked (block-on=${blockOn}).`);
332
+ const blockReason = blockOn === 'warning'
333
+ ? `${summary.critical} critical + ${summary.warning} warning finding(s) found`
334
+ : `${summary.critical} critical finding(s) found`;
335
+ console.error(`::error::Argus PR Validator: ${blockReason}. Merge blocked (block-on=${blockOn}).`);
310
336
  process.exit(1);
311
337
  }
312
338
 
package/src/mcp-server.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  /**
3
- * Argus MCP Server (v9.6.4)
3
+ * Argus MCP Server (v9.6.6)
4
4
  *
5
5
  * Exposes Argus as an MCP server so Claude (or any MCP client) can call
6
6
  * argus_audit, argus_audit_full, argus_compare, argus_last_report, and
@@ -447,7 +447,7 @@ async function handleLastReport() {
447
447
  // ── Server bootstrap ──────────────────────────────────────────────────────────
448
448
 
449
449
  const server = new Server(
450
- { name: 'argus', version: '9.6.4' },
450
+ { name: 'argus', version: '9.6.6' },
451
451
  { capabilities: { tools: {} } },
452
452
  );
453
453