opencode-swarm 7.50.0 → 7.50.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 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.50.0",
55
+ version: "7.50.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",
@@ -52414,10 +52414,33 @@ function classifyAndCluster(testResults, history) {
52414
52414
  }
52415
52415
 
52416
52416
  // src/test-impact/flaky-detector.ts
52417
+ function computeCombinedFlakyScore(recent) {
52418
+ const totalRuns = recent.length;
52419
+ if (totalRuns < 2) {
52420
+ return { alternationCount: 0, flakyScore: 0 };
52421
+ }
52422
+ let alternationCount = 0;
52423
+ let passCount = 0;
52424
+ for (let i = 0;i < recent.length; i++) {
52425
+ if (recent[i].result === "pass") {
52426
+ passCount++;
52427
+ }
52428
+ if (i > 0 && recent[i].result !== recent[i - 1].result) {
52429
+ alternationCount++;
52430
+ }
52431
+ }
52432
+ const alternationScore = alternationCount / totalRuns;
52433
+ const passRate = passCount / totalRuns;
52434
+ const passRateVarianceScore = 4 * passRate * (1 - passRate);
52435
+ return {
52436
+ alternationCount,
52437
+ flakyScore: (alternationScore + passRateVarianceScore) / 2
52438
+ };
52439
+ }
52417
52440
  function detectFlakyTests(allHistory) {
52418
52441
  const grouped = new Map;
52419
52442
  for (const record3 of allHistory) {
52420
- const key = `${record3.testFile.toLowerCase()}|${record3.testName.toLowerCase()}`;
52443
+ const key = `${record3.testFile.toLowerCase()}\x00${record3.testName.toLowerCase()}`;
52421
52444
  if (!grouped.has(key)) {
52422
52445
  grouped.set(key, {
52423
52446
  records: [],
@@ -52439,13 +52462,7 @@ function detectFlakyTests(allHistory) {
52439
52462
  if (totalRuns < 2) {
52440
52463
  continue;
52441
52464
  }
52442
- let alternationCount = 0;
52443
- for (let i = 1;i < recent.length; i++) {
52444
- if (recent[i].result !== recent[i - 1].result) {
52445
- alternationCount++;
52446
- }
52447
- }
52448
- const flakyScore = totalRuns >= 2 ? alternationCount / totalRuns : 0;
52465
+ const { alternationCount, flakyScore } = computeCombinedFlakyScore(recent);
52449
52466
  const isQuarantined = flakyScore > FLAKY_THRESHOLD && totalRuns >= MIN_RUNS_FOR_QUARANTINE;
52450
52467
  const recentResults = recent.map((r) => r.result);
52451
52468
  const testFile = entry.originalFile;
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.50.0",
72
+ version: "7.50.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",
@@ -75784,10 +75784,33 @@ function classifyAndCluster(testResults, history) {
75784
75784
  }
75785
75785
 
75786
75786
  // src/test-impact/flaky-detector.ts
75787
+ function computeCombinedFlakyScore(recent) {
75788
+ const totalRuns = recent.length;
75789
+ if (totalRuns < 2) {
75790
+ return { alternationCount: 0, flakyScore: 0 };
75791
+ }
75792
+ let alternationCount = 0;
75793
+ let passCount = 0;
75794
+ for (let i2 = 0;i2 < recent.length; i2++) {
75795
+ if (recent[i2].result === "pass") {
75796
+ passCount++;
75797
+ }
75798
+ if (i2 > 0 && recent[i2].result !== recent[i2 - 1].result) {
75799
+ alternationCount++;
75800
+ }
75801
+ }
75802
+ const alternationScore = alternationCount / totalRuns;
75803
+ const passRate = passCount / totalRuns;
75804
+ const passRateVarianceScore = 4 * passRate * (1 - passRate);
75805
+ return {
75806
+ alternationCount,
75807
+ flakyScore: (alternationScore + passRateVarianceScore) / 2
75808
+ };
75809
+ }
75787
75810
  function detectFlakyTests(allHistory) {
75788
75811
  const grouped = new Map;
75789
75812
  for (const record3 of allHistory) {
75790
- const key = `${record3.testFile.toLowerCase()}|${record3.testName.toLowerCase()}`;
75813
+ const key = `${record3.testFile.toLowerCase()}\x00${record3.testName.toLowerCase()}`;
75791
75814
  if (!grouped.has(key)) {
75792
75815
  grouped.set(key, {
75793
75816
  records: [],
@@ -75809,13 +75832,7 @@ function detectFlakyTests(allHistory) {
75809
75832
  if (totalRuns < 2) {
75810
75833
  continue;
75811
75834
  }
75812
- let alternationCount = 0;
75813
- for (let i2 = 1;i2 < recent.length; i2++) {
75814
- if (recent[i2].result !== recent[i2 - 1].result) {
75815
- alternationCount++;
75816
- }
75817
- }
75818
- const flakyScore = totalRuns >= 2 ? alternationCount / totalRuns : 0;
75835
+ const { alternationCount, flakyScore } = computeCombinedFlakyScore(recent);
75819
75836
  const isQuarantined = flakyScore > FLAKY_THRESHOLD && totalRuns >= MIN_RUNS_FOR_QUARANTINE;
75820
75837
  const recentResults = recent.map((r) => r.result);
75821
75838
  const testFile = entry.originalFile;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-swarm",
3
- "version": "7.50.0",
3
+ "version": "7.50.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",