@sudobility/testomniac_runner 0.0.172 → 0.0.174
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/bun.lock +4 -4
- package/package.json +3 -3
- package/src/runner-manager.ts +28 -2
package/bun.lock
CHANGED
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
"@noble/curves": "^1.0.0",
|
|
9
9
|
"@noble/hashes": "^1.0.0",
|
|
10
10
|
"@sudobility/signic_sdk": "^0.1.7",
|
|
11
|
-
"@sudobility/testomniac_runner_service": "^0.1.
|
|
12
|
-
"@sudobility/testomniac_types": "^0.0.
|
|
11
|
+
"@sudobility/testomniac_runner_service": "^0.1.167",
|
|
12
|
+
"@sudobility/testomniac_types": "^0.0.81",
|
|
13
13
|
"hono": "^4.7.0",
|
|
14
14
|
"jose": "^6.1.2",
|
|
15
15
|
"openai": "^6.7.0",
|
|
@@ -172,9 +172,9 @@
|
|
|
172
172
|
|
|
173
173
|
"@sudobility/signic_sdk": ["@sudobility/signic_sdk@0.1.7", "", {}, "sha512-5XSgHSVsmyrMQ/ui1nDywwzt9dbRCsaeJ5tX6mKw2ZXbTZ82OsMr+dqDyV9XV3pfy7IHRIZq73af5KBamx72Fw=="],
|
|
174
174
|
|
|
175
|
-
"@sudobility/testomniac_runner_service": ["@sudobility/testomniac_runner_service@0.1.
|
|
175
|
+
"@sudobility/testomniac_runner_service": ["@sudobility/testomniac_runner_service@0.1.167", "", { "peerDependencies": { "@sudobility/testomniac_types": "^0.0.81" } }, "sha512-6g1yTH1gQ3DJvIjlivDtgD0nSDcnV98o+6x1x1hvn2BwkkNgEulhbO/G3D4UVdB8jjIQ3hQYQEypgYsfHIh0DA=="],
|
|
176
176
|
|
|
177
|
-
"@sudobility/testomniac_types": ["@sudobility/testomniac_types@0.0.
|
|
177
|
+
"@sudobility/testomniac_types": ["@sudobility/testomniac_types@0.0.81", "", { "peerDependencies": { "@sudobility/types": "^1.9.62" } }, "sha512-jYeE1TwSFNhY1j+ZdVSGno61+5uAgMg0AVeyUkKF3UAXyUa5eABK46mPZb2fa3MvgoAyDWOWPvn8WsmoInfFcA=="],
|
|
178
178
|
|
|
179
179
|
"@sudobility/types": ["@sudobility/types@1.9.61", "", {}, "sha512-SODGpstB/iKfK3H/4BvJx/FBcc1h3gutUjGotyxN19VnOfWyzaDoEmW7eyoxOAYhZyXMXagSiii+NIEZvuxKog=="],
|
|
180
180
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sudobility/testomniac_runner",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.174",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
"@noble/curves": "^1.0.0",
|
|
25
25
|
"@noble/hashes": "^1.0.0",
|
|
26
26
|
"@sudobility/signic_sdk": "^0.1.7",
|
|
27
|
-
"@sudobility/testomniac_runner_service": "^0.1.
|
|
28
|
-
"@sudobility/testomniac_types": "^0.0.
|
|
27
|
+
"@sudobility/testomniac_runner_service": "^0.1.167",
|
|
28
|
+
"@sudobility/testomniac_types": "^0.0.81",
|
|
29
29
|
"hono": "^4.7.0",
|
|
30
30
|
"jose": "^6.1.2",
|
|
31
31
|
"openai": "^6.7.0",
|
package/src/runner-manager.ts
CHANGED
|
@@ -112,7 +112,14 @@ export class RunnerManager {
|
|
|
112
112
|
"runner not found for pending run"
|
|
113
113
|
);
|
|
114
114
|
try {
|
|
115
|
-
|
|
115
|
+
// Use /scan/end for closeout (not the legacy completeTestRun). The
|
|
116
|
+
// run was never claimed/started, so there is no bundle work to
|
|
117
|
+
// cancel — just mark the test run failed.
|
|
118
|
+
await api.scanEnd({
|
|
119
|
+
testRunId: pendingRun.id,
|
|
120
|
+
status: "failed",
|
|
121
|
+
runDetection: false,
|
|
122
|
+
});
|
|
116
123
|
} catch (err) {
|
|
117
124
|
logger.error(
|
|
118
125
|
{ err, runId: pendingRun.id },
|
|
@@ -220,9 +227,28 @@ export class RunnerManager {
|
|
|
220
227
|
logger.info({ runId: params.runId }, "run completed successfully");
|
|
221
228
|
} catch (error) {
|
|
222
229
|
logger.error({ err: error, runId: params.runId }, "claimed run failed");
|
|
230
|
+
// runTestRun() already closes a failed run out through /scan/end on its
|
|
231
|
+
// own error path. Use scanEnd here too (idempotent) rather than the legacy
|
|
232
|
+
// completeTestRun, which would reintroduce the old completion path and
|
|
233
|
+
// clobber the server-side closeout. This stays purely as a backstop for
|
|
234
|
+
// the rare case the inner service threw before owning closeout.
|
|
223
235
|
try {
|
|
224
|
-
|
|
236
|
+
// Best-effort: resolve the bundle run so the backstop closeout can also
|
|
237
|
+
// cancel pending interaction runs and close surface/bundle runs — not
|
|
238
|
+
// just the test_run. Falls back to test-run-only closeout if the lookup
|
|
239
|
+
// fails (still better than leaving it open).
|
|
240
|
+
let bundleRunId: number | undefined;
|
|
241
|
+
try {
|
|
242
|
+
const testRun = await api.getTestRun(params.runId);
|
|
243
|
+
bundleRunId = testRun?.testSurfaceBundleRunId ?? undefined;
|
|
244
|
+
} catch {
|
|
245
|
+
// ignore — fall back to test-run-only closeout
|
|
246
|
+
}
|
|
247
|
+
await api.scanEnd({
|
|
248
|
+
testRunId: params.runId,
|
|
249
|
+
bundleRunId,
|
|
225
250
|
status: "failed",
|
|
251
|
+
runDetection: false,
|
|
226
252
|
});
|
|
227
253
|
} catch (completeError) {
|
|
228
254
|
logger.error(
|