@e2edev/e2e 0.12.0 → 0.14.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 (319) hide show
  1. package/README.md +4 -4
  2. package/dist/agent/act.d.ts +13 -7
  3. package/dist/agent/act.d.ts.map +1 -1
  4. package/dist/agent/act.js +125 -730
  5. package/dist/agent/act.js.map +1 -1
  6. package/dist/agent/action-dispatcher.d.ts +98 -0
  7. package/dist/agent/action-dispatcher.d.ts.map +1 -0
  8. package/dist/agent/action-dispatcher.js +319 -0
  9. package/dist/agent/action-dispatcher.js.map +1 -0
  10. package/dist/agent/actions.d.ts +16 -1
  11. package/dist/agent/actions.d.ts.map +1 -1
  12. package/dist/agent/actions.js +5 -1
  13. package/dist/agent/actions.js.map +1 -1
  14. package/dist/agent/default-agent.d.ts +1 -1
  15. package/dist/agent/default-agent.d.ts.map +1 -1
  16. package/dist/agent/default-agent.js +30 -9
  17. package/dist/agent/default-agent.js.map +1 -1
  18. package/dist/agent/error.d.ts.map +1 -1
  19. package/dist/agent/error.js +1 -0
  20. package/dist/agent/error.js.map +1 -1
  21. package/dist/agent/executor.d.ts +33 -5
  22. package/dist/agent/executor.d.ts.map +1 -1
  23. package/dist/agent/executor.js.map +1 -1
  24. package/dist/agent/index.js +1 -1
  25. package/dist/agent/index.js.map +1 -1
  26. package/dist/agent/invocation.d.ts +4 -9
  27. package/dist/agent/invocation.d.ts.map +1 -1
  28. package/dist/agent/invocation.js +1 -6
  29. package/dist/agent/invocation.js.map +1 -1
  30. package/dist/agent/model/sdk.d.ts +1 -1
  31. package/dist/agent/model/sdk.js +1 -1
  32. package/dist/agent/observation-feed.d.ts +123 -0
  33. package/dist/agent/observation-feed.d.ts.map +1 -0
  34. package/dist/agent/observation-feed.js +281 -0
  35. package/dist/agent/observation-feed.js.map +1 -0
  36. package/dist/agent/observation.d.ts +14 -1
  37. package/dist/agent/observation.d.ts.map +1 -1
  38. package/dist/agent/observation.js +58 -2
  39. package/dist/agent/observation.js.map +1 -1
  40. package/dist/agent/operation-queue.d.ts +21 -0
  41. package/dist/agent/operation-queue.d.ts.map +1 -0
  42. package/dist/agent/operation-queue.js +27 -0
  43. package/dist/agent/operation-queue.js.map +1 -0
  44. package/dist/agent/phases.js +1 -1
  45. package/dist/agent/phases.js.map +1 -1
  46. package/dist/agent/pixels.d.ts +21 -0
  47. package/dist/agent/pixels.d.ts.map +1 -0
  48. package/dist/agent/pixels.js +85 -0
  49. package/dist/agent/pixels.js.map +1 -0
  50. package/dist/agent/point-tap.d.ts +52 -0
  51. package/dist/agent/point-tap.d.ts.map +1 -0
  52. package/dist/agent/point-tap.js +88 -0
  53. package/dist/agent/point-tap.js.map +1 -0
  54. package/dist/agent/primitives.d.ts +7 -1
  55. package/dist/agent/primitives.d.ts.map +1 -1
  56. package/dist/agent/primitives.js +99 -27
  57. package/dist/agent/primitives.js.map +1 -1
  58. package/dist/agent/replay.d.ts +8 -3
  59. package/dist/agent/replay.d.ts.map +1 -1
  60. package/dist/agent/replay.js +44 -15
  61. package/dist/agent/replay.js.map +1 -1
  62. package/dist/agent/screen-update.d.ts +50 -18
  63. package/dist/agent/screen-update.d.ts.map +1 -1
  64. package/dist/agent/screen-update.js +76 -94
  65. package/dist/agent/screen-update.js.map +1 -1
  66. package/dist/agent/secrets.d.ts.map +1 -1
  67. package/dist/agent/secrets.js +13 -9
  68. package/dist/agent/secrets.js.map +1 -1
  69. package/dist/agent/step-accounting.d.ts +106 -0
  70. package/dist/agent/step-accounting.d.ts.map +1 -0
  71. package/dist/agent/step-accounting.js +216 -0
  72. package/dist/agent/step-accounting.js.map +1 -0
  73. package/dist/agent/step-cache.d.ts.map +1 -1
  74. package/dist/agent/step-cache.js +2 -2
  75. package/dist/agent/step-cache.js.map +1 -1
  76. package/dist/agent/tool-loop.d.ts.map +1 -1
  77. package/dist/agent/tool-loop.js +9 -2
  78. package/dist/agent/tool-loop.js.map +1 -1
  79. package/dist/agent/transcript-compaction.d.ts +38 -0
  80. package/dist/agent/transcript-compaction.d.ts.map +1 -0
  81. package/dist/agent/transcript-compaction.js +165 -0
  82. package/dist/agent/transcript-compaction.js.map +1 -0
  83. package/dist/cache/recorder.d.ts.map +1 -1
  84. package/dist/cache/recorder.js +20 -0
  85. package/dist/cache/recorder.js.map +1 -1
  86. package/dist/cache/trace.d.ts +28 -1
  87. package/dist/cache/trace.d.ts.map +1 -1
  88. package/dist/cache/trace.js +44 -0
  89. package/dist/cache/trace.js.map +1 -1
  90. package/dist/cli/index.d.ts.map +1 -1
  91. package/dist/cli/index.js +55 -32
  92. package/dist/cli/index.js.map +1 -1
  93. package/dist/cli/init/engine-versions.json +1 -1
  94. package/dist/cli/init/engines.d.ts +29 -10
  95. package/dist/cli/init/engines.d.ts.map +1 -1
  96. package/dist/cli/init/engines.js +34 -12
  97. package/dist/cli/init/engines.js.map +1 -1
  98. package/dist/cli/init/gateways.js +3 -3
  99. package/dist/cli/init/mcp-config.js +1 -1
  100. package/dist/cli/init/mcp-config.js.map +1 -1
  101. package/dist/cli/init/scaffold.d.ts.map +1 -1
  102. package/dist/cli/init/scaffold.js +1 -3
  103. package/dist/cli/init/scaffold.js.map +1 -1
  104. package/dist/cli/init.d.ts.map +1 -1
  105. package/dist/cli/init.js +3 -2
  106. package/dist/cli/init.js.map +1 -1
  107. package/dist/collect/collect.d.ts +8 -3
  108. package/dist/collect/collect.d.ts.map +1 -1
  109. package/dist/collect/collect.js +29 -5
  110. package/dist/collect/collect.js.map +1 -1
  111. package/dist/collect/registry.d.ts +20 -5
  112. package/dist/collect/registry.d.ts.map +1 -1
  113. package/dist/collect/registry.js +139 -54
  114. package/dist/collect/registry.js.map +1 -1
  115. package/dist/collect/select.js +3 -1
  116. package/dist/collect/select.js.map +1 -1
  117. package/dist/config/agent.d.ts +1 -7
  118. package/dist/config/agent.d.ts.map +1 -1
  119. package/dist/config/agent.js +5 -8
  120. package/dist/config/agent.js.map +1 -1
  121. package/dist/config/app.d.ts +24 -2
  122. package/dist/config/app.d.ts.map +1 -1
  123. package/dist/config/app.js +82 -15
  124. package/dist/config/app.js.map +1 -1
  125. package/dist/config/diagnose.d.ts.map +1 -1
  126. package/dist/config/diagnose.js +2 -0
  127. package/dist/config/diagnose.js.map +1 -1
  128. package/dist/config/resolve.d.ts +26 -3
  129. package/dist/config/resolve.d.ts.map +1 -1
  130. package/dist/config/resolve.js +66 -23
  131. package/dist/config/resolve.js.map +1 -1
  132. package/dist/config/secrets.d.ts +89 -0
  133. package/dist/config/secrets.d.ts.map +1 -0
  134. package/dist/config/secrets.js +67 -0
  135. package/dist/config/secrets.js.map +1 -0
  136. package/dist/engine/contract.d.ts +17 -2
  137. package/dist/engine/contract.d.ts.map +1 -1
  138. package/dist/engine/contract.js.map +1 -1
  139. package/dist/engine/index.d.ts +18 -4
  140. package/dist/engine/index.d.ts.map +1 -1
  141. package/dist/engine/index.js +8 -0
  142. package/dist/engine/index.js.map +1 -1
  143. package/dist/engine/session.d.ts.map +1 -1
  144. package/dist/engine/session.js +3 -0
  145. package/dist/engine/session.js.map +1 -1
  146. package/dist/engine/surface.d.ts +6 -2
  147. package/dist/engine/surface.d.ts.map +1 -1
  148. package/dist/engine/surface.js.map +1 -1
  149. package/dist/expect/attempt.d.ts +15 -0
  150. package/dist/expect/attempt.d.ts.map +1 -0
  151. package/dist/expect/attempt.js +33 -0
  152. package/dist/expect/attempt.js.map +1 -0
  153. package/dist/expect/index.d.ts +7 -5
  154. package/dist/expect/index.d.ts.map +1 -1
  155. package/dist/expect/index.js +8 -1
  156. package/dist/expect/index.js.map +1 -1
  157. package/dist/expect/poll.d.ts +5 -0
  158. package/dist/expect/poll.d.ts.map +1 -0
  159. package/dist/expect/poll.js +118 -0
  160. package/dist/expect/poll.js.map +1 -0
  161. package/dist/expect/values.d.ts.map +1 -1
  162. package/dist/expect/values.js +6 -1
  163. package/dist/expect/values.js.map +1 -1
  164. package/dist/explore/body.d.ts.map +1 -1
  165. package/dist/explore/body.js +3 -1
  166. package/dist/explore/body.js.map +1 -1
  167. package/dist/explore/executor.js +16 -11
  168. package/dist/explore/executor.js.map +1 -1
  169. package/dist/explore/index.d.ts +3 -2
  170. package/dist/explore/index.d.ts.map +1 -1
  171. package/dist/explore/index.js +5 -5
  172. package/dist/explore/index.js.map +1 -1
  173. package/dist/explore/plan.d.ts.map +1 -1
  174. package/dist/explore/plan.js +16 -5
  175. package/dist/explore/plan.js.map +1 -1
  176. package/dist/explore/progress.d.ts +43 -0
  177. package/dist/explore/progress.d.ts.map +1 -0
  178. package/dist/explore/progress.js +9 -0
  179. package/dist/explore/progress.js.map +1 -0
  180. package/dist/explore/state.d.ts +13 -12
  181. package/dist/explore/state.d.ts.map +1 -1
  182. package/dist/explore/state.js +28 -11
  183. package/dist/explore/state.js.map +1 -1
  184. package/dist/index.d.ts +3 -1
  185. package/dist/index.d.ts.map +1 -1
  186. package/dist/index.js +4 -1
  187. package/dist/index.js.map +1 -1
  188. package/dist/internal/brands.d.ts +2 -0
  189. package/dist/internal/brands.d.ts.map +1 -1
  190. package/dist/internal/brands.js +2 -0
  191. package/dist/internal/brands.js.map +1 -1
  192. package/dist/internal/geometry.d.ts +13 -0
  193. package/dist/internal/geometry.d.ts.map +1 -0
  194. package/dist/internal/geometry.js +16 -0
  195. package/dist/internal/geometry.js.map +1 -0
  196. package/dist/internal/urls.d.ts +6 -0
  197. package/dist/internal/urls.d.ts.map +1 -1
  198. package/dist/internal/urls.js +28 -0
  199. package/dist/internal/urls.js.map +1 -1
  200. package/dist/locator/engine.d.ts.map +1 -1
  201. package/dist/locator/engine.js +1 -0
  202. package/dist/locator/engine.js.map +1 -1
  203. package/dist/mcp/catalog.d.ts +5 -4
  204. package/dist/mcp/catalog.d.ts.map +1 -1
  205. package/dist/mcp/catalog.js +5 -36
  206. package/dist/mcp/catalog.js.map +1 -1
  207. package/dist/mcp/server.js +1 -1
  208. package/dist/mcp/server.js.map +1 -1
  209. package/dist/mcp/session.d.ts +1 -1
  210. package/dist/mcp/session.d.ts.map +1 -1
  211. package/dist/mcp/session.js +12 -6
  212. package/dist/mcp/session.js.map +1 -1
  213. package/dist/report/builtin.d.ts +14 -0
  214. package/dist/report/builtin.d.ts.map +1 -0
  215. package/dist/report/builtin.js +22 -0
  216. package/dist/report/builtin.js.map +1 -0
  217. package/dist/report/explore-text.d.ts +17 -0
  218. package/dist/report/explore-text.d.ts.map +1 -0
  219. package/dist/report/explore-text.js +37 -0
  220. package/dist/report/explore-text.js.map +1 -0
  221. package/dist/report/format.d.ts +2 -0
  222. package/dist/report/format.d.ts.map +1 -1
  223. package/dist/report/format.js +1 -1
  224. package/dist/report/format.js.map +1 -1
  225. package/dist/report/junit.d.ts +2 -4
  226. package/dist/report/junit.d.ts.map +1 -1
  227. package/dist/report/junit.js +7 -40
  228. package/dist/report/junit.js.map +1 -1
  229. package/dist/report/list-explore.d.ts +109 -0
  230. package/dist/report/list-explore.d.ts.map +1 -0
  231. package/dist/report/list-explore.js +368 -0
  232. package/dist/report/list-explore.js.map +1 -0
  233. package/dist/report/list.d.ts +21 -0
  234. package/dist/report/list.d.ts.map +1 -1
  235. package/dist/report/list.js +79 -3
  236. package/dist/report/list.js.map +1 -1
  237. package/dist/report/markdown.d.ts +39 -0
  238. package/dist/report/markdown.d.ts.map +1 -0
  239. package/dist/report/markdown.js +426 -0
  240. package/dist/report/markdown.js.map +1 -0
  241. package/dist/report/outcome.d.ts +29 -0
  242. package/dist/report/outcome.d.ts.map +1 -0
  243. package/dist/report/outcome.js +36 -0
  244. package/dist/report/outcome.js.map +1 -0
  245. package/dist/report/running-tree.d.ts +7 -7
  246. package/dist/report/running-tree.d.ts.map +1 -1
  247. package/dist/report/running-tree.js +12 -13
  248. package/dist/report/running-tree.js.map +1 -1
  249. package/dist/report/write.d.ts +10 -1
  250. package/dist/report/write.d.ts.map +1 -1
  251. package/dist/report/write.js +22 -1
  252. package/dist/report/write.js.map +1 -1
  253. package/dist/run/app-ports.d.ts +17 -0
  254. package/dist/run/app-ports.d.ts.map +1 -0
  255. package/dist/run/app-ports.js +74 -0
  256. package/dist/run/app-ports.js.map +1 -0
  257. package/dist/run/events.d.ts +10 -5
  258. package/dist/run/events.d.ts.map +1 -1
  259. package/dist/run/events.js.map +1 -1
  260. package/dist/run/execute.d.ts.map +1 -1
  261. package/dist/run/execute.js +24 -7
  262. package/dist/run/execute.js.map +1 -1
  263. package/dist/run/extended-fixtures.d.ts +33 -0
  264. package/dist/run/extended-fixtures.d.ts.map +1 -0
  265. package/dist/run/extended-fixtures.js +91 -0
  266. package/dist/run/extended-fixtures.js.map +1 -0
  267. package/dist/run/fixtures.d.ts.map +1 -1
  268. package/dist/run/fixtures.js +39 -11
  269. package/dist/run/fixtures.js.map +1 -1
  270. package/dist/run/managed-process.d.ts +18 -0
  271. package/dist/run/managed-process.d.ts.map +1 -1
  272. package/dist/run/managed-process.js +101 -6
  273. package/dist/run/managed-process.js.map +1 -1
  274. package/dist/run/realm.d.ts +5 -4
  275. package/dist/run/realm.d.ts.map +1 -1
  276. package/dist/run/realm.js +8 -7
  277. package/dist/run/realm.js.map +1 -1
  278. package/dist/run/runner.d.ts +9 -3
  279. package/dist/run/runner.d.ts.map +1 -1
  280. package/dist/run/runner.js +15 -12
  281. package/dist/run/runner.js.map +1 -1
  282. package/dist/run/secrecy.d.ts +3 -3
  283. package/dist/run/secrecy.d.ts.map +1 -1
  284. package/dist/run/secrecy.js +4 -4
  285. package/dist/run/secrecy.js.map +1 -1
  286. package/dist/run/standalone.js +6 -6
  287. package/dist/run/standalone.js.map +1 -1
  288. package/dist/run/worker/entry.js +4 -3
  289. package/dist/run/worker/entry.js.map +1 -1
  290. package/dist/run/worker/protocol.d.ts +7 -1
  291. package/dist/run/worker/protocol.d.ts.map +1 -1
  292. package/dist/run/worker/protocol.js.map +1 -1
  293. package/dist/secrets.d.ts +21 -0
  294. package/dist/secrets.d.ts.map +1 -0
  295. package/dist/secrets.js +66 -0
  296. package/dist/secrets.js.map +1 -0
  297. package/dist/types.d.ts +90 -50
  298. package/dist/types.d.ts.map +1 -1
  299. package/package.json +6 -3
  300. package/skills/e2e/SKILL.md +42 -25
  301. package/skills/e2e/references/agent.md +80 -24
  302. package/skills/e2e/references/debugging.md +6 -5
  303. package/skills/e2e/references/explore.md +13 -7
  304. package/skills/e2e/references/mcp.md +4 -4
  305. package/skills/e2e/references/running.md +32 -21
  306. package/skills/e2e/references/setup.md +42 -16
  307. package/skills/e2e/references/writing-tests.md +32 -16
  308. package/dist/agent/model/router.d.ts +0 -36
  309. package/dist/agent/model/router.d.ts.map +0 -1
  310. package/dist/agent/model/router.js +0 -45
  311. package/dist/agent/model/router.js.map +0 -1
  312. package/dist/credentials.d.ts +0 -13
  313. package/dist/credentials.d.ts.map +0 -1
  314. package/dist/credentials.js +0 -51
  315. package/dist/credentials.js.map +0 -1
  316. package/dist/explore/reporter.d.ts +0 -11
  317. package/dist/explore/reporter.d.ts.map +0 -1
  318. package/dist/explore/reporter.js +0 -54
  319. package/dist/explore/reporter.js.map +0 -1
