@descryy/runtime-test-runner 0.2.1 → 0.4.0

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.
Files changed (42) hide show
  1. package/LICENSE +6 -0
  2. package/dist/collector-version.d.ts +2 -6
  3. package/dist/collector-version.d.ts.map +1 -1
  4. package/dist/collector-version.js +2 -6
  5. package/dist/collector-version.js.map +1 -1
  6. package/dist/go-test.d.ts +24 -50
  7. package/dist/go-test.d.ts.map +1 -1
  8. package/dist/go-test.js +30 -68
  9. package/dist/go-test.js.map +1 -1
  10. package/dist/graph-mapping.d.ts +10 -28
  11. package/dist/graph-mapping.d.ts.map +1 -1
  12. package/dist/graph-mapping.js +16 -43
  13. package/dist/graph-mapping.js.map +1 -1
  14. package/dist/index.d.ts +2 -2
  15. package/dist/index.d.ts.map +1 -1
  16. package/dist/index.js +1 -1
  17. package/dist/index.js.map +1 -1
  18. package/dist/jest-reporter.d.ts +20 -46
  19. package/dist/jest-reporter.d.ts.map +1 -1
  20. package/dist/jest-reporter.js +28 -71
  21. package/dist/jest-reporter.js.map +1 -1
  22. package/dist/playwright-reporter.d.ts +16 -34
  23. package/dist/playwright-reporter.d.ts.map +1 -1
  24. package/dist/playwright-reporter.js +22 -51
  25. package/dist/playwright-reporter.js.map +1 -1
  26. package/dist/reporter.d.ts +7 -19
  27. package/dist/reporter.d.ts.map +1 -1
  28. package/dist/reporter.js +18 -52
  29. package/dist/reporter.js.map +1 -1
  30. package/dist/swift-xctest.d.ts +40 -94
  31. package/dist/swift-xctest.d.ts.map +1 -1
  32. package/dist/swift-xctest.js +47 -105
  33. package/dist/swift-xctest.js.map +1 -1
  34. package/dist/test-runner-collector.d.ts +139 -2
  35. package/dist/test-runner-collector.d.ts.map +1 -1
  36. package/dist/test-runner-collector.js +322 -42
  37. package/dist/test-runner-collector.js.map +1 -1
  38. package/dist/vitest-reporter.d.ts +19 -43
  39. package/dist/vitest-reporter.d.ts.map +1 -1
  40. package/dist/vitest-reporter.js +30 -82
  41. package/dist/vitest-reporter.js.map +1 -1
  42. package/package.json +11 -6
package/LICENSE ADDED
@@ -0,0 +1,6 @@
1
+ Copyright (c) Descry
2
+
3
+ All rights reserved. This software is proprietary and confidential.
4
+ No license, express or implied, to reproduce, distribute, modify, or
5
+ create derivative works is granted except as explicitly agreed in
6
+ writing.
@@ -1,10 +1,6 @@
1
1
  /**
2
- * `Evidence.collectorVersion`'s source for every collector in this package:
3
- * this package's own `package.json` "version", read from the artifact
4
- * itself rather than hand-duplicated into a second string that can drift
5
- * from what actually shipped. Same idea as `nodeVersion` elsewhere in this
6
- * repo (`process.version`, always known, never probed) applied to a
7
- * package instead of the Node runtime.
2
+ * `Evidence.collectorVersion` for every collector here: read from
3
+ * package.json directly so it can't drift from what shipped.
8
4
  */
9
5
  export declare const COLLECTOR_VERSION: string;
10
6
  //# sourceMappingURL=collector-version.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"collector-version.d.ts","sourceRoot":"","sources":["../src/collector-version.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAMH,eAAO,MAAM,iBAAiB,EAAE,MAA6E,CAAC"}
