testdriverai 7.8.0-test.30 → 7.8.0-test.31
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/agent/lib/sandbox.js
CHANGED
|
@@ -4,6 +4,7 @@ const { events } = require("../events");
|
|
|
4
4
|
const logger = require("./logger");
|
|
5
5
|
const { version } = require("../../package.json");
|
|
6
6
|
const { withRetry, getSentryTraceHeaders } = require("./sdk");
|
|
7
|
+
const sentry = require("../../lib/sentry");
|
|
7
8
|
|
|
8
9
|
const createSandbox = function (emitter, analytics, sessionInstance) {
|
|
9
10
|
class Sandbox {
|
|
@@ -436,7 +437,12 @@ const createSandbox = function (emitter, analytics, sessionInstance) {
|
|
|
436
437
|
if (!resolved) {
|
|
437
438
|
resolved = true;
|
|
438
439
|
self._ctrlChannel.unsubscribe('control', onCtrl);
|
|
439
|
-
|
|
440
|
+
var err = new Error('Runner agent did not signal readiness within ' + readyTimeout + 'ms');
|
|
441
|
+
sentry.captureException(err, {
|
|
442
|
+
tags: { phase: 'runner_ready', connection_type: 'create' },
|
|
443
|
+
extra: { readyTimeout: readyTimeout, sandboxId: reply.sandboxId },
|
|
444
|
+
});
|
|
445
|
+
reject(err);
|
|
440
446
|
}
|
|
441
447
|
}, readyTimeout);
|
|
442
448
|
if (timer.unref) timer.unref();
|
|
@@ -549,7 +555,12 @@ const createSandbox = function (emitter, analytics, sessionInstance) {
|
|
|
549
555
|
if (!resolved) {
|
|
550
556
|
resolved = true;
|
|
551
557
|
self._ctrlChannel.unsubscribe('control', onCtrl);
|
|
552
|
-
|
|
558
|
+
var err = new Error('Runner agent did not signal readiness within ' + readyTimeout + 'ms (direct connection)');
|
|
559
|
+
sentry.captureException(err, {
|
|
560
|
+
tags: { phase: 'runner_ready', connection_type: 'direct' },
|
|
561
|
+
extra: { readyTimeout: readyTimeout, sandboxId: reply.sandboxId, instanceId: message.instanceId },
|
|
562
|
+
});
|
|
563
|
+
reject(err);
|
|
553
564
|
}
|
|
554
565
|
}, readyTimeout);
|
|
555
566
|
if (timer.unref) timer.unref();
|
|
@@ -82,6 +82,11 @@ function initializeSentry() {
|
|
|
82
82
|
if (isUserCodeError && (exception.type === "ReferenceError" || exception.type === "TypeError")) {
|
|
83
83
|
return null;
|
|
84
84
|
}
|
|
85
|
+
|
|
86
|
+
// Filter out ElementNotFoundError - expected test outcome, not a crash
|
|
87
|
+
if (exception.type === "ElementNotFoundError") {
|
|
88
|
+
return null;
|
|
89
|
+
}
|
|
85
90
|
}
|
|
86
91
|
}
|
|
87
92
|
|
package/lib/sentry.js
CHANGED
|
@@ -84,6 +84,10 @@ if (isSentryEnabled()) {
|
|
|
84
84
|
if (error && typeof error === "object" && "name" in error && error.name === "TestFailure") {
|
|
85
85
|
return null;
|
|
86
86
|
}
|
|
87
|
+
// Filter out ElementNotFoundError - expected test outcome, not a crash
|
|
88
|
+
if (error && typeof error === "object" && "name" in error && error.name === "ElementNotFoundError") {
|
|
89
|
+
return null;
|
|
90
|
+
}
|
|
87
91
|
return event;
|
|
88
92
|
},
|
|
89
93
|
});
|
package/mcp-server/src/server.ts
CHANGED
|
@@ -99,6 +99,11 @@ if (isSentryEnabled()) {
|
|
|
99
99
|
if (error && typeof error === "object" && "name" in error && (error as { name: string }).name === "TestFailure") {
|
|
100
100
|
return null;
|
|
101
101
|
}
|
|
102
|
+
|
|
103
|
+
// Filter out ElementNotFoundError - expected test outcome, not a crash
|
|
104
|
+
if (error && typeof error === "object" && "name" in error && (error as { name: string }).name === "ElementNotFoundError") {
|
|
105
|
+
return null;
|
|
106
|
+
}
|
|
102
107
|
|
|
103
108
|
return event;
|
|
104
109
|
},
|