@@ -0,0 +1,426 @@
1
+ /**
2
+ * The report-1 document as one markdown page, laid out for a pull request:
3
+ * a headline with the counts and what the run spent, the run-level errors,
4
+ * one block per test that failed or was flaky with the step it went wrong
5
+ * at and the agent's last word, a table with one row per test file, and
6
+ * every test folded away under it, grouped by file. An `e2e explore` run
7
+ * renders its record instead: the goal, every finding with its evidence,
8
+ * and the assessment. The built-in `markdown` reporter writes the page as
9
+ * `summary.md` beside `report.json`; `@e2edev/github` posts it as the pull
10
+ * request comment.
11
+ *
12
+ * Everything a test or the agent wrote (titles, labels, error messages,
13
+ * findings) is untrusted text on its way into markdown a renderer trusts,
14
+ * so it is escaped and clipped, and the whole body never outgrows what
15
+ * GitHub accepts.
16
+ */
17
+ import path from 'node:path';
18
+ import { collapseText } from '../internal/text.js';
19
+ import { ENDED_TEXT, orderFindings, SEVERITY_WORDS, stepCountParts } from './explore-text.js';
20
+ import { ellipsize, formatCost, formatTokens, statusBucket, tally } from './format.js';
21
+ import { outcome } from './outcome.js';
22
+ import { fileReporter, toPosixPath } from './write.js';
23
+ /**
24
+ * GitHub rejects a comment body past 65536 characters. The page stays
25
+ * clear of it with room for what a poster prepends (a marker comment).
26
+ */
27
+ const MAX_BODY_CHARS = 60_000;
28
+ /** Reader caps, not size guards: past these the page says how many more there are. */
29
+ const MAX_FAILURE_BLOCKS = 30;
30
+ const MAX_FILE_ROWS = 200;
31
+ const MAX_RUN_ERRORS = 20;
32
+ const MAX_LISTED_TESTS = 400;
33
+ const MAX_FOOTER_TARGETS = 8;
34
+ const MAX_FINDINGS = 30;
35
+ const MAX_EVIDENCE_PATHS = 3;
36
+ /** Steps shown in a failure's timeline before the passed run collapses to a count. */
37
+ const MAX_TIMELINE_STEPS = 6;
38
+ /** Text widths, in code points. */
39
+ const MAX_CELL_CHARS = 240;
40
+ const MAX_PATH_CHARS = 200;
41
+ const MAX_TITLE_CHARS = 120;
42
+ const MAX_ID_CHARS = 64;
43
+ const MAX_LABEL_CHARS = 60;
44
+ /** Prose fields (a finding's expected and actual, the agent's explanation) get more room than a cell. */
45
+ const MAX_DETAIL_CHARS = 600;
46
+ const MAX_ASSESSMENT_CHARS = 2_000;
47
+ const MAX_GOAL_CHARS = 400;
48
+ const TRUNCATED_NOTE = '_Truncated to fit a pull request comment; the full report is in `report.json`._';
49
+ /**
50
+ * Text safe inside a table cell or a list item: one line, clipped by code
51
+ * point so an emoji at the cut survives whole, markdown that could open a
52
+ * construct escaped, angle brackets as entities so no HTML gets through, and
53
+ * the cell separator escaped. An underscore stays: inside a word GitHub
54
+ * never reads it as emphasis, and error codes are full of them.
55
+ */
56
+ function cell(text, max = MAX_CELL_CHARS) {
57
+ return ellipsize(collapseText(text), max)
58
+ .replace(/[\\`*[\]~|]/g, (char) => `\\${char}`)
59
+ .replaceAll('<', '&lt;')
60
+ .replaceAll('>', '&gt;');
61
+ }
62
+ /** A path or label inside backticks: only the backtick and the cell separator have to go. */
63
+ function code(text, max = MAX_CELL_CHARS) {
64
+ return `\`${ellipsize(collapseText(text), max).replaceAll('`', '').replaceAll('|', '\\|')}\``;
65
+ }
66
+ /**
67
+ * A URL inside a markdown link destination. The caller chose it, but a
68
+ * character that closes the destination or breaks it must not get through
69
+ * to the rendered page, so those are percent-encoded.
70
+ */
71
+ function href(url) {
72
+ return collapseText(url).replace(/[\s()<>]/g, (char) => `%${char.charCodeAt(0).toString(16).toUpperCase().padStart(2, '0')}`);
73
+ }
74
+ function link(text, url) {
75
+ return `[${text}](${href(url)})`;
76
+ }
77
+ function formatDuration(ms) {
78
+ if (ms < 1_000)
79
+ return `${Math.round(ms)}ms`;
80
+ if (ms < 60_000)
81
+ return `${(ms / 1_000).toFixed(1)}s`;
82
+ // Round to whole seconds first, so 119.5 s is 2m 0s and never 1m 60s.
83
+ const total = Math.round(ms / 1_000);
84
+ return `${Math.floor(total / 60)}m ${total % 60}s`;
85
+ }
86
+ function plural(count, noun) {
87
+ return `${count} ${noun}${count === 1 ? '' : 's'}`;
88
+ }
89
+ /** Screenshots first, then the recording, then the trace; the compiler fails when a kind is missing here. */
90
+ const KIND_RANK = { screenshot: 0, video: 1, trace: 2, download: 3, log: 4 };
91
+ const ICON = { failed: '🔴', flaky: '⚠️', skipped: '⏭️', passed: '🟢' };
92
+ /** Worst first: the order failures are listed, files are sorted, and a file's glyph is chosen in. */
93
+ const WORST_FIRST = ['failed', 'flaky', 'skipped', 'passed'];
94
+ /** The order counts read in: `1 failed, 1 flaky, 3 passed, 1 skipped`. */
95
+ const COUNT_ORDER = ['failed', 'flaky', 'passed', 'skipped'];
96
+ function worstBucket(results) {
97
+ const present = new Set(results.map((result) => statusBucket(result.status)));
98
+ return WORST_FIRST.find((key) => present.has(key)) ?? 'passed';
99
+ }
100
+ /** `1 failed, 3 passed`, zero counts left out. */
101
+ function countText(counts) {
102
+ return COUNT_ORDER.filter((key) => counts[key] > 0)
103
+ .map((key) => `${counts[key]} ${key}`)
104
+ .join(', ');
105
+ }
106
+ function headline(run) {
107
+ const summary = countText(tally(run.results)) || (run.errors.length > 0 ? 'no tests ran' : 'no tests selected');
108
+ return `### ${run.status === 'passed' ? ICON.passed : ICON.failed} e2e: ${summary}`;
109
+ }
110
+ /** The model calls an agent step made; the step's metrics are the source of truth. */
111
+ function modelCalls(step) {
112
+ return step.metrics?.modelCalls ?? 0;
113
+ }
114
+ /** What the agent did over a set of steps. */
115
+ function agentTotals(steps) {
116
+ const agent = steps.filter((step) => step.kind === 'agent');
117
+ return {
118
+ steps: agent.length,
119
+ replayed: agent.filter((step) => step.cache?.mode === 'self-finalized').length,
120
+ calls: agent.reduce((total, step) => total + modelCalls(step), 0),
121
+ };
122
+ }
123
+ /**
124
+ * `41 agent steps · 12 replayed from cache · 128.4k tokens (62% cached) · $0.31`,
125
+ * under the headline of a run that used the agent; a deterministic run has
126
+ * nothing to say here.
127
+ */
128
+ function spendLine(run, entries) {
129
+ const totals = agentTotals(entries.flatMap((entry) => entry.final.final.steps));
130
+ if (totals.steps === 0 && run.usage.modelTokens === 0)
131
+ return undefined;
132
+ const parts = [plural(totals.steps, 'agent step')];
133
+ if (totals.replayed > 0)
134
+ parts.push(`${totals.replayed} replayed from cache`);
135
+ if (totals.calls > 0)
136
+ parts.push(plural(totals.calls, 'model call'));
137
+ if (run.usage.modelTokens > 0) {
138
+ const cached = run.usage.modelCachedTokens ?? 0;
139
+ const share = cached === 0 ? '' : ` (${Math.round((cached / run.usage.modelTokens) * 100)}% cached)`;
140
+ parts.push(`${formatTokens(run.usage.modelTokens)} tokens${share}`);
141
+ }
142
+ if (run.usage.estimatedCostUsd !== undefined)
143
+ parts.push(formatCost(run.usage.estimatedCostUsd));
144
+ return parts.join(' · ');
145
+ }
146
+ function errorText(error) {
147
+ const phase = error.phase === undefined ? '' : ` (${collapseText(error.phase)})`;
148
+ return `**${cell(error.code, 128)}**${phase} ${cell(error.message)}`.trim();
149
+ }
150
+ /**
151
+ * Where the evidence is: linked to the run page when there is one, listed as
152
+ * paths under `artifactsDir` when the reader has the files, and named by
153
+ * kind otherwise. Paths are POSIX, as the report keeps them.
154
+ */
155
+ function evidence(artifacts, options) {
156
+ if (artifacts.length === 0)
157
+ return '';
158
+ const sorted = artifacts.toSorted((a, b) => KIND_RANK[a.kind] - KIND_RANK[b.kind]);
159
+ const named = [...new Set(sorted.map((artifact) => artifact.kind))].join(', ');
160
+ if (options.artifactsUrl !== undefined)
161
+ return link(named, options.artifactsUrl);
162
+ const dir = options.artifactsDir;
163
+ const files = dir === undefined ? [] : sorted.flatMap((artifact) => (artifact.path === undefined ? [] : [path.posix.join(dir, artifact.path)]));
164
+ if (files.length === 0)
165
+ return named;
166
+ const shown = files.slice(0, MAX_EVIDENCE_PATHS).map((file) => code(file));
167
+ if (files.length > shown.length)
168
+ shown.push(`and ${files.length - shown.length} more`);
169
+ return shown.join(', ');
170
+ }
171
+ // --- a test that did not pass ---
172
+ const STEP_GLYPH = { passed: '✓', failed: '✗', blocked: '✗', 'timed-out': '✗', cancelled: '–' };
173
+ const STEP_VERB = {
174
+ failed: 'failed',
175
+ blocked: 'was blocked',
176
+ 'timed-out': 'timed out',
177
+ cancelled: 'was cancelled',
178
+ };
179
+ /**
180
+ * The step a failure happened at, in one sentence: its position, its api and
181
+ * label, how long it ran, and for an agent step the model calls it spent and
182
+ * the agent's own explanation of what it saw.
183
+ */
184
+ function failedStepLine(steps) {
185
+ const index = steps.findIndex((step) => step.status !== 'passed');
186
+ const step = steps[index];
187
+ if (step === undefined || step.status === 'passed')
188
+ return undefined;
189
+ const calls = modelCalls(step);
190
+ const spent = calls === 0 ? '' : ` after ${plural(calls, 'model call')}`;
191
+ const explanation = step.explanation === undefined || step.explanation.trim() === '' ? '' : `: "${cell(step.explanation, MAX_DETAIL_CHARS)}"`;
192
+ return `Step ${index + 1} of ${steps.length}, ${code(step.api, MAX_ID_CHARS)} "${cell(step.label, MAX_LABEL_CHARS)}", ${STEP_VERB[step.status]}${spent} in ${formatDuration(step.durationMs)}${explanation}`;
193
+ }
194
+ /**
195
+ * `Steps: ✓ open the app › ✓ sign in › ✗ accept the invitation › 2 not run`:
196
+ * the attempt's timeline up to the failure, a long passed run collapsed to a
197
+ * count so the failing step stays in view.
198
+ */
199
+ function timelineLine(steps) {
200
+ if (steps.length < 2)
201
+ return undefined;
202
+ const failedAt = steps.findIndex((step) => step.status !== 'passed');
203
+ const end = failedAt === -1 ? steps.length : failedAt + 1;
204
+ const shown = steps.slice(0, end);
205
+ const collapse = shown.length > MAX_TIMELINE_STEPS ? shown.length - MAX_TIMELINE_STEPS + 1 : 0;
206
+ const parts = [
207
+ ...(collapse > 1 ? [`✓ ${plural(collapse, 'passed step')}`] : []),
208
+ ...(collapse > 1 ? shown.slice(collapse) : shown).map((step) => `${STEP_GLYPH[step.status]} ${cell(step.label, MAX_LABEL_CHARS)}`),
209
+ ...(steps.length > end ? [`${steps.length - end} not run`] : []),
210
+ ];
211
+ return `Steps: ${parts.join(' › ')}`;
212
+ }
213
+ /** `file (target)`, the target named only when the run has several. */
214
+ function fileLabel(file, target, manyTargets) {
215
+ return `${cell(file, MAX_PATH_CHARS)}${manyTargets ? ` (${cell(target, MAX_ID_CHARS)})` : ''}`;
216
+ }
217
+ /** `suite › title (target)`. */
218
+ function testName(result, manyTargets) {
219
+ const title = result.titlePath.map((part) => cell(part, MAX_TITLE_CHARS)).join(' › ');
220
+ return `${title}${manyTargets ? ` (${cell(result.targetId, MAX_ID_CHARS)})` : ''}`;
221
+ }
222
+ /** The location, linked to the commit when known, else in backticks. */
223
+ function location(result, options) {
224
+ const text = `${result.source.file}:${result.source.line}`;
225
+ return options.sourceUrl === undefined ? code(text) : link(cell(text), options.sourceUrl(result.source.file, result.source.line));
226
+ }
227
+ /**
228
+ * One block per test that failed or was flaky: what went wrong, at which
229
+ * step, what the agent said, the evidence, and the source line. A flaky
230
+ * test's story is its last failed attempt, not the retry that passed. Lines
231
+ * end in two spaces so GitHub keeps the breaks inside one paragraph.
232
+ */
233
+ function failureBlock({ result, final }, manyTargets, options) {
234
+ const kind = statusBucket(result.status);
235
+ const told = kind === 'flaky' ? (final.lastFailed ?? final.final) : final.final;
236
+ const lines = [`**${ICON[kind]} ${cell(result.file, MAX_PATH_CHARS)} › ${testName(result, manyTargets)}**`];
237
+ if (kind === 'flaky')
238
+ lines.push(`Passed after ${plural(final.failedAttempts, 'failed attempt')}.`);
239
+ if (told.error !== undefined)
240
+ lines.push(errorText(told.error));
241
+ const step = failedStepLine(told.steps);
242
+ if (step !== undefined)
243
+ lines.push(step);
244
+ const timeline = timelineLine(told.steps);
245
+ if (timeline !== undefined)
246
+ lines.push(timeline);
247
+ const where = evidence(final.artifacts, options);
248
+ lines.push(`${where === '' ? '' : `Evidence: ${where} · `}${location(result, options)}`);
249
+ return lines.join(' \n');
250
+ }
251
+ /** Results grouped by file and target, the worst file first, then by path. */
252
+ function fileGroups(entries) {
253
+ const groups = new Map();
254
+ for (const entry of entries) {
255
+ const byFile = groups.get(entry.result.targetId) ?? new Map();
256
+ byFile.set(entry.result.file, [...(byFile.get(entry.result.file) ?? []), entry]);
257
+ groups.set(entry.result.targetId, byFile);
258
+ }
259
+ const rows = [...groups].flatMap(([target, byFile]) => [...byFile].map(([file, grouped]) => ({ file, target, entries: grouped })));
260
+ const rank = (group) => WORST_FIRST.indexOf(worstBucket(group.entries.map((entry) => entry.result)));
261
+ return rows.toSorted((a, b) => rank(a) - rank(b) || a.file.localeCompare(b.file) || a.target.localeCompare(b.target));
262
+ }
263
+ function fileTable(groups, manyTargets) {
264
+ if (groups.length === 0)
265
+ return [];
266
+ const lines = ['| | File | Tests | Agent | Time |', '| --- | --- | --- | --- | --- |'];
267
+ for (const group of groups.slice(0, MAX_FILE_ROWS)) {
268
+ const results = group.entries.map((entry) => entry.result);
269
+ const totals = agentTotals(group.entries.flatMap((entry) => entry.final.final.steps));
270
+ const agent = totals.steps === 0 ? '' : `${plural(totals.steps, 'step')}${totals.calls > 0 ? ` · ${plural(totals.calls, 'call')}` : ''}`;
271
+ const time = formatDuration(group.entries.reduce((total, entry) => total + entry.final.durationMs, 0));
272
+ lines.push(`| ${ICON[worstBucket(results)]} | ${fileLabel(group.file, group.target, manyTargets)} | ${countText(tally(results))} | ${agent} | ${time} |`);
273
+ }
274
+ if (groups.length > MAX_FILE_ROWS)
275
+ lines.push(`| | and ${groups.length - MAX_FILE_ROWS} more files | | | |`);
276
+ return lines;
277
+ }
278
+ /** One line of the folded list: glyph, name, and how the test ended. */
279
+ function listedTest({ result, final }, manyTargets) {
280
+ const note = result.status === 'skipped'
281
+ ? `skipped: ${cell(result.skip?.reason ?? 'skipped')}`
282
+ : result.status === 'flaky'
283
+ ? `${formatDuration(final.durationMs)}, ${plural(final.failedAttempts, 'failed attempt')} first`
284
+ : formatDuration(final.durationMs);
285
+ return `- ${ICON[statusBucket(result.status)]} ${testName(result, manyTargets)} (${note})`;
286
+ }
287
+ /** Every test, grouped by file in the table's order, folded away; one block since a `<details>` cannot be cut halfway. */
288
+ function allTests(groups, total, manyTargets) {
289
+ if (total === 0)
290
+ return [];
291
+ let budget = MAX_LISTED_TESTS;
292
+ const blocks = [];
293
+ for (const group of groups) {
294
+ if (budget === 0)
295
+ break;
296
+ const shown = group.entries.slice(0, budget);
297
+ budget -= shown.length;
298
+ blocks.push([`**${fileLabel(group.file, group.target, manyTargets)}**`, ...shown.map((entry) => listedTest(entry, manyTargets))].join('\n'));
299
+ }
300
+ if (total > MAX_LISTED_TESTS)
301
+ blocks.push(`- and ${total - MAX_LISTED_TESTS} more`);
302
+ return [['<details>', `<summary>All ${plural(total, 'test')}</summary>`, '', blocks.join('\n\n'), '</details>'].join('\n')];
303
+ }
304
+ function footer(run, options) {
305
+ const duration = formatDuration(Date.parse(run.finishedAt) - Date.parse(run.startedAt));
306
+ const shown = run.targets.slice(0, MAX_FOOTER_TARGETS).map((target) => cell(target.id, MAX_ID_CHARS));
307
+ if (run.targets.length > shown.length)
308
+ shown.push(`and ${run.targets.length - shown.length} more`);
309
+ const targets = shown.length === 0 ? '' : ` (${shown.join(', ')})`;
310
+ return [
311
+ ...(options.artifactsUrl === undefined ? [] : [`Screenshots, traces, and recordings: ${link('run artifacts', options.artifactsUrl)}.`]),
312
+ `<sub>e2e ${cell(run.runner.version, MAX_ID_CHARS)} · ${duration} · ${plural(run.targets.length, 'target')}${targets}</sub>`,
313
+ ];
314
+ }
315
+ // --- the exploration record ---
316
+ function exploreHeadline(run, explore) {
317
+ const issues = explore.findings.filter((finding) => finding.kind === 'issue').length;
318
+ const warnings = explore.findings.length - issues;
319
+ const counts = [...(issues > 0 ? [plural(issues, 'issue')] : []), ...(warnings > 0 ? [plural(warnings, 'warning')] : [])];
320
+ const summary = counts.length > 0 ? counts.join(', ') : run.status === 'blocked' ? 'explored nothing' : run.status === 'passed' ? 'no findings' : 'did not finish';
321
+ return `### ${run.status === 'passed' ? ICON.passed : ICON.failed} e2e explore: ${summary}`;
322
+ }
323
+ /** `3 of 8 steps · 2 passed · 1 failed · the agent covered the goal`. */
324
+ function exploreSteps(explore) {
325
+ const counts = stepCountParts(explore.steps).map((part) => part.text);
326
+ return [`${explore.steps.length} of ${explore.budgets.maxSteps} steps`, ...counts, ENDED_TEXT[explore.ended]].join(' · ');
327
+ }
328
+ /**
329
+ * One finding as a list item: grade and title, where it was seen, what was
330
+ * expected against what the screen showed, the actions that reach it, and
331
+ * its screenshot.
332
+ */
333
+ function findingBlock(finding, position, artifacts, options) {
334
+ const where = [...(finding.path === undefined ? [] : [code(finding.path, MAX_TITLE_CHARS)]), ...(finding.step === undefined ? [] : [`step ${finding.step}`])];
335
+ const lines = [
336
+ `${position}. **${SEVERITY_WORDS[finding.severity]} ${finding.kind}** ${cell(finding.title)}${where.length === 0 ? '' : ` · ${where.join(' · ')}`}`,
337
+ ` Expected: ${cell(finding.expected, MAX_DETAIL_CHARS)}`,
338
+ ` Actual: ${cell(finding.actual, MAX_DETAIL_CHARS)}`,
339
+ ];
340
+ if (finding.reproduction.length > 0) {
341
+ lines.push(` Steps: ${finding.reproduction.map((action, index) => `${index + 1}. ${cell(action, MAX_PATH_CHARS)}`).join(' ')}`);
342
+ }
343
+ const screenshot = finding.artifactId === undefined ? undefined : artifacts.get(finding.artifactId);
344
+ if (screenshot !== undefined)
345
+ lines.push(` Evidence: ${evidence([screenshot], options)}`);
346
+ return lines.join(' \n');
347
+ }
348
+ /** The findings, issues before warnings and the most severe first, capped. */
349
+ function findingsSection(run, explore, options) {
350
+ if (explore.findings.length === 0)
351
+ return [];
352
+ const artifacts = new Map(run.results.flatMap((result) => result.attempts.flatMap((attempt) => attempt.artifacts)).map((artifact) => [artifact.id, artifact]));
353
+ const ordered = orderFindings(explore.findings);
354
+ const blocks = ordered.slice(0, MAX_FINDINGS).map((finding, index) => findingBlock(finding, index + 1, artifacts, options));
355
+ if (ordered.length > blocks.length)
356
+ blocks.push(`${blocks.length + 1}. and ${ordered.length - blocks.length} more`);
357
+ return ['**Findings**', '', ...blocks];
358
+ }
359
+ /**
360
+ * Whether a result's failure is the exploration's verdict, which the findings
361
+ * already express; only a failure that is not gets a block of its own.
362
+ */
363
+ function isVerdict(entry, explore) {
364
+ return entry.final.final.error?.code === 'ASSERTION_FAILED' && explore.findings.some((finding) => finding.kind === 'issue');
365
+ }
366
+ /**
367
+ * Greedy fit: keeps whole parts in order while they fit under the budget,
368
+ * then says what was cut. `parts` are lines or indivisible blocks, already
369
+ * separated by blank lines.
370
+ */
371
+ function fit(head, parts, tail) {
372
+ const render = (body) => `${[...head, ...body, ...tail].join('\n')}\n`;
373
+ let size = render([TRUNCATED_NOTE]).length;
374
+ const kept = [];
375
+ for (const part of parts) {
376
+ if (size + part.length + 1 > MAX_BODY_CHARS)
377
+ return render([...kept, TRUNCATED_NOTE]);
378
+ kept.push(part);
379
+ size += part.length + 1;
380
+ }
381
+ return render(kept);
382
+ }
383
+ /** Sections as one flat list of parts with a blank line between sections; empty sections vanish. */
384
+ function joinSections(sections) {
385
+ return sections.filter((section) => section.length > 0).flatMap((section, index) => (index === 0 ? [...section] : ['', ...section]));
386
+ }
387
+ /** Renders the run as one markdown page: a pull request comment body, a job summary, or `summary.md`. */
388
+ export function renderMarkdownReport(report, options = {}) {
389
+ const run = report.run;
390
+ const explore = run.explore;
391
+ const serialGroups = new Map(run.serialGroups.map((group) => [group.id, group]));
392
+ const entries = run.results.map((result) => ({ result, final: outcome(result, serialGroups) }));
393
+ const manyTargets = run.targets.length > 1;
394
+ const errors = run.errors.slice(0, MAX_RUN_ERRORS).map((error) => `> ${errorText(error)}`);
395
+ if (run.errors.length > errors.length)
396
+ errors.push(`> and ${run.errors.length - errors.length} more`);
397
+ // An exploration is the run's one test and its failure is the verdict the
398
+ // findings express, so that block gives way to them; any other failure stays.
399
+ const notPassed = entries
400
+ .filter(({ result }) => statusBucket(result.status) === 'failed' || statusBucket(result.status) === 'flaky')
401
+ .filter((entry) => explore === undefined || !isVerdict(entry, explore));
402
+ const failures = notPassed.slice(0, MAX_FAILURE_BLOCKS).map((entry) => [failureBlock(entry, manyTargets, options)]);
403
+ if (notPassed.length > failures.length)
404
+ failures.push([`and ${notPassed.length - failures.length} more did not pass`]);
405
+ const spend = spendLine(run, entries);
406
+ const head = [explore === undefined ? headline(run) : exploreHeadline(run, explore), ...(spend === undefined ? [] : [spend]), ''];
407
+ const groups = fileGroups(entries);
408
+ const sections = explore === undefined
409
+ ? [errors, ...failures, fileTable(groups, manyTargets), allTests(groups, run.results.length, manyTargets)]
410
+ : [
411
+ [`**Goal:** ${cell(explore.goal, MAX_GOAL_CHARS)} `, `**Steps:** ${exploreSteps(explore)}`],
412
+ errors,
413
+ ...failures,
414
+ findingsSection(run, explore, options),
415
+ explore.summary === undefined ? [] : ['**Assessment**', '', cell(explore.summary, MAX_ASSESSMENT_CHARS)],
416
+ ];
417
+ return fit(head, [...joinSections(sections), ''], footer(run, options));
418
+ }
419
+ /**
420
+ * The built-in `markdown` reporter: the report as one markdown page in
421
+ * `summary.md` beside `report.json`, with evidence listed as paths from the
422
+ * project root, for a reader with the checkout in front of it: a pull
423
+ * request description, a coding agent's handoff, a wiki page.
424
+ */
425
+ export const markdownReporter = fileReporter('markdown', 'Markdown', 'summary.md', (run) => renderMarkdownReport(run.report, { artifactsDir: toPosixPath(path.relative(run.projectRoot, run.artifactsRoot)) || '.' }));
426
+ //# sourceMappingURL=markdown.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"markdown.js","sourceRoot":"","sources":["../../src/report/markdown.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAEnD,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAC9F,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,YAAY,EAAE,YAAY,EAAE,KAAK,EAAiB,MAAM,aAAa,CAAC;AACtG,OAAO,EAAE,OAAO,EAAkC,MAAM,cAAc,CAAC;AACvE,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAoBvD;;;GAGG;AACH,MAAM,cAAc,GAAG,MAAM,CAAC;AAC9B,sFAAsF;AACtF,MAAM,kBAAkB,GAAG,EAAE,CAAC;AAC9B,MAAM,aAAa,GAAG,GAAG,CAAC;AAC1B,MAAM,cAAc,GAAG,EAAE,CAAC;AAC1B,MAAM,gBAAgB,GAAG,GAAG,CAAC;AAC7B,MAAM,kBAAkB,GAAG,CAAC,CAAC;AAC7B,MAAM,YAAY,GAAG,EAAE,CAAC;AACxB,MAAM,kBAAkB,GAAG,CAAC,CAAC;AAC7B,sFAAsF;AACtF,MAAM,kBAAkB,GAAG,CAAC,CAAC;AAC7B,mCAAmC;AACnC,MAAM,cAAc,GAAG,GAAG,CAAC;AAC3B,MAAM,cAAc,GAAG,GAAG,CAAC;AAC3B,MAAM,eAAe,GAAG,GAAG,CAAC;AAC5B,MAAM,YAAY,GAAG,EAAE,CAAC;AACxB,MAAM,eAAe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;;;;GAKG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,YAAY,CAAC,UAAU,EAAE,UAAU,EAAE,YAAY,EAAE,CAAC,GAAG,EAAE,EAAE,CACzF,oBAAoB,CAAC,GAAG,CAAC,MAAM,EAAE,EAAE,YAAY,EAAE,WAAW,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,WAAW,EAAE,GAAG,CAAC,aAAa,CAAC,CAAC,IAAI,GAAG,EAAE,CAAC,CAC1H,CAAC"}
@@ -0,0 +1,29 @@
1
+ /**
2
+ * What one result left behind, wherever the report keeps it. A serial
3
+ * member's result carries no attempts of its own: its error, duration, and
4
+ * steps live on the group's final attempt, keyed by test id. Every other
5
+ * result answers from its own attempts. The reporters that read a result
6
+ * (JUnit, markdown) share this one reading.
7
+ */
8
+ import type { ReportError, ReportResult, ReportSerialGroup, ReportStep } from './build.ts';
9
+ type ReportArtifact = ReportResult['attempts'][number]['artifacts'][number];
10
+ /** One attempt as a reporter reads it: what stopped it, and the steps up to there. */
11
+ export interface AttemptView {
12
+ readonly error: ReportError | undefined;
13
+ readonly steps: readonly ReportStep[];
14
+ }
15
+ export interface Outcome {
16
+ /** The final attempt's duration; for a serial member, the member's own. */
17
+ readonly durationMs: number;
18
+ /** The final attempt: the verdict of a failed test, the passing retry of a flaky one. */
19
+ readonly final: AttemptView;
20
+ /** The last attempt that did not pass before the final one, when there was one: what a flaky test hit. */
21
+ readonly lastFailed: AttemptView | undefined;
22
+ /** Attempts that did not pass before the final one; what a flaky pass cost. */
23
+ readonly failedAttempts: number;
24
+ /** The evidence over every attempt: a flaky test's failure screenshot belongs to the attempt that failed. */
25
+ readonly artifacts: readonly ReportArtifact[];
26
+ }
27
+ export declare function outcome(result: ReportResult, groups: ReadonlyMap<string, ReportSerialGroup>): Outcome;
28
+ export {};
29
+ //# sourceMappingURL=outcome.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"outcome.d.ts","sourceRoot":"","sources":["../../src/report/outcome.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE3F,KAAK,cAAc,GAAG,YAAY,CAAC,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC;AAE5E,sFAAsF;AACtF,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,KAAK,EAAE,WAAW,GAAG,SAAS,CAAC;IACxC,QAAQ,CAAC,KAAK,EAAE,SAAS,UAAU,EAAE,CAAC;CACvC;AAED,MAAM,WAAW,OAAO;IACtB,2EAA2E;IAC3E,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,yFAAyF;IACzF,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAC;IAC5B,0GAA0G;IAC1G,QAAQ,CAAC,UAAU,EAAE,WAAW,GAAG,SAAS,CAAC;IAC7C,+EAA+E;IAC/E,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,6GAA6G;IAC7G,QAAQ,CAAC,SAAS,EAAE,SAAS,cAAc,EAAE,CAAC;CAC/C;AAED,wBAAgB,OAAO,CAAC,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,WAAW,CAAC,MAAM,EAAE,iBAAiB,CAAC,GAAG,OAAO,CA6BrG"}
@@ -0,0 +1,36 @@
1
+ /**
2
+ * What one result left behind, wherever the report keeps it. A serial
3
+ * member's result carries no attempts of its own: its error, duration, and
4
+ * steps live on the group's final attempt, keyed by test id. Every other
5
+ * result answers from its own attempts. The reporters that read a result
6
+ * (JUnit, markdown) share this one reading.
7
+ */
8
+ export function outcome(result, groups) {
9
+ if (result.serialGroupId === undefined) {
10
+ const attempts = result.attempts;
11
+ const earlier = attempts.slice(0, -1);
12
+ const lastFailed = earlier.toReversed().find((attempt) => attempt.status !== 'passed');
13
+ return {
14
+ durationMs: attempts.at(-1)?.durationMs ?? 0,
15
+ final: { error: attempts.at(-1)?.error, steps: attempts.at(-1)?.steps ?? [] },
16
+ lastFailed: lastFailed === undefined ? undefined : { error: lastFailed.error, steps: lastFailed.steps },
17
+ failedAttempts: earlier.filter((attempt) => attempt.status !== 'passed').length,
18
+ artifacts: attempts.flatMap((attempt) => attempt.artifacts),
19
+ };
20
+ }
21
+ const attempts = groups.get(result.serialGroupId)?.attempts ?? [];
22
+ const earlier = attempts.slice(0, -1);
23
+ const memberOf = (attempt) => attempt?.members.find((candidate) => candidate.testId === result.testId);
24
+ const last = attempts.at(-1);
25
+ const member = memberOf(last);
26
+ const lastFailedAttempt = earlier.toReversed().find((attempt) => attempt.status !== 'passed');
27
+ const lastFailedMember = memberOf(lastFailedAttempt);
28
+ return {
29
+ durationMs: member?.durationMs ?? 0,
30
+ final: { error: member?.error ?? last?.error, steps: member?.steps ?? [] },
31
+ lastFailed: lastFailedAttempt === undefined ? undefined : { error: lastFailedMember?.error ?? lastFailedAttempt.error, steps: lastFailedMember?.steps ?? [] },
32
+ failedAttempts: earlier.filter((attempt) => attempt.status !== 'passed').length,
33
+ artifacts: attempts.flatMap((attempt) => attempt.artifacts),
34
+ };
35
+ }
36
+ //# sourceMappingURL=outcome.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"outcome.js","sourceRoot":"","sources":["../../src/report/outcome.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAyBH,MAAM,UAAU,OAAO,CAAC,MAAoB,EAAE,MAA8C;IAC1F,IAAI,MAAM,CAAC,aAAa,KAAK,SAAS,EAAE,CAAC;QACvC,MAAM,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;QACjC,MAAM,OAAO,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;QACtC,MAAM,UAAU,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,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G,OAAO,CAAC,UAAU,EAAE,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,KAAK,QAAQ,CAAC,CAAC;IAC9F,MAAM,gBAAgB,GAAG,QAAQ,CAAC,iBAAiB,CAAC,CAAC;IACrD,OAAO;QACL,UAAU,EAAE,MAAM,EAAE,UAAU,IAAI,CAAC;QACnC,KAAK,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,IAAI,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,IAAI,EAAE,EAAE;QAC1E,UAAU,EACR,iBAAiB,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,gBAAgB,EAAE,KAAK,IAAI,iBAAiB,CAAC,KAAK,EAAE,KAAK,EAAE,gBAAgB,EAAE,KAAK,IAAI,EAAE,EAAE;QACnJ,cAAc,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,KAAK,QAAQ,CAAC,CAAC,MAAM;QAC/E,SAAS,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,SAAS,CAAC;KAC5D,CAAC;AACJ,CAAC"}
@@ -36,12 +36,12 @@ export declare class RunningTree {
36
36
  * eye has a single moving number per running test.
37
37
  */
38
38
  private stepRows;
39
- /**
40
- * The work in flight: a spinner and a shimmering status word. Tool calls
41
- * take milliseconds and their turn is reported right after them, so between
42
- * events the model is the one working and the word is `Thinking`, except
43
- * while the trace cache replays recorded actions with no model in the loop.
44
- */
45
- private waitingRow;
46
39
  }
40
+ /**
41
+ * The work in flight: a spinner and a shimmering status word. Tool calls
42
+ * take milliseconds and their turn is reported right after them, so between
43
+ * events the model is the one working and the word is `Thinking`, except
44
+ * while the trace cache replays recorded actions with no model in the loop.
45
+ */
46
+ export declare function waitingRow(pc: Colors, now: number, word: string): string;
47
47
  //# sourceMappingURL=running-tree.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"running-tree.d.ts","sourceRoot":"","sources":["../../src/report/running-tree.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAiE,KAAK,MAAM,EAAE,MAAM,aAAa,CAAC;AACzG,OAAO,KAAK,EAAa,WAAW,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AA4D7E,qBAAa,WAAW;IAKpB,OAAO,CAAC,QAAQ,CAAC,EAAE;IACnB,OAAO,CAAC,QAAQ,CAAC,KAAK;IALxB,4EAA4E;IAC5E,OAAO,CAAC,YAAY,CAAiB;IAErC,YACmB,EAAE,EAAE,MAAM,EACV,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,EAChD;IAEJ;;;;;;;OAOG;IACH,MAAM,CACJ,OAAO,EAAE,SAAS,WAAW,EAAE,EAC/B,OAAO,EAAE,SAAS,MAAM,EAAE,EAC1B,GAAG,EAAE,MAAM,EACX,KAAK,CAAC,EAAE,aAAa,GACpB,MAAM,EAAE,CAmDV;IAED,2DAA2D;IAC3D,OAAO,CAAC,KAAK;IAIb;;;;OAIG;IACH,OAAO,CAAC,UAAU;IAalB;;;;;OAKG;IACH,OAAO,CAAC,QAAQ;IAehB;;;;;OAKG;IACH,OAAO,CAAC,UAAU;CAMnB"}
1
+ {"version":3,"file":"running-tree.d.ts","sourceRoot":"","sources":["../../src/report/running-tree.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAiE,KAAK,MAAM,EAAE,MAAM,aAAa,CAAC;AACzG,OAAO,KAAK,EAAa,WAAW,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AA4D7E,qBAAa,WAAW;IAKpB,OAAO,CAAC,QAAQ,CAAC,EAAE;IACnB,OAAO,CAAC,QAAQ,CAAC,KAAK;IALxB,4EAA4E;IAC5E,OAAO,CAAC,YAAY,CAAiB;IAErC,YACmB,EAAE,EAAE,MAAM,EACV,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,EAChD;IAEJ;;;;;;;OAOG;IACH,MAAM,CACJ,OAAO,EAAE,SAAS,WAAW,EAAE,EAC/B,OAAO,EAAE,SAAS,MAAM,EAAE,EAC1B,GAAG,EAAE,MAAM,EACX,KAAK,CAAC,EAAE,aAAa,GACpB,MAAM,EAAE,CAmDV;IAED,2DAA2D;IAC3D,OAAO,CAAC,KAAK;IAIb;;;;OAIG;IACH,OAAO,CAAC,UAAU;IAalB;;;;;OAKG;IACH,OAAO,CAAC,QAAQ;CAejB;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAIxE"}
@@ -168,20 +168,19 @@ export class RunningTree {
168
168
  for (const event of overflow > 0 ? current.events.slice(overflow) : current.events) {
169
169
  rows.push(` ${eventLine(pc, event)}`);
170
170
  }
171
- rows.push(` ${this.waitingRow(now, current.replaying)}`);
171
+ rows.push(` ${waitingRow(pc, now, current.replaying ? 'Replaying' : 'Thinking')}`);
172
172
  return rows.slice(0, budget);
173
173
  }
174
- /**
175
- * The work in flight: a spinner and a shimmering status word. Tool calls
176
- * take milliseconds and their turn is reported right after them, so between
177
- * events the model is the one working and the word is `Thinking`, except
178
- * while the trace cache replays recorded actions with no model in the loop.
179
- */
180
- waitingRow(now, replaying) {
181
- const { pc } = this;
182
- const frame = Math.floor(now / REPAINT_INTERVAL_MS);
183
- const spinner = pc.cyan(SPINNER_FRAMES[Math.floor(frame / SPINNER_HOLD_FRAMES) % SPINNER_FRAMES.length]);
184
- return `${spinner} ${shimmer(pc, replaying ? 'Replaying' : 'Thinking', frame)}`;
185
- }
174
+ }
175
+ /**
176
+ * The work in flight: a spinner and a shimmering status word. Tool calls
177
+ * take milliseconds and their turn is reported right after them, so between
178
+ * events the model is the one working and the word is `Thinking`, except
179
+ * while the trace cache replays recorded actions with no model in the loop.
180
+ */
181
+ export function waitingRow(pc, now, word) {
182
+ const frame = Math.floor(now / REPAINT_INTERVAL_MS);
183
+ const spinner = pc.cyan(SPINNER_FRAMES[Math.floor(frame / SPINNER_HOLD_FRAMES) % SPINNER_FRAMES.length]);
184
+ return `${spinner} ${shimmer(pc, word, frame)}`;
186
185
  }
187
186
  //# sourceMappingURL=running-tree.js.map