1
+ {"version":3,"file":"collector-version.d.ts","sourceRoot":"","sources":["../src/collector-version.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,eAAO,MAAM,iBAAiB,EAAE,MAA6E,CAAC"}
@@ -1,10 +1,6 @@
1
1
  /**
2
- * `Evidence.collectorVersion`'s source for every collector in this package:
3
- * this package's own `package.json` "version", read from the artifact
4
- * itself rather than hand-duplicated into a second string that can drift
5
- * from what actually shipped. Same idea as `nodeVersion` elsewhere in this
6
- * repo (`process.version`, always known, never probed) applied to a
7
- * package instead of the Node runtime.
2
+ * `Evidence.collectorVersion` for every collector here: read from
3
+ * package.json directly so it can't drift from what shipped.
8
4
  */
9
5
  import { createRequire } from "node:module";
10
6
  const require = createRequire(import.meta.url);
@@ -1 +1 @@
1
- {"version":3,"file":"collector-version.js","sourceRoot":"","sources":["../src/collector-version.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,MAAM,OAAO,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAE/C,MAAM,CAAC,MAAM,iBAAiB,GAAY,OAAO,CAAC,iBAAiB,CAAkC,CAAC,OAAO,CAAC"}
1
+ {"version":3,"file":"collector-version.js","sourceRoot":"","sources":["../src/collector-version.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,MAAM,OAAO,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAE/C,MAAM,CAAC,MAAM,iBAAiB,GAAY,OAAO,CAAC,iBAAiB,CAAkC,CAAC,OAAO,CAAC"}
package/dist/go-test.d.ts CHANGED
@@ -1,54 +1,29 @@
1
1
  /**
2
- * §17's Go row (`go test` — "unbuilt... `-json` is the candidate seam and
3
- * has not been evaluated"), closed by evaluating it: `go test -json`
4
- * streams one NDJSON line per real event as the run happens — no report
5
- * file, no end-of-run artifact, the same streaming-first shape every other
6
- * runner on this seam already has.
2
+ * §17 Go row (RT closed by evaluating `go test -json`): streams one NDJSON line
3
+ * per event as the run happens, no report file.
7
4
  *
8
- * ## Why this is a standalone collector, not a `PROFILES` entry
5
+ * Standalone collector, not a `PROFILES` entry: `go test -json` writes its own
6
+ * shape (`{"Action": "run", "Package": ..., "Test": ...}`), not a Descry envelope,
7
+ * and never will be — so translation happens on the reading side via a dedicated
8
+ * collector rather than branching the shared read-loop mid-stream. No envelope
9
+ * version gate needed either: this translator compiles with `createEventTranslator`
10
+ * under the same `tsc -b`, so it can't drift without the build failing.
9
11
  *
10
- * Every runner in `test-runner-collector.ts`'s `PROFILES` speaks the SAME
11
- * envelope directly — the reporter module (or, for JUnit/.NET, the listener)
12
- * already writes `{"type": "test:start", "data": {...}}` on the wire, and
13
- * `createTestRunnerCollector` reads it unchanged. `go test -json` writes ITS
14
- * OWN shape (`{"Action": "run", "Package": ..., "Test": ...}`) — Go's own
15
- * format, not a Descry envelope, and never will be one. So this needed a
16
- * translator on the *reading* side rather than an injected reporter, and
17
- * bolting that into the shared pipeline would have made one runner's single
18
- * shared read-loop branch on which format it is mid-stream. A dedicated
19
- * collector keeps that branch from existing at all.
12
+ * Container problem, Go's shape: a table test's `t.Run` subtests each report
13
+ * their own pass/fail, AND the parent reports too — forwarding the parent would
14
+ * double-count, same defect refused for JUnit/node:test. Measured: every child's
15
+ * `run` arrives while the parent is still open, and the parent's result always
16
+ * arrives last, so parentage is detected by name prefix (`Parent/child`) while
17
+ * streaming, no lookahead needed. A test with children is a container: its own
18
+ * pass/fail is suppressed.
20
19
  *
21
- * The envelope handshake/version gate (`createEnvelopeGate`) does not apply
22
- * here either, for the same reason `ENVELOPE_VERSION`'s own comment gives
23
- * for why the three built-in reporters do not need it: this translator is
24
- * TypeScript, compiled by the same `tsc -b` as `createEventTranslator`, so
25
- * it cannot drift from it without the build itself failing.
26
- *
27
- * ## The container problem, Go's own shape of it
28
- *
29
- * A table test's `t.Run("case", ...)` subtests each get their own
30
- * `run`/`pass`/`fail` — AND the parent `TestTable` gets its own `pass`/`fail`
31
- * too, reporting purely whether any child failed. Forwarding it would be
32
- * the exact defect this checklist already refused for JUnit's containers and
33
- * node:test's `describe` blocks: one child failure counted twice. Measured
34
- * directly (not assumed): Go emits every child's own `run` while the parent
35
- * is still open, and the parent's result always arrives last — so parentage
36
- * is detected by name prefix (`Parent/child`) while streaming, with no
37
- * lookahead needed. A test with children is a container: its own eventual
38
- * pass/fail is suppressed here, never handed to the shared translator.
39
- *
40
- * ## No source location, and that is disclosed rather than scraped
41
- *
42
- * `go test -json` carries no `file`/`line` field. The only place a location
43
- * appears is inside a captured `Output` line's own text
44
- * (`probe_test.go:13: message`) — exactly the "scrape formatted text" this
45
- * codebase already refuses for `cargo test`'s TAP-shaped prose. Not done
46
- * here either: `sourceLocation` stays null, an honest gap instead of a
47
- * guess with a filename in it that might be a helper's, not the test's own.
20
+ * No source location: `go test -json` has no `file`/`line` field, only a
21
+ * possible mention inside captured `Output` text — not scraped (same refusal as
22
+ * `cargo test`'s prose). `sourceLocation` stays null: an honest gap, not a guess.
48
23
  */
49
24
  import type { Collector } from "@descryy/runtime-contracts";
50
25
  import { type NodeTestEvent, type TraceCoverage } from "./test-runner-collector.ts";
51
- /** One line of `go test -json`'s own NDJSON, undocumented as a stable format contract but stable in shape since Go 1.10. */
26
+ /** One line of `go test -json` NDJSON — undocumented as a contract but stable in shape since Go 1.10. */
52
27
  export interface GoTestEvent {
53
28
  readonly Action: "start" | "run" | "pause" | "cont" | "bench" | "pass" | "fail" | "skip" | "output";
54
29
  readonly Package?: string;
@@ -58,11 +33,10 @@ export interface GoTestEvent {
58
33
  }
59
34
  export declare function isGoTestEvent(value: unknown): value is GoTestEvent;
60
35
  /**
61
- * Go-native JSON in, shared `NodeTestEvent` envelope out (or nothing, for a
62
- * suppressed container or a package-level line with no `Test`). Holds one
63
- * open entry per in-flight test name, keyed exactly as Go names it
64
- * (`Parent`, `Parent/child`), so a child's `run` event can mark its parent
65
- * as having children before the parent's own result arrives.
36
+ * Go-native JSON in, shared `NodeTestEvent` out (or null for a suppressed
37
+ * container or package-level line with no `Test`). Keeps one open entry per
38
+ * in-flight test name (`Parent`, `Parent/child`) so a child's `run` can mark
39
+ * its parent as having children before the parent's result arrives.
66
40
  */
67
41
  export declare function createGoEventTranslator(): {
68
42
  translate(event: GoTestEvent): NodeTestEvent | null;
@@ -70,7 +44,7 @@ export declare function createGoEventTranslator(): {
70
44
  export interface GoTestCollectorOptions {
71
45
  readonly command: string;
72
46
  readonly cwd: string;
73
- /** Joins emitted Evidence back to a named service, same convention as every other collector. Omit for a standalone test run with no corresponding service. */
47
+ /** Joins emitted Evidence to a named service; omit for a standalone run with no corresponding service. */
74
48
  readonly service?: string;
75
49
  }
76
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AAsB,GAAG,eAAe,CAoEtF"}
package/dist/go-test.js CHANGED
@@ -1,50 +1,25 @@
1
1
  /**
2
- * §17's Go row (`go test` — "unbuilt... `-json` is the candidate seam and
3
- * has not been evaluated"), closed by evaluating it: `go test -json`
4
- * streams one NDJSON line per real event as the run happens — no report
5
- * file, no end-of-run artifact, the same streaming-first shape every other
6
- * runner on this seam already has.
2
+ * §17 Go row (RT closed by evaluating `go test -json`): streams one NDJSON line
3
+ * per event as the run happens, no report file.
7
4
  *
8
- * ## Why this is a standalone collector, not a `PROFILES` entry
5
+ * Standalone collector, not a `PROFILES` entry: `go test -json` writes its own
6
+ * shape (`{"Action": "run", "Package": ..., "Test": ...}`), not a Descry envelope,
7
+ * and never will be — so translation happens on the reading side via a dedicated
8
+ * collector rather than branching the shared read-loop mid-stream. No envelope
9
+ * version gate needed either: this translator compiles with `createEventTranslator`
10
+ * under the same `tsc -b`, so it can't drift without the build failing.
9
11
  *
10
- * Every runner in `test-runner-collector.ts`'s `PROFILES` speaks the SAME
11
- * envelope directly — the reporter module (or, for JUnit/.NET, the listener)
12
- * already writes `{"type": "test:start", "data": {...}}` on the wire, and
13
- * `createTestRunnerCollector` reads it unchanged. `go test -json` writes ITS
14
- * OWN shape (`{"Action": "run", "Package": ..., "Test": ...}`) — Go's own
15
- * format, not a Descry envelope, and never will be one. So this needed a
16
- * translator on the *reading* side rather than an injected reporter, and
17
- * bolting that into the shared pipeline would have made one runner's single
18
- * shared read-loop branch on which format it is mid-stream. A dedicated
19
- * collector keeps that branch from existing at all.
12
+ * Container problem, Go's shape: a table test's `t.Run` subtests each report
13
+ * their own pass/fail, AND the parent reports too — forwarding the parent would
14
+ * double-count, same defect refused for JUnit/node:test. Measured: every child's
15
+ * `run` arrives while the parent is still open, and the parent's result always
16
+ * arrives last, so parentage is detected by name prefix (`Parent/child`) while
17
+ * streaming, no lookahead needed. A test with children is a container: its own
18
+ * pass/fail is suppressed.
20
19
  *
21
- * The envelope handshake/version gate (`createEnvelopeGate`) does not apply
22
- * here either, for the same reason `ENVELOPE_VERSION`'s own comment gives
23
- * for why the three built-in reporters do not need it: this translator is
24
- * TypeScript, compiled by the same `tsc -b` as `createEventTranslator`, so
25
- * it cannot drift from it without the build itself failing.
26
- *
27
- * ## The container problem, Go's own shape of it
28
- *
29
- * A table test's `t.Run("case", ...)` subtests each get their own
30
- * `run`/`pass`/`fail` — AND the parent `TestTable` gets its own `pass`/`fail`
31
- * too, reporting purely whether any child failed. Forwarding it would be
32
- * the exact defect this checklist already refused for JUnit's containers and
33
- * node:test's `describe` blocks: one child failure counted twice. Measured
34
- * directly (not assumed): Go emits every child's own `run` while the parent
35
- * is still open, and the parent's result always arrives last — so parentage
36
- * is detected by name prefix (`Parent/child`) while streaming, with no
37
- * lookahead needed. A test with children is a container: its own eventual
38
- * pass/fail is suppressed here, never handed to the shared translator.
39
- *
40
- * ## No source location, and that is disclosed rather than scraped
41
- *
42
- * `go test -json` carries no `file`/`line` field. The only place a location
43
- * appears is inside a captured `Output` line's own text
44
- * (`probe_test.go:13: message`) — exactly the "scrape formatted text" this
45
- * codebase already refuses for `cargo test`'s TAP-shaped prose. Not done
46
- * here either: `sourceLocation` stays null, an honest gap instead of a
47
- * guess with a filename in it that might be a helper's, not the test's own.
20
+ * No source location: `go test -json` has no `file`/`line` field, only a
21
+ * possible mention inside captured `Output` text — not scraped (same refusal as
22
+ * `cargo test`'s prose). `sourceLocation` stays null: an honest gap, not a guess.
48
23
  */
49
24
  import { spawnProcess } from "@descryy/runtime-controller";
50
25
  import { createEventTranslator, pumpLines } from "./test-runner-collector.js";
@@ -52,11 +27,10 @@ export function isGoTestEvent(value) {
52
27
  return typeof value === "object" && value !== null && "Action" in value;
53
28
  }
54
29
  /**
55
- * Go-native JSON in, shared `NodeTestEvent` envelope out (or nothing, for a
56
- * suppressed container or a package-level line with no `Test`). Holds one
57
- * open entry per in-flight test name, keyed exactly as Go names it
58
- * (`Parent`, `Parent/child`), so a child's `run` event can mark its parent
59
- * as having children before the parent's own result arrives.
30
+ * Go-native JSON in, shared `NodeTestEvent` out (or null for a suppressed
31
+ * container or package-level line with no `Test`). Keeps one open entry per
32
+ * in-flight test name (`Parent`, `Parent/child`) so a child's `run` can mark
33
+ * its parent as having children before the parent's result arrives.
60
34
  */
61
35
  export function createGoEventTranslator() {
62
36
  const open = new Map();
@@ -68,7 +42,7 @@ export function createGoEventTranslator() {
68
42
  translate(event) {
69
43
  const name = event.Test;
70
44
  if (name === undefined)
71
- return null; // package-level line -- no single test to attribute it to
45
+ return null; // package-level line, no single test to attribute it to
72
46
  const qualifiedName = event.Package !== undefined ? `${event.Package}.${name}` : name;
73
47
  switch (event.Action) {
74
48
  case "run": {
@@ -90,9 +64,7 @@ export function createGoEventTranslator() {
90
64
  case "skip": {
91
65
  const entry = open.get(name);
92
66
  open.delete(name);
93
- // A container's own result is redundant with its children's, which
94
- // were already reported individually -- forwarding it would be the
95
- // same double-count RT-074/RT-092 refused for JUnit and node:test.
67
+ // container result redundant with children's, already reported (RT-074/RT-092)
96
68
  if (entry?.hasChildren === true)
97
69
  return null;
98
70
  if (event.Action === "skip") {
@@ -102,24 +74,15 @@ export function createGoEventTranslator() {
102
74
  name,
103
75
  qualifiedName,
104
76
  skip: true,
105
- // Go's JSON does not distinguish an unconditional `t.Skip()`
106
- // from a conditional precondition bail -- claiming either
107
- // would be a guess this translator refuses to make.
77
+ // Go's JSON doesn't distinguish unconditional t.Skip() from a
78
+ // conditional bail -- not guessed which.
108
79
  skipReason: "unspecified",
109
80
  },
110
81
  };
111
82
  }
112
83
  const message = (entry?.output ?? []).join("").trim();
113
84
  const durationMs = event.Elapsed !== undefined ? { duration_ms: event.Elapsed * 1000 } : {};
114
- // `error` carries no free-form `message` field in the shared
115
- // `NodeTestEvent` type -- only `code`/`failureType`/`cause`.
116
- // Jest's own reporter (`jest-reporter.ts`) is not held to this
117
- // check at all: it emits raw JSON via `console.log`, never an
118
- // object literal typed as `NodeTestEvent`, so it can and does put
119
- // arbitrary fields under `error`. This translator constructs a
120
- // typed literal directly, so it uses the two real, declared
121
- // fields instead: `failureType` names the kind, `cause` (typed
122
- // `unknown`) carries the captured Output text verbatim.
85
+ // NodeTestEvent's `error` has no free-form `message`, only code/failureType/cause.
123
86
  const errorField = event.Action === "fail" ? { error: { failureType: "test", cause: message } } : {};
124
87
  return {
125
88
  type: event.Action === "pass" ? "test:pass" : "test:fail",
@@ -152,7 +115,7 @@ function computeCapabilities() {
152
115
  externalServiceObservation: status,
153
116
  };
154
117
  }
155
- /** Splits `command` on whitespace, the same minimal tokenizer discipline `discoverRunner` uses elsewhere on this seam -- no shell quoting support, by the same declared-not-inferred reasoning. */
118
+ /** Splits `command` on whitespace, same as `discoverRunner` elsewhere -- no shell quoting support. */
156
119
  function splitCommand(command) {
157
120
  return command.trim().split(/\s+/).filter((s) => s.length > 0);
158
121
  }
@@ -190,9 +153,8 @@ export function createGoTestCollector(options) {
190
153
  parsed = JSON.parse(line);
191
154
  }
192
155
  catch {
193
- // `go test`'s own compiler/vet diagnostics print as plain text
194
- // ahead of the JSON stream on a build failure -- ordinary noise,
195
- // not a parse failure of this collector's own reporter.
156
+ // go build/vet diagnostics print as plain text ahead of the JSON stream
157
+ // on a build failure -- ordinary noise, not a real parse failure.
196
158
  return;
197
159
  }
198
160
  if (!isGoTestEvent(parsed))
@@ -1 +1 @@
1
- {"version":3,"file":"go-test.js","sourceRoot":"","sources":["../src/go-test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AAEH,OAAO,EAAE,YAAY,EAAuB,MAAM,6BAA6B,CAAC;AAGhF,OAAO,EAAE,qBAAqB,EAAE,SAAS,EAA0C,MAAM,4BAA4B,CAAC;AAWtH,MAAM,UAAU,aAAa,CAAC,KAAc;IAC1C,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,QAAQ,IAAI,KAAK,CAAC;AAC1E,CAAC;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B,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;YAC/D,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE;gBACX,gBAAgB,CAAC,KAAK,EAAE,CAAC;YAC3B,CAAC,CAAC,CAAC;YAEH,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;QAC7B,CAAC;QAED,KAAK,CAAC,IAAI;YACR,IAAI,OAAO,KAAK,IAAI;gBAAE,MAAM,OAAO,CAAC,IAAI,EAAE,CAAC;YAC3C,MAAM,UAAU,CAAC;QACnB,CAAC;QAED,YAAY;YACV,OAAO,YAAY,CAAC;QACtB,CAAC;QAED,KAAK,CAAC,iBAAiB;YACrB,MAAM,UAAU,CAAC;QACnB,CAAC;QAED,aAAa;YACX,OAAO,UAAU,EAAE,QAAQ,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC;QAClF,CAAC;KACF,CAAC;AACJ,CAAC"}
@@ -1,27 +1,16 @@
1
1
  /**
2
- * §17's "TEST_CASE graph mapping" (RT-076): resolving an observed test's
3
- * evidence to the real `TEST_CASE` graph node graph-correlator's
4
- * `resolveTestCaseNode` (`@descryy/runtime-graph-correlator`) already knows
5
- * how to find.
2
+ * §17 TEST_CASE graph mapping (RT-076): resolves observed-test evidence to the
3
+ * real `TEST_CASE` node via `resolveTestCaseNode` (`@descryy/runtime-graph-correlator`).
6
4
  *
7
- * Deliberately a thin translation, not a new abstraction: every other
8
- * collector's evidence is resolved the same way, by a caller extracting
9
- * the relevant fields and calling the resolver directly
10
- * (`vertical-slice`'s own tests do exactly this for `resolveSymbolNode`).
11
- * `resolveObservedTestCase` exists only because TEST_STARTED/PASSED/FAILED
12
- * has two names -- `payload.name` (node:test's own, unprefixed) and
13
- * `payload.qualifiedName` (suite-prefixed, matching the graph's own
14
- * convention) -- and using the wrong one is a silent, plausible-looking
15
- * miss (see `test-runner-collector.ts`'s own `SuiteStack` comment). This
16
- * function is the one place that decision is made, so it cannot be made
17
- * wrong at each call site independently.
5
+ * A thin translation, not a new abstraction — exists only because
6
+ * TEST_STARTED/PASSED/FAILED carries two names, `payload.name` (node:test's own,
7
+ * unprefixed) and `payload.qualifiedName` (suite-prefixed, matching the graph's
8
+ * convention), and picking the wrong one is a silent plausible-looking miss.
9
+ * Centralized here so that decision is made once.
18
10
  *
19
- * Does not call `EvidenceStore.attribute()` itself. That needs the
20
- * evidence's real `evidenceId`, which only exists after `store.write()`
21
- * has returned it -- outside this collector's own reach, same as every
22
- * other collector's `graphNodeId: null`. The caller that already holds
23
- * both the store and the graph `driver` (the same one `vertical-slice`'s
24
- * tests already are) attributes; this only resolves.
11
+ * Does not call `EvidenceStore.attribute()`: that needs `evidenceId`, which only
12
+ * exists after `store.write()` returns — outside this collector's reach. The
13
+ * caller holding both store and graph `driver` attributes; this only resolves.
25
14
  */
26
15
  import type { SqlDriver } from "@descryy/core";
27
16
  import { type TestCaseResolution } from "@descryy/runtime-graph-correlator";
@@ -30,13 +19,6 @@ export type ObservedTestCaseResolution = TestCaseResolution | {
30
19
  readonly outcome: "no-location";
31
20
  readonly reason: string;
32
21
  };
33
- /**
34
- * Refuses (returns `"no-location"`, never throws) for anything that isn't
35
- * TEST_STARTED/PASSED/FAILED evidence with a real `sourceLocation.file` --
36
- * the same "wrong input, refuse rather than guess" shape every resolver in
37
- * `graph-correlator` already uses for a missing `repoRoot` or an evidence
38
- * item outside the declared repo.
39
- */
40
22
  export declare function resolveObservedTestCase(driver: SqlDriver, evidence: Pick<Evidence, "eventType" | "payload" | "sourceLocation">, repo: string, options?: {
41
23
  readonly repoRoot?: string;
42
24
  readonly producerScanLimit?: number;
@@ -1 +1 @@
1
- {"version":3,"file":"graph-mapping.d.ts","sourceRoot":"","sources":["../src/graph-mapping.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,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E,MAAM,CAAC;IAAC,QAAQ,CAAC,iBAAiB,CAAC,EAAE,MAAM,CAAA;CAAO,GAChF,0BAA0B,CA2B5B"}
@@ -1,52 +1,25 @@
1
1
  /**
2
- * §17's "TEST_CASE graph mapping" (RT-076): resolving an observed test's
3
- * evidence to the real `TEST_CASE` graph node graph-correlator's
4
- * `resolveTestCaseNode` (`@descryy/runtime-graph-correlator`) already knows
5
- * how to find.
2
+ * §17 TEST_CASE graph mapping (RT-076): resolves observed-test evidence to the
3
+ * real `TEST_CASE` node via `resolveTestCaseNode` (`@descryy/runtime-graph-correlator`).
6
4
  *
7
- * Deliberately a thin translation, not a new abstraction: every other
8
- * collector's evidence is resolved the same way, by a caller extracting
9
- * the relevant fields and calling the resolver directly
10
- * (`vertical-slice`'s own tests do exactly this for `resolveSymbolNode`).
11
- * `resolveObservedTestCase` exists only because TEST_STARTED/PASSED/FAILED
12
- * has two names -- `payload.name` (node:test's own, unprefixed) and
13
- * `payload.qualifiedName` (suite-prefixed, matching the graph's own
14
- * convention) -- and using the wrong one is a silent, plausible-looking
15
- * miss (see `test-runner-collector.ts`'s own `SuiteStack` comment). This
16
- * function is the one place that decision is made, so it cannot be made
17
- * wrong at each call site independently.
5
+ * A thin translation, not a new abstraction — exists only because
6
+ * TEST_STARTED/PASSED/FAILED carries two names, `payload.name` (node:test's own,
7
+ * unprefixed) and `payload.qualifiedName` (suite-prefixed, matching the graph's
8
+ * convention), and picking the wrong one is a silent plausible-looking miss.
9
+ * Centralized here so that decision is made once.
18
10
  *
19
- * Does not call `EvidenceStore.attribute()` itself. That needs the
20
- * evidence's real `evidenceId`, which only exists after `store.write()`
21
- * has returned it -- outside this collector's own reach, same as every
22
- * other collector's `graphNodeId: null`. The caller that already holds
23
- * both the store and the graph `driver` (the same one `vertical-slice`'s
24
- * tests already are) attributes; this only resolves.
11
+ * Does not call `EvidenceStore.attribute()`: that needs `evidenceId`, which only
12
+ * exists after `store.write()` returns — outside this collector's reach. The
13
+ * caller holding both store and graph `driver` attributes; this only resolves.
25
14
  */
26
15
  import { resolveTestCaseNode } from "@descryy/runtime-graph-correlator";
27
- /**
28
- * **`TEST_SKIPPED` belongs here and was missing (RT-129).**
29
- *
30
- * RT-124's own commit message said a skipped test "resolves to the same
31
- * `TEST_CASE` node a run test does". That was true of the payload — it
32
- * carries `sourceLocation` and `qualifiedName` exactly like a pass — and
33
- * false of this set, which refused it with the message a *wrong input*
34
- * gets. The type was a counter with extra steps, which is precisely what
35
- * the proposal argued against, and the claim was never checked against
36
- * this line.
37
- *
38
- * The point of making it an event was that "the function you changed has a
39
- * test and it is disabled" is expressible. It is not expressible if the
40
- * evidence cannot reach a node.
41
- */
16
+ // TEST_SKIPPED belongs in this set and was missing (RT-129) — its payload carries
17
+ // `sourceLocation`/`qualifiedName` just like a pass, so it must resolve to a node too,
18
+ // otherwise "this test exists and is disabled" can't be expressed.
42
19
  const TEST_CASE_EVENT_TYPES = new Set(["TEST_STARTED", "TEST_PASSED", "TEST_FAILED", "TEST_SKIPPED"]);
43
- /**
44
- * Refuses (returns `"no-location"`, never throws) for anything that isn't
45
- * TEST_STARTED/PASSED/FAILED evidence with a real `sourceLocation.file` --
46
- * the same "wrong input, refuse rather than guess" shape every resolver in
47
- * `graph-correlator` already uses for a missing `repoRoot` or an evidence
48
- * item outside the declared repo.
49
- */
20
+ // Refuses (`"no-location"`, never throws) for anything that isn't TEST_STARTED/PASSED/FAILED/SKIPPED
21
+ // with a real `sourceLocation.file` — same refuse-rather-than-guess shape as every
22
+ // `graph-correlator` resolver.
50
23
  export function resolveObservedTestCase(driver, evidence, repo, options = {}) {
51
24
  if (!TEST_CASE_EVENT_TYPES.has(evidence.eventType)) {
52
25
  return {
@@ -1 +1 @@
1
- {"version":3,"file":"graph-mapping.js","sourceRoot":"","sources":["../src/graph-mapping.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAGH,OAAO,EAAE,mBAAmB,EAA2B,MAAM,mCAAmC,CA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I,CAAC;IACnD,OAAO,mBAAmB,CACxB,MAAM,EACN,EAAE,IAAI,EAAE,QAAQ,EAAE,aAAa,EAAE,GAAG,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,EACrE,IAAI,EACJ,OAAO,CACR,CAAC;AACJ,CAAC"}
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- export type { TestRunnerConfiguration, TestRunnerCollectorOptions, TestRunnerCollector, RunnerDiscovery, RunnerKind, SkipReason, TraceCoverage, EnvelopeVerdict } from "./test-runner-collector.ts";
2
- export { createTestRunnerCollector, discoverRunner, withReporterFlags, reporterFlagsFor, reporterEnvFor, createEnvelopeGate, ENVELOPE_VERSION, ENVELOPE_HANDSHAKE_TYPE } from "./test-runner-collector.ts";
1
+ export type { TestRunnerConfiguration, TestRunnerCollectorOptions, TestRunnerCollector, RunnerDiscovery, RunnerKind, RunnerMatch, SkipReason, TraceCoverage, EnvelopeVerdict, NodeTestEvent } from "./test-runner-collector.ts";
2
+ export { createTestRunnerCollector, discoverRunner, matchRunner, withReporterFlags, reporterFlagsFor, reporterEnvFor, supportedRunnerExamples, createEnvelopeGate, createUnittestResultParser, ENVELOPE_VERSION, ENVELOPE_HANDSHAKE_TYPE, } from "./test-runner-collector.ts";
3
3
  export type { ObservedTestCaseResolution } from "./graph-mapping.ts";
4
4
  export { resolveObservedTestCase } from "./graph-mapping.ts";
5
5
  export type { SwiftTestDump, DiscoveredSwiftClass, SwiftDiscoveryResult, SwiftXCTestCollectorOptions, SwiftXCTestCollector } from "./swift-xctest.ts";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,uBAAuB,EAAE,0BAA0B,EAAE,mBAAmB,EAAE,eAAe,EAAE,UAAU,EAAE,UAAU,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,4BA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AAoB,CAAC;AAE7D,YAAY,EAAE,aAAa,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,2BAA2B,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACtJ,OAAO,EACL,eAAe,EACf,iBAAiB,EACjB,kBAAkB,EAClB,cAAc,EACd,wBAAwB,EACxB,0BAA0B,EAC1B,gBAAgB,GACjB,MAAM,mBAAmB,CAAC;AAE3B,YAAY,EAAE,WAAW,EAAE,sBAAsB,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AACzF,OAAO,EAAE,aAAa,EAAE,uBAAuB,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAE7F,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC"}
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- export { createTestRunnerCollector, discoverRunner, withReporterFlags, reporterFlagsFor, reporterEnvFor, createEnvelopeGate, ENVELOPE_VERSION, ENVELOPE_HANDSHAKE_TYPE } from "./test-runner-collector.js";
1
+ export { createTestRunnerCollector, discoverRunner, matchRunner, withReporterFlags, reporterFlagsFor, reporterEnvFor, supportedRunnerExamples, createEnvelopeGate, createUnittestResultParser, ENVELOPE_VERSION, ENVELOPE_HANDSHAKE_TYPE, } from "./test-runner-collector.js";
2
2
  export { resolveObservedTestCase } from "./graph-mapping.js";
3
3
  export { discoverClasses, generateLinuxMain, discoverSwiftTests, writeLinuxMain, removeGeneratedLinuxMain, createSwiftXCTestCollector, GENERATED_MARKER, } from "./swift-xctest.js";
4
4
  export { isGoTestEvent, createGoEventTranslator, createGoTestCollector } from "./go-test.js";
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,yBAAyB,EAAE,cAAc,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,cAAc,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AAG3M,OAAO,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAG7D,OAAO,EACL,eAAe,EACf,iBAAiB,EACjB,kBAAkB,EAClB,cAAc,EACd,wBAAwB,EACxB,0BAA0B,EAC1B,gBAAgB,GACjB,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EAAE,aAAa,EAAE,uBAAuB,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAE7F,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,yBAAyB,EACzB,cAAc,EACd,WAAW,EACX,iBAAiB,EACjB,gBAAgB,EAChB,cAAc,EACd,uBAAuB,EACvB,kBAAkB,EAClB,0BAA0B,EAC1B,gBAAgB,EAChB,uBAAuB,GACxB,MAAM,4BAA4B,CAAC;AAGpC,OAAO,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAG7D,OAAO,EACL,eAAe,EACf,iBAAiB,EACjB,kBAAkB,EAClB,cAAc,EACd,wBAAwB,EACxB,0BAA0B,EAC1B,gBAAgB,GACjB,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EAAE,aAAa,EAAE,uBAAuB,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAE7F,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC"}
@@ -1,50 +1,24 @@
1
1
  /**
2
- * A **Jest** custom reporter (`--reporters=<path to this file's compiled
3
- * output>`), emitting the same NDJSON envelope `reporter.ts` emits for
4
- * `node:test`.
5
- *
6
- * ## Why one envelope and three reporters, rather than three collectors
7
- *
8
- * The per-runner knowledge is *what its own structured API calls things*,
9
- * and that knowledge only exists inside the runner's own process, where the
10
- * API is. So each runner gets a reporter that speaks its API and writes the
11
- * one shape `test-runner-collector.ts` already reads —
12
- * `{type: "test:start"|"test:pass"|"test:fail", data: {...}}`, node:test's
13
- * own event names, kept as the envelope because it was first and renaming
14
- * them would churn a working translator for nothing.
15
- *
16
- * `createEventTranslator` therefore needed **no per-runner branch**: no
17
- * `if (runner === "jest")` anywhere above this file, which is the same
18
- * boundary rule the IR has. Everything Jest-specific is here.
19
- *
20
- * ## What Jest gives that node:test does not, and vice versa
21
- *
22
- * `testCaseResult.ancestorTitles` is the real `describe()` chain, so
23
- * `qualifiedName` is exact rather than reconstructed — node:test forced
24
- * `SuiteStack` to rebuild it from `nesting` because its events carry only
25
- * the innermost title (RT-076). Emitting it directly is why the translator
26
- * prefers a supplied `qualifiedName` over its own reconstruction.
27
- *
28
- * **Jest's own `fullName` is the same space-joined string** and is used
29
- * here in preference to re-joining, since it is what Jest itself
30
- * considers the test's full name. It matches `adapter-typescript`'s
31
- * TEST_CASE convention (`[...suite, title].join(" ")`) exactly — verified
32
- * against a real run, not assumed. Vitest's `fullName` does **not** (it
33
- * joins with `" > "`), which is why `vitest-reporter.ts` rebuilds it and
34
- * this one does not.
35
- *
36
- * **`onTestCaseStart` carries no location** — measured. Only
37
- * `onTestCaseResult` does, and only when `--testLocationInResults` is
38
- * passed. So TEST_STARTED for Jest has a `file` but null `line`/`column`,
39
- * where node:test's has all three. Disclosed rather than filled in.
40
- *
41
- * ## `--testLocationInResults` is load-bearing, and its absence is silent
42
- *
43
- * Measured directly: without it, `testCaseResult.location` is `undefined`
44
- * on every result. The collector still runs, still emits every event, and
45
- * every one silently has no line or column — the same shape as RT-073's
46
- * reporter-flag ordering bug, where the failure was "no error, wrong
47
- * output". `withReporterFlags` injects it; it is not left to the caller.
2
+ * Jest custom reporter (`--reporters=`), emitting the same NDJSON envelope
3
+ * `reporter.ts` emits for node:test.
4
+ *
5
+ * Three reporters, one envelope, not three collectors: each runner speaks its
6
+ * own API and writes the shape `test-runner-collector.ts` reads
7
+ * (`{type: "test:start"|"test:pass"|"test:fail", data: {...}}`, kept as
8
+ * node:test's own names since it was first). `createEventTranslator` needs no
9
+ * per-runner branch; everything Jest-specific lives here.
10
+ *
11
+ * `testCaseResult.ancestorTitles` gives the real `describe()` chain, so
12
+ * `qualifiedName` is exact, not reconstructed (contrast node:test's `SuiteStack`,
13
+ * RT-076). Jest's `fullName` is used directly since it matches
14
+ * `adapter-typescript`'s TEST_CASE convention (`[...suite, title].join(" ")`)
15
+ * exactly (verified against a real run) — Vitest's `fullName` does not (joins
16
+ * with `" > "`), which is why `vitest-reporter.ts` rebuilds it and this doesn't.
17
+ *
18
+ * `onTestCaseStart` carries no location (measured); only `onTestCaseResult`
19
+ * does, and only with `--testLocationInResults`. Without that flag,
20
+ * `location` is silently `undefined` on every result (same failure shape as
21
+ * RT-073) — `withReporterFlags` injects it rather than leaving it to the caller.
48
22
  */
49
23
  interface JestTestCaseStartInfo {
50
24
  readonly title: string;
@@ -1 +1 @@
1
- {"version":3,"file":"jest-reporter.d.ts","sourceRoot":"","sources":["../src/jest-reporter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AAEH,UAAU,qBAAqB;IAC7B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,cAAc,EAAE,SAAS,MAAM,EAAE,CAAC;CAC5C;AAED,UAAU,kBAAmB,SAAQ,qBAAqB;IACxD,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,QAAQ,CAAC,eAAe,EAAE,SAAS,MAAM,EAAE,CAAC;IAC5C,QAAQ,CAAC,cAAc,CAAC,EAAE,SAAS,OAAO,EAAE,CAAC;IAC7C,QAAQ,CAAC,QAAQ,CAAC,EAAE;QAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAA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