opencode-swarm 7.77.0 → 7.77.1
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/dist/cli/index.js +49 -1
- package/dist/index.js +49 -1
- package/dist/test-impact/failure-classifier.d.ts +1 -1
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -52,7 +52,7 @@ var package_default;
|
|
|
52
52
|
var init_package = __esm(() => {
|
|
53
53
|
package_default = {
|
|
54
54
|
name: "opencode-swarm",
|
|
55
|
-
version: "7.77.
|
|
55
|
+
version: "7.77.1",
|
|
56
56
|
description: "Architect-centric agentic swarm plugin for OpenCode - hub-and-spoke orchestration with SME consultation, code generation, and QA review",
|
|
57
57
|
main: "dist/index.js",
|
|
58
58
|
types: "dist/index.d.ts",
|
|
@@ -60645,10 +60645,37 @@ function stringHash(str) {
|
|
|
60645
60645
|
h2 ^= Math.imul(h1 ^ h1 >>> 13, 3266489909);
|
|
60646
60646
|
return (4294967296 * (2097151 & h2) + (h1 >>> 0)).toString(16);
|
|
60647
60647
|
}
|
|
60648
|
+
function buildErrnoPatternPair(errno, contextPattern) {
|
|
60649
|
+
return [
|
|
60650
|
+
new RegExp(`(?:^|\\n)\\s*${errno}\\b`, "i"),
|
|
60651
|
+
new RegExp(`\\b(?:${contextPattern})\\b[^\\n]{0,${MAX_INFRA_CONTEXT_CHARS}}\\b${errno}\\b`, "i")
|
|
60652
|
+
];
|
|
60653
|
+
}
|
|
60654
|
+
function isInfrastructureFailure(currentResult) {
|
|
60655
|
+
const errorMessage = currentResult.errorMessage || "";
|
|
60656
|
+
const stackPrefix = currentResult.stackPrefix || "";
|
|
60657
|
+
if (/\bassertionerror\b/i.test(errorMessage)) {
|
|
60658
|
+
return false;
|
|
60659
|
+
}
|
|
60660
|
+
const combinedText = `${errorMessage}
|
|
60661
|
+
${stackPrefix}`;
|
|
60662
|
+
return INFRASTRUCTURE_FAILURE_PATTERNS.some((pattern) => pattern.test(combinedText));
|
|
60663
|
+
}
|
|
60648
60664
|
function classifyFailure(currentResult, history) {
|
|
60649
60665
|
const normalizedFile = currentResult.testFile.toLowerCase();
|
|
60650
60666
|
const normalizedName = currentResult.testName.toLowerCase();
|
|
60651
60667
|
const testHistory = history.filter((r) => r.testFile.toLowerCase() === normalizedFile && r.testName.toLowerCase() === normalizedName).sort((a, b) => new Date(b.timestamp).getTime() - new Date(a.timestamp).getTime());
|
|
60668
|
+
if (isInfrastructureFailure(currentResult)) {
|
|
60669
|
+
return {
|
|
60670
|
+
testFile: currentResult.testFile,
|
|
60671
|
+
testName: currentResult.testName,
|
|
60672
|
+
classification: "infrastructure_failure",
|
|
60673
|
+
errorMessage: currentResult.errorMessage,
|
|
60674
|
+
stackPrefix: currentResult.stackPrefix,
|
|
60675
|
+
durationMs: currentResult.durationMs,
|
|
60676
|
+
confidence: computeConfidence2(testHistory.length)
|
|
60677
|
+
};
|
|
60678
|
+
}
|
|
60652
60679
|
const lastThree = testHistory.slice(0, 3);
|
|
60653
60680
|
const lastTen = testHistory.slice(0, 10);
|
|
60654
60681
|
const normalizedTestFile = currentResult.testFile.toLowerCase();
|
|
@@ -60748,6 +60775,26 @@ function classifyAndCluster(testResults, history) {
|
|
|
60748
60775
|
const clusters = clusterFailures(classified);
|
|
60749
60776
|
return { classified, clusters };
|
|
60750
60777
|
}
|
|
60778
|
+
var MAX_INFRA_CONTEXT_CHARS = 80, INFRASTRUCTURE_FAILURE_PATTERNS;
|
|
60779
|
+
var init_failure_classifier = __esm(() => {
|
|
60780
|
+
INFRASTRUCTURE_FAILURE_PATTERNS = [
|
|
60781
|
+
/\boutofmemoryerror\b/i,
|
|
60782
|
+
/\ballocation failed - javascript heap out of memory\b/i,
|
|
60783
|
+
/\bcannot allocate memory\b/i,
|
|
60784
|
+
/\bout of memory:\s*killed process\b/i,
|
|
60785
|
+
/\boom-kill\b/i,
|
|
60786
|
+
/(?:^|\n|\bcommand failed:\s*)\s*killed(?:\s*(?:[-:]\s*)?(?:by signal|signal|sigkill).*)?\s*(?:\n|$)/i,
|
|
60787
|
+
...buildErrnoPatternPair("ETIMEDOUT", "connect|connection|request|socket|network"),
|
|
60788
|
+
...buildErrnoPatternPair("ECONNREFUSED", "connect|connection|socket"),
|
|
60789
|
+
...buildErrnoPatternPair("ENOTFOUND", "getaddrinfo|dns|lookup"),
|
|
60790
|
+
...buildErrnoPatternPair("ECONNRESET", "connect|connection|request|socket|network|stream|read"),
|
|
60791
|
+
...buildErrnoPatternPair("EPIPE", "pipe|stream|write|socket|stdout|stderr"),
|
|
60792
|
+
/\bbroken pipe\b/i,
|
|
60793
|
+
/\bexit(?:ed)?(?:\s+with)?(?:\s+code)?\s*[:=]?\s*137\b/i,
|
|
60794
|
+
/\bsig(?:segv|abrt|bus)\b/i,
|
|
60795
|
+
/\bsegmentation fault(?:\s*\(core dumped\))?\b/i
|
|
60796
|
+
];
|
|
60797
|
+
});
|
|
60751
60798
|
|
|
60752
60799
|
// src/test-impact/flaky-detector.ts
|
|
60753
60800
|
function computeCombinedFlakyScore(recent) {
|
|
@@ -62913,6 +62960,7 @@ var init_test_runner = __esm(() => {
|
|
|
62913
62960
|
init_zod();
|
|
62914
62961
|
init_discovery();
|
|
62915
62962
|
init_analyzer();
|
|
62963
|
+
init_failure_classifier();
|
|
62916
62964
|
init_history_store();
|
|
62917
62965
|
init_bun_compat();
|
|
62918
62966
|
init_path_security();
|
package/dist/index.js
CHANGED
|
@@ -69,7 +69,7 @@ var package_default;
|
|
|
69
69
|
var init_package = __esm(() => {
|
|
70
70
|
package_default = {
|
|
71
71
|
name: "opencode-swarm",
|
|
72
|
-
version: "7.77.
|
|
72
|
+
version: "7.77.1",
|
|
73
73
|
description: "Architect-centric agentic swarm plugin for OpenCode - hub-and-spoke orchestration with SME consultation, code generation, and QA review",
|
|
74
74
|
main: "dist/index.js",
|
|
75
75
|
types: "dist/index.d.ts",
|
|
@@ -85407,10 +85407,37 @@ function stringHash(str) {
|
|
|
85407
85407
|
h2 ^= Math.imul(h1 ^ h1 >>> 13, 3266489909);
|
|
85408
85408
|
return (4294967296 * (2097151 & h2) + (h1 >>> 0)).toString(16);
|
|
85409
85409
|
}
|
|
85410
|
+
function buildErrnoPatternPair(errno, contextPattern) {
|
|
85411
|
+
return [
|
|
85412
|
+
new RegExp(`(?:^|\\n)\\s*${errno}\\b`, "i"),
|
|
85413
|
+
new RegExp(`\\b(?:${contextPattern})\\b[^\\n]{0,${MAX_INFRA_CONTEXT_CHARS}}\\b${errno}\\b`, "i")
|
|
85414
|
+
];
|
|
85415
|
+
}
|
|
85416
|
+
function isInfrastructureFailure(currentResult) {
|
|
85417
|
+
const errorMessage = currentResult.errorMessage || "";
|
|
85418
|
+
const stackPrefix = currentResult.stackPrefix || "";
|
|
85419
|
+
if (/\bassertionerror\b/i.test(errorMessage)) {
|
|
85420
|
+
return false;
|
|
85421
|
+
}
|
|
85422
|
+
const combinedText = `${errorMessage}
|
|
85423
|
+
${stackPrefix}`;
|
|
85424
|
+
return INFRASTRUCTURE_FAILURE_PATTERNS.some((pattern) => pattern.test(combinedText));
|
|
85425
|
+
}
|
|
85410
85426
|
function classifyFailure(currentResult, history) {
|
|
85411
85427
|
const normalizedFile = currentResult.testFile.toLowerCase();
|
|
85412
85428
|
const normalizedName = currentResult.testName.toLowerCase();
|
|
85413
85429
|
const testHistory = history.filter((r) => r.testFile.toLowerCase() === normalizedFile && r.testName.toLowerCase() === normalizedName).sort((a, b) => new Date(b.timestamp).getTime() - new Date(a.timestamp).getTime());
|
|
85430
|
+
if (isInfrastructureFailure(currentResult)) {
|
|
85431
|
+
return {
|
|
85432
|
+
testFile: currentResult.testFile,
|
|
85433
|
+
testName: currentResult.testName,
|
|
85434
|
+
classification: "infrastructure_failure",
|
|
85435
|
+
errorMessage: currentResult.errorMessage,
|
|
85436
|
+
stackPrefix: currentResult.stackPrefix,
|
|
85437
|
+
durationMs: currentResult.durationMs,
|
|
85438
|
+
confidence: computeConfidence2(testHistory.length)
|
|
85439
|
+
};
|
|
85440
|
+
}
|
|
85414
85441
|
const lastThree = testHistory.slice(0, 3);
|
|
85415
85442
|
const lastTen = testHistory.slice(0, 10);
|
|
85416
85443
|
const normalizedTestFile = currentResult.testFile.toLowerCase();
|
|
@@ -85510,6 +85537,26 @@ function classifyAndCluster(testResults, history) {
|
|
|
85510
85537
|
const clusters = clusterFailures(classified);
|
|
85511
85538
|
return { classified, clusters };
|
|
85512
85539
|
}
|
|
85540
|
+
var MAX_INFRA_CONTEXT_CHARS = 80, INFRASTRUCTURE_FAILURE_PATTERNS;
|
|
85541
|
+
var init_failure_classifier = __esm(() => {
|
|
85542
|
+
INFRASTRUCTURE_FAILURE_PATTERNS = [
|
|
85543
|
+
/\boutofmemoryerror\b/i,
|
|
85544
|
+
/\ballocation failed - javascript heap out of memory\b/i,
|
|
85545
|
+
/\bcannot allocate memory\b/i,
|
|
85546
|
+
/\bout of memory:\s*killed process\b/i,
|
|
85547
|
+
/\boom-kill\b/i,
|
|
85548
|
+
/(?:^|\n|\bcommand failed:\s*)\s*killed(?:\s*(?:[-:]\s*)?(?:by signal|signal|sigkill).*)?\s*(?:\n|$)/i,
|
|
85549
|
+
...buildErrnoPatternPair("ETIMEDOUT", "connect|connection|request|socket|network"),
|
|
85550
|
+
...buildErrnoPatternPair("ECONNREFUSED", "connect|connection|socket"),
|
|
85551
|
+
...buildErrnoPatternPair("ENOTFOUND", "getaddrinfo|dns|lookup"),
|
|
85552
|
+
...buildErrnoPatternPair("ECONNRESET", "connect|connection|request|socket|network|stream|read"),
|
|
85553
|
+
...buildErrnoPatternPair("EPIPE", "pipe|stream|write|socket|stdout|stderr"),
|
|
85554
|
+
/\bbroken pipe\b/i,
|
|
85555
|
+
/\bexit(?:ed)?(?:\s+with)?(?:\s+code)?\s*[:=]?\s*137\b/i,
|
|
85556
|
+
/\bsig(?:segv|abrt|bus)\b/i,
|
|
85557
|
+
/\bsegmentation fault(?:\s*\(core dumped\))?\b/i
|
|
85558
|
+
];
|
|
85559
|
+
});
|
|
85513
85560
|
|
|
85514
85561
|
// src/test-impact/flaky-detector.ts
|
|
85515
85562
|
function computeCombinedFlakyScore(recent) {
|
|
@@ -87720,6 +87767,7 @@ var init_test_runner = __esm(() => {
|
|
|
87720
87767
|
init_zod();
|
|
87721
87768
|
init_discovery();
|
|
87722
87769
|
init_analyzer();
|
|
87770
|
+
init_failure_classifier();
|
|
87723
87771
|
init_history_store();
|
|
87724
87772
|
init_bun_compat();
|
|
87725
87773
|
init_path_security();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { TestRunRecord } from './history-store.js';
|
|
2
|
-
export type FailureClassification = 'new_regression' | 'pre_existing' | 'flaky' | 'unknown';
|
|
2
|
+
export type FailureClassification = 'new_regression' | 'pre_existing' | 'flaky' | 'infrastructure_failure' | 'unknown';
|
|
3
3
|
export interface ClassifiedFailure {
|
|
4
4
|
testFile: string;
|
|
5
5
|
testName: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-swarm",
|
|
3
|
-
"version": "7.77.
|
|
3
|
+
"version": "7.77.1",
|
|
4
4
|
"description": "Architect-centric agentic swarm plugin for OpenCode - hub-and-spoke orchestration with SME consultation, code generation, and QA review",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|