gdharness 0.12.6 → 0.12.7

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/build/cli.js CHANGED
@@ -15427,7 +15427,7 @@ var init_tool_definitions = __esm(() => {
15427
15427
  },
15428
15428
  failFast: {
15429
15429
  type: "boolean",
15430
- description: "Stop at the first failure. Default false: the whole set runs."
15430
+ description: "Stop each suite at its first failing case. Default false: every case runs. With it on, the counts are of what ran, notRun says how many cases were left, and fixing what is named and running again finds the next one, which looks like a flaky tier and is not."
15431
15431
  },
15432
15432
  timeoutMs: {
15433
15433
  type: "number",
@@ -35167,16 +35167,20 @@ function parseJUnit(xml) {
35167
35167
  throw new MalformedReportError("No <testsuites> or <testsuite> in the report");
35168
35168
  }
35169
35169
  const suiteElements = top.name === "testsuite" ? [top] : top.children.filter((child) => child.name === "testsuite");
35170
- const suites = suiteElements.map((suite) => ({
35171
- name: suite.attributes["name"] ?? "",
35172
- path: pathOf(suite),
35173
- tests: count(suite.attributes, "tests"),
35174
- failures: count(suite.attributes, "failures"),
35175
- errors: count(suite.attributes, "errors"),
35176
- skipped: count(suite.attributes, "skipped"),
35177
- time: count(suite.attributes, "time"),
35178
- cases: suite.children.filter((child) => child.name === "testcase").map((element) => caseOf(suite, element))
35179
- }));
35170
+ const suites = suiteElements.map((suite) => {
35171
+ const cases = suite.children.filter((child) => child.name === "testcase").map((element) => caseOf(suite, element));
35172
+ return {
35173
+ name: suite.attributes["name"] ?? "",
35174
+ path: pathOf(suite),
35175
+ tests: cases.length,
35176
+ discovered: count(suite.attributes, "tests"),
35177
+ failures: cases.filter((entry) => entry.status === "failed").length,
35178
+ errors: cases.filter((entry) => entry.status === "error").length,
35179
+ skipped: cases.filter((entry) => entry.status === "skipped").length,
35180
+ time: count(suite.attributes, "time"),
35181
+ cases
35182
+ };
35183
+ });
35180
35184
  const all = suites.flatMap((suite) => suite.cases);
35181
35185
  return {
35182
35186
  tests: all.length,
@@ -37475,6 +37479,7 @@ class GodotServer {
37475
37479
  message: `${suite.orphans} node${suite.orphans === 1 ? "" : "s"} were still in the tree when this suite finished. A node built in a test and neither freed nor added to the tree is the usual cause; free it, or add it with auto_free().`
37476
37480
  }));
37477
37481
  const unclean = report.suites.filter((suite) => suite.failures > 0 || suite.errors > 0 || suite.skipped > 0 || orphansIn(suite.path) > 0);
37482
+ const notRun = report.suites.reduce((sum, suite) => sum + Math.max(0, suite.discovered - suite.tests), 0);
37478
37483
  return this.jsonTextResponse({
37479
37484
  passed: !hung && exitCode === 0 && report.failures === 0 && report.errors === 0,
37480
37485
  verdict,
@@ -37487,11 +37492,13 @@ class GodotServer {
37487
37492
  failed,
37488
37493
  warnings: warnings.length > 0 ? warnings : undefined,
37489
37494
  orphans: orphans.total > 0 ? orphans.total : undefined,
37490
- note: verdict.startsWith("warnings") && warnings.length === 0 ? "gdUnit4 exits 101 for orphan nodes when nothing failed, and this run printed no count of them: orphan reporting may be off in the project settings." : undefined,
37495
+ notRun: notRun > 0 ? notRun : undefined,
37496
+ note: verdict.startsWith("warnings") && warnings.length === 0 ? "gdUnit4 exits 101 for orphan nodes when nothing failed, and this run printed no count of them: orphan reporting may be off in the project settings." : notRun > 0 ? `This run stopped at the first failure in each suite it failed in, so ${notRun} case${notRun === 1 ? "" : "s"} never ran and count as neither passed nor failed. Leave failFast out to run every case.` : undefined,
37491
37497
  suites: unclean.map((suite) => ({
37492
37498
  name: suite.name,
37493
37499
  path: suite.path,
37494
37500
  tests: suite.tests,
37501
+ notRun: suite.discovered > suite.tests ? suite.discovered - suite.tests : undefined,
37495
37502
  failures: suite.failures,
37496
37503
  errors: suite.errors,
37497
37504
  skipped: suite.skipped,
package/build/index.js CHANGED
@@ -26592,16 +26592,20 @@ function parseJUnit(xml) {
26592
26592
  throw new MalformedReportError("No <testsuites> or <testsuite> in the report");
26593
26593
  }
26594
26594
  const suiteElements = top.name === "testsuite" ? [top] : top.children.filter((child) => child.name === "testsuite");
26595
- const suites = suiteElements.map((suite) => ({
26596
- name: suite.attributes["name"] ?? "",
26597
- path: pathOf(suite),
26598
- tests: count(suite.attributes, "tests"),
26599
- failures: count(suite.attributes, "failures"),
26600
- errors: count(suite.attributes, "errors"),
26601
- skipped: count(suite.attributes, "skipped"),
26602
- time: count(suite.attributes, "time"),
26603
- cases: suite.children.filter((child) => child.name === "testcase").map((element) => caseOf(suite, element))
26604
- }));
26595
+ const suites = suiteElements.map((suite) => {
26596
+ const cases = suite.children.filter((child) => child.name === "testcase").map((element) => caseOf(suite, element));
26597
+ return {
26598
+ name: suite.attributes["name"] ?? "",
26599
+ path: pathOf(suite),
26600
+ tests: cases.length,
26601
+ discovered: count(suite.attributes, "tests"),
26602
+ failures: cases.filter((entry) => entry.status === "failed").length,
26603
+ errors: cases.filter((entry) => entry.status === "error").length,
26604
+ skipped: cases.filter((entry) => entry.status === "skipped").length,
26605
+ time: count(suite.attributes, "time"),
26606
+ cases
26607
+ };
26608
+ });
26605
26609
  const all = suites.flatMap((suite) => suite.cases);
26606
26610
  return {
26607
26611
  tests: all.length,
@@ -28298,7 +28302,7 @@ var TOOL_SPECS = [
28298
28302
  },
28299
28303
  failFast: {
28300
28304
  type: "boolean",
28301
- description: "Stop at the first failure. Default false: the whole set runs."
28305
+ description: "Stop each suite at its first failing case. Default false: every case runs. With it on, the counts are of what ran, notRun says how many cases were left, and fixing what is named and running again finds the next one, which looks like a flaky tier and is not."
28302
28306
  },
28303
28307
  timeoutMs: {
28304
28308
  type: "number",
@@ -30257,6 +30261,7 @@ class GodotServer {
30257
30261
  message: `${suite.orphans} node${suite.orphans === 1 ? "" : "s"} were still in the tree when this suite finished. A node built in a test and neither freed nor added to the tree is the usual cause; free it, or add it with auto_free().`
30258
30262
  }));
30259
30263
  const unclean = report.suites.filter((suite) => suite.failures > 0 || suite.errors > 0 || suite.skipped > 0 || orphansIn(suite.path) > 0);
30264
+ const notRun = report.suites.reduce((sum, suite) => sum + Math.max(0, suite.discovered - suite.tests), 0);
30260
30265
  return this.jsonTextResponse({
30261
30266
  passed: !hung && exitCode === 0 && report.failures === 0 && report.errors === 0,
30262
30267
  verdict,
@@ -30269,11 +30274,13 @@ class GodotServer {
30269
30274
  failed,
30270
30275
  warnings: warnings.length > 0 ? warnings : undefined,
30271
30276
  orphans: orphans.total > 0 ? orphans.total : undefined,
30272
- note: verdict.startsWith("warnings") && warnings.length === 0 ? "gdUnit4 exits 101 for orphan nodes when nothing failed, and this run printed no count of them: orphan reporting may be off in the project settings." : undefined,
30277
+ notRun: notRun > 0 ? notRun : undefined,
30278
+ note: verdict.startsWith("warnings") && warnings.length === 0 ? "gdUnit4 exits 101 for orphan nodes when nothing failed, and this run printed no count of them: orphan reporting may be off in the project settings." : notRun > 0 ? `This run stopped at the first failure in each suite it failed in, so ${notRun} case${notRun === 1 ? "" : "s"} never ran and count as neither passed nor failed. Leave failFast out to run every case.` : undefined,
30273
30279
  suites: unclean.map((suite) => ({
30274
30280
  name: suite.name,
30275
30281
  path: suite.path,
30276
30282
  tests: suite.tests,
30283
+ notRun: suite.discovered > suite.tests ? suite.discovered - suite.tests : undefined,
30277
30284
  failures: suite.failures,
30278
30285
  errors: suite.errors,
30279
30286
  skipped: suite.skipped,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gdharness",
3
- "version": "0.12.6",
3
+ "version": "0.12.7",
4
4
  "mcpName": "io.github.Aureliolo/gdharness",
5
5
  "description": "A harness for driving a Godot 4 project from an agent: editor addons, a runtime bridge into the running game, an MCP server in front of them, and a CLI that installs and diagnoses the Godot side.",
6
6
  "type": "module",