@sun-asterisk/sungen 3.3.0-alpha.1 → 3.3.0-alpha.10

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 (463) hide show
  1. package/dist/capabilities/discover.d.ts +4 -0
  2. package/dist/capabilities/discover.d.ts.map +1 -1
  3. package/dist/capabilities/discover.js +16 -2
  4. package/dist/capabilities/discover.js.map +1 -1
  5. package/dist/cli/case-triage-hint.d.ts +14 -0
  6. package/dist/cli/case-triage-hint.d.ts.map +1 -0
  7. package/dist/cli/case-triage-hint.js +23 -0
  8. package/dist/cli/case-triage-hint.js.map +1 -0
  9. package/dist/cli/commands/audit.js +1 -1
  10. package/dist/cli/commands/audit.js.map +1 -1
  11. package/dist/cli/commands/contract-derive-command.d.ts +4 -2
  12. package/dist/cli/commands/contract-derive-command.d.ts.map +1 -1
  13. package/dist/cli/commands/contract-derive-command.js +19 -5
  14. package/dist/cli/commands/contract-derive-command.js.map +1 -1
  15. package/dist/cli/commands/contract.d.ts +3 -0
  16. package/dist/cli/commands/contract.d.ts.map +1 -1
  17. package/dist/cli/commands/contract.js +40 -7
  18. package/dist/cli/commands/contract.js.map +1 -1
  19. package/dist/cli/commands/delivery.d.ts.map +1 -1
  20. package/dist/cli/commands/delivery.js +59 -18
  21. package/dist/cli/commands/delivery.js.map +1 -1
  22. package/dist/cli/commands/gate.d.ts.map +1 -1
  23. package/dist/cli/commands/gate.js +2 -1
  24. package/dist/cli/commands/gate.js.map +1 -1
  25. package/dist/cli/commands/generate.d.ts.map +1 -1
  26. package/dist/cli/commands/generate.js +14 -2
  27. package/dist/cli/commands/generate.js.map +1 -1
  28. package/dist/cli/commands/journey.d.ts.map +1 -1
  29. package/dist/cli/commands/journey.js +6 -4
  30. package/dist/cli/commands/journey.js.map +1 -1
  31. package/dist/cli/commands/next.d.ts +7 -2
  32. package/dist/cli/commands/next.d.ts.map +1 -1
  33. package/dist/cli/commands/next.js +41 -10
  34. package/dist/cli/commands/next.js.map +1 -1
  35. package/dist/cli/commands/triage.d.ts +2 -1
  36. package/dist/cli/commands/triage.d.ts.map +1 -1
  37. package/dist/cli/commands/triage.js +45 -3
  38. package/dist/cli/commands/triage.js.map +1 -1
  39. package/dist/cli/commands/update.d.ts.map +1 -1
  40. package/dist/cli/commands/update.js +6 -2
  41. package/dist/cli/commands/update.js.map +1 -1
  42. package/dist/cli/index.js +5 -1
  43. package/dist/cli/index.js.map +1 -1
  44. package/dist/cli/json-error-on-exit.d.ts +34 -0
  45. package/dist/cli/json-error-on-exit.d.ts.map +1 -0
  46. package/dist/cli/json-error-on-exit.js +63 -0
  47. package/dist/cli/json-error-on-exit.js.map +1 -0
  48. package/dist/cli/project-sungen-invocation.d.ts +13 -0
  49. package/dist/cli/project-sungen-invocation.d.ts.map +1 -0
  50. package/dist/cli/project-sungen-invocation.js +95 -0
  51. package/dist/cli/project-sungen-invocation.js.map +1 -0
  52. package/dist/cli/run-command-hints.d.ts +9 -0
  53. package/dist/cli/run-command-hints.d.ts.map +1 -0
  54. package/dist/cli/run-command-hints.js +84 -0
  55. package/dist/cli/run-command-hints.js.map +1 -0
  56. package/dist/cli/waiting-for-you-block.d.ts +18 -0
  57. package/dist/cli/waiting-for-you-block.d.ts.map +1 -0
  58. package/dist/cli/waiting-for-you-block.js +22 -0
  59. package/dist/cli/waiting-for-you-block.js.map +1 -0
  60. package/dist/contract/accept-opaque-steps.d.ts +3 -0
  61. package/dist/contract/accept-opaque-steps.d.ts.map +1 -0
  62. package/dist/contract/accept-opaque-steps.js +114 -0
  63. package/dist/contract/accept-opaque-steps.js.map +1 -0
  64. package/dist/contract/approve-contract.d.ts +8 -1
  65. package/dist/contract/approve-contract.d.ts.map +1 -1
  66. package/dist/contract/approve-contract.js +6 -0
  67. package/dist/contract/approve-contract.js.map +1 -1
  68. package/dist/contract/build-contract-verdict.js +2 -2
  69. package/dist/contract/build-contract-verdict.js.map +1 -1
  70. package/dist/contract/build-trace-conformance.d.ts +5 -1
  71. package/dist/contract/build-trace-conformance.d.ts.map +1 -1
  72. package/dist/contract/build-trace-conformance.js +12 -14
  73. package/dist/contract/build-trace-conformance.js.map +1 -1
  74. package/dist/contract/classify-contract-change.d.ts +3 -2
  75. package/dist/contract/classify-contract-change.d.ts.map +1 -1
  76. package/dist/contract/classify-contract-change.js.map +1 -1
  77. package/dist/contract/classify-trace-conformance.d.ts +18 -3
  78. package/dist/contract/classify-trace-conformance.d.ts.map +1 -1
  79. package/dist/contract/classify-trace-conformance.js +64 -17
  80. package/dist/contract/classify-trace-conformance.js.map +1 -1
  81. package/dist/contract/contract-schema.d.ts +21 -0
  82. package/dist/contract/contract-schema.d.ts.map +1 -1
  83. package/dist/contract/contract-schema.js +25 -3
  84. package/dist/contract/contract-schema.js.map +1 -1
  85. package/dist/contract/contracts-lock-file.d.ts.map +1 -1
  86. package/dist/contract/contracts-lock-file.js +1 -0
  87. package/dist/contract/contracts-lock-file.js.map +1 -1
  88. package/dist/contract/derive-free-feature.d.ts +19 -0
  89. package/dist/contract/derive-free-feature.d.ts.map +1 -1
  90. package/dist/contract/derive-free-feature.js +40 -2
  91. package/dist/contract/derive-free-feature.js.map +1 -1
  92. package/dist/contract/project-contract-blockers.d.ts.map +1 -1
  93. package/dist/contract/project-contract-blockers.js +4 -2
  94. package/dist/contract/project-contract-blockers.js.map +1 -1
  95. package/dist/contract/record-contract-approval.d.ts +16 -1
  96. package/dist/contract/record-contract-approval.d.ts.map +1 -1
  97. package/dist/contract/record-contract-approval.js +29 -1
  98. package/dist/contract/record-contract-approval.js.map +1 -1
  99. package/dist/contract/render-free-gherkin.d.ts +2 -0
  100. package/dist/contract/render-free-gherkin.d.ts.map +1 -1
  101. package/dist/contract/render-free-gherkin.js +6 -0
  102. package/dist/contract/render-free-gherkin.js.map +1 -1
  103. package/dist/contract/resolve-unit-trace-identities.d.ts +12 -0
  104. package/dist/contract/resolve-unit-trace-identities.d.ts.map +1 -1
  105. package/dist/contract/resolve-unit-trace-identities.js +33 -49
  106. package/dist/contract/resolve-unit-trace-identities.js.map +1 -1
  107. package/dist/contract/trace/collect-trace-evidence.d.ts +16 -5
  108. package/dist/contract/trace/collect-trace-evidence.d.ts.map +1 -1
  109. package/dist/contract/trace/collect-trace-evidence.js +101 -43
  110. package/dist/contract/trace/collect-trace-evidence.js.map +1 -1
  111. package/dist/contract/trace/read-file-once.d.ts +20 -0
  112. package/dist/contract/trace/read-file-once.d.ts.map +1 -0
  113. package/dist/contract/trace/read-file-once.js +135 -0
  114. package/dist/contract/trace/read-file-once.js.map +1 -0
  115. package/dist/contract/trace/scenario-id-claims.d.ts +11 -0
  116. package/dist/contract/trace/scenario-id-claims.d.ts.map +1 -0
  117. package/dist/contract/trace/scenario-id-claims.js +89 -0
  118. package/dist/contract/trace/scenario-id-claims.js.map +1 -0
  119. package/dist/contract/trace/select-final-attempt.d.ts +4 -2
  120. package/dist/contract/trace/select-final-attempt.d.ts.map +1 -1
  121. package/dist/contract/trace/select-final-attempt.js +7 -4
  122. package/dist/contract/trace/select-final-attempt.js.map +1 -1
  123. package/dist/contract/trace/test-step-join.d.ts +3 -3
  124. package/dist/contract/trace/test-step-join.d.ts.map +1 -1
  125. package/dist/contract/trace/test-step-join.js +2 -2
  126. package/dist/contract/trace/test-step-join.js.map +1 -1
  127. package/dist/contract/trace/trace-binding.d.ts +3 -2
  128. package/dist/contract/trace/trace-binding.d.ts.map +1 -1
  129. package/dist/contract/trace/trace-binding.js +6 -3
  130. package/dist/contract/trace/trace-binding.js.map +1 -1
  131. package/dist/contract/trace/trace-file-reader.d.ts +14 -2
  132. package/dist/contract/trace/trace-file-reader.d.ts.map +1 -1
  133. package/dist/contract/trace/trace-file-reader.js +27 -45
  134. package/dist/contract/trace/trace-file-reader.js.map +1 -1
  135. package/dist/contract/trace/trace-freshness.d.ts +27 -0
  136. package/dist/contract/trace/trace-freshness.d.ts.map +1 -0
  137. package/dist/contract/trace/trace-freshness.js +146 -0
  138. package/dist/contract/trace/trace-freshness.js.map +1 -0
  139. package/dist/contract/trace/trace-identity-resolution.d.ts +2 -0
  140. package/dist/contract/trace/trace-identity-resolution.d.ts.map +1 -1
  141. package/dist/contract/trace/trace-identity-resolution.js +6 -3
  142. package/dist/contract/trace/trace-identity-resolution.js.map +1 -1
  143. package/dist/contract/trace/trace-run-record.d.ts +8 -3
  144. package/dist/contract/trace/trace-run-record.d.ts.map +1 -1
  145. package/dist/contract/trace/trace-run-record.js +42 -22
  146. package/dist/contract/trace/trace-run-record.js.map +1 -1
  147. package/dist/contract/trace/trace-steps.js +1 -1
  148. package/dist/contract/trace/trace-steps.js.map +1 -1
  149. package/dist/contract/trace/trace-zip-limits.d.ts +5 -1
  150. package/dist/contract/trace/trace-zip-limits.d.ts.map +1 -1
  151. package/dist/contract/trace/trace-zip-limits.js +6 -2
  152. package/dist/contract/trace/trace-zip-limits.js.map +1 -1
  153. package/dist/contract/verify-approval-decisions.d.ts.map +1 -1
  154. package/dist/contract/verify-approval-decisions.js +9 -4
  155. package/dist/contract/verify-approval-decisions.js.map +1 -1
  156. package/dist/decisions/confirmed-decision-commands.d.ts +11 -0
  157. package/dist/decisions/confirmed-decision-commands.d.ts.map +1 -1
  158. package/dist/decisions/confirmed-decision-commands.js +21 -3
  159. package/dist/decisions/confirmed-decision-commands.js.map +1 -1
  160. package/dist/decisions/decision-schema.d.ts +2 -1
  161. package/dist/decisions/decision-schema.d.ts.map +1 -1
  162. package/dist/decisions/decision-schema.js +2 -1
  163. package/dist/decisions/decision-schema.js.map +1 -1
  164. package/dist/decisions/git-head-trust.d.ts +12 -0
  165. package/dist/decisions/git-head-trust.d.ts.map +1 -1
  166. package/dist/decisions/git-head-trust.js +52 -0
  167. package/dist/decisions/git-head-trust.js.map +1 -1
  168. package/dist/decisions/human-confirmation.d.ts +2 -0
  169. package/dist/decisions/human-confirmation.d.ts.map +1 -1
  170. package/dist/decisions/human-confirmation.js +6 -0
  171. package/dist/decisions/human-confirmation.js.map +1 -1
  172. package/dist/decisions/legacy-waiver-migration.d.ts +8 -1
  173. package/dist/decisions/legacy-waiver-migration.d.ts.map +1 -1
  174. package/dist/decisions/legacy-waiver-migration.js +13 -4
  175. package/dist/decisions/legacy-waiver-migration.js.map +1 -1
  176. package/dist/exporters/csv-exporter.d.ts +11 -2
  177. package/dist/exporters/csv-exporter.d.ts.map +1 -1
  178. package/dist/exporters/csv-exporter.js +8 -4
  179. package/dist/exporters/csv-exporter.js.map +1 -1
  180. package/dist/exporters/matrix/export.d.ts +6 -1
  181. package/dist/exporters/matrix/export.d.ts.map +1 -1
  182. package/dist/exporters/matrix/export.js +11 -4
  183. package/dist/exporters/matrix/export.js.map +1 -1
  184. package/dist/exporters/matrix/xlsx-cells.js +1 -1
  185. package/dist/exporters/matrix/xlsx-cells.js.map +1 -1
  186. package/dist/exporters/xlsx-exporter.d.ts +3 -2
  187. package/dist/exporters/xlsx-exporter.d.ts.map +1 -1
  188. package/dist/exporters/xlsx-exporter.js +4 -4
  189. package/dist/exporters/xlsx-exporter.js.map +1 -1
  190. package/dist/graph/board-human-actions.d.ts +5 -0
  191. package/dist/graph/board-human-actions.d.ts.map +1 -0
  192. package/dist/graph/board-human-actions.js +83 -0
  193. package/dist/graph/board-human-actions.js.map +1 -0
  194. package/dist/graph/evaluate-graph.d.ts +21 -1
  195. package/dist/graph/evaluate-graph.d.ts.map +1 -1
  196. package/dist/graph/evaluate-graph.js +37 -9
  197. package/dist/graph/evaluate-graph.js.map +1 -1
  198. package/dist/graph/human-action.d.ts +21 -0
  199. package/dist/graph/human-action.d.ts.map +1 -0
  200. package/dist/graph/human-action.js +3 -0
  201. package/dist/graph/human-action.js.map +1 -0
  202. package/dist/graph/manual-triage-decisions.d.ts +19 -0
  203. package/dist/graph/manual-triage-decisions.d.ts.map +1 -0
  204. package/dist/graph/manual-triage-decisions.js +53 -0
  205. package/dist/graph/manual-triage-decisions.js.map +1 -0
  206. package/dist/graph/node-decl.d.ts +16 -0
  207. package/dist/graph/node-decl.d.ts.map +1 -1
  208. package/dist/graph/node-decl.js +4 -1
  209. package/dist/graph/node-decl.js.map +1 -1
  210. package/dist/graph/nodes/test-case-contract-nodes.d.ts +3 -1
  211. package/dist/graph/nodes/test-case-contract-nodes.d.ts.map +1 -1
  212. package/dist/graph/nodes/test-case-contract-nodes.js +22 -6
  213. package/dist/graph/nodes/test-case-contract-nodes.js.map +1 -1
  214. package/dist/graph/nodes/test-case-nodes.d.ts +3 -0
  215. package/dist/graph/nodes/test-case-nodes.d.ts.map +1 -1
  216. package/dist/graph/nodes/test-case-nodes.js +33 -4
  217. package/dist/graph/nodes/test-case-nodes.js.map +1 -1
  218. package/dist/graph/nodes/unit-audit-nodes.d.ts.map +1 -1
  219. package/dist/graph/nodes/unit-audit-nodes.js +1 -0
  220. package/dist/graph/nodes/unit-audit-nodes.js.map +1 -1
  221. package/dist/graph/nodes/unit-contract-node.d.ts +2 -1
  222. package/dist/graph/nodes/unit-contract-node.d.ts.map +1 -1
  223. package/dist/graph/nodes/unit-contract-node.js +16 -1
  224. package/dist/graph/nodes/unit-contract-node.js.map +1 -1
  225. package/dist/graph/nodes/unit-design-nodes.d.ts.map +1 -1
  226. package/dist/graph/nodes/unit-design-nodes.js +2 -1
  227. package/dist/graph/nodes/unit-design-nodes.js.map +1 -1
  228. package/dist/graph/test-case-results.d.ts +1 -0
  229. package/dist/graph/test-case-results.d.ts.map +1 -1
  230. package/dist/graph/test-case-results.js +27 -3
  231. package/dist/graph/test-case-results.js.map +1 -1
  232. package/dist/graph/test-case-satisfied.d.ts +5 -4
  233. package/dist/graph/test-case-satisfied.d.ts.map +1 -1
  234. package/dist/graph/test-case-satisfied.js +4 -0
  235. package/dist/graph/test-case-satisfied.js.map +1 -1
  236. package/dist/graph/test-case-state-shape.d.ts +7 -1
  237. package/dist/graph/test-case-state-shape.d.ts.map +1 -1
  238. package/dist/graph/unit-artifact-probes.d.ts.map +1 -1
  239. package/dist/graph/unit-artifact-probes.js +3 -1
  240. package/dist/graph/unit-artifact-probes.js.map +1 -1
  241. package/dist/graph/unit-results-freshness.d.ts +29 -0
  242. package/dist/graph/unit-results-freshness.d.ts.map +1 -0
  243. package/dist/graph/unit-results-freshness.js +213 -0
  244. package/dist/graph/unit-results-freshness.js.map +1 -0
  245. package/dist/harness/audit.d.ts +3 -2
  246. package/dist/harness/audit.d.ts.map +1 -1
  247. package/dist/harness/audit.js +4 -17
  248. package/dist/harness/audit.js.map +1 -1
  249. package/dist/harness/catalog/gate-rules.yaml +3 -3
  250. package/dist/harness/defect-draft.d.ts.map +1 -1
  251. package/dist/harness/defect-draft.js +12 -2
  252. package/dist/harness/defect-draft.js.map +1 -1
  253. package/dist/harness/defects.d.ts +14 -0
  254. package/dist/harness/defects.d.ts.map +1 -1
  255. package/dist/harness/defects.js +14 -10
  256. package/dist/harness/defects.js.map +1 -1
  257. package/dist/harness/flow-check.d.ts +9 -0
  258. package/dist/harness/flow-check.d.ts.map +1 -1
  259. package/dist/harness/flow-check.js +11 -0
  260. package/dist/harness/flow-check.js.map +1 -1
  261. package/dist/harness/gates/audit-gate-verdict.d.ts.map +1 -1
  262. package/dist/harness/gates/audit-gate-verdict.js +2 -1
  263. package/dist/harness/gates/audit-gate-verdict.js.map +1 -1
  264. package/dist/harness/gates/audit-input-hash.d.ts +2 -0
  265. package/dist/harness/gates/audit-input-hash.d.ts.map +1 -1
  266. package/dist/harness/gates/audit-input-hash.js +30 -2
  267. package/dist/harness/gates/audit-input-hash.js.map +1 -1
  268. package/dist/harness/gates/audit-report-verification.d.ts +17 -6
  269. package/dist/harness/gates/audit-report-verification.d.ts.map +1 -1
  270. package/dist/harness/gates/audit-report-verification.js +55 -21
  271. package/dist/harness/gates/audit-report-verification.js.map +1 -1
  272. package/dist/harness/gates/delivery-checklist.d.ts +3 -0
  273. package/dist/harness/gates/delivery-checklist.d.ts.map +1 -1
  274. package/dist/harness/gates/delivery-checklist.js +39 -6
  275. package/dist/harness/gates/delivery-checklist.js.map +1 -1
  276. package/dist/harness/gates/delivery-decision-gate.d.ts +4 -0
  277. package/dist/harness/gates/delivery-decision-gate.d.ts.map +1 -1
  278. package/dist/harness/gates/delivery-decision-gate.js +26 -1
  279. package/dist/harness/gates/delivery-decision-gate.js.map +1 -1
  280. package/dist/harness/gates/delivery-decision-step.d.ts +4 -1
  281. package/dist/harness/gates/delivery-decision-step.d.ts.map +1 -1
  282. package/dist/harness/gates/delivery-decision-step.js +17 -2
  283. package/dist/harness/gates/delivery-decision-step.js.map +1 -1
  284. package/dist/harness/gates/in-run-decision-check.d.ts.map +1 -1
  285. package/dist/harness/gates/in-run-decision-check.js +40 -12
  286. package/dist/harness/gates/in-run-decision-check.js.map +1 -1
  287. package/dist/harness/gates/migrated-waiver-import-bounds.d.ts +13 -0
  288. package/dist/harness/gates/migrated-waiver-import-bounds.d.ts.map +1 -0
  289. package/dist/harness/gates/migrated-waiver-import-bounds.js +141 -0
  290. package/dist/harness/gates/migrated-waiver-import-bounds.js.map +1 -0
  291. package/dist/harness/gates/migrated-waiver-review.d.ts +14 -4
  292. package/dist/harness/gates/migrated-waiver-review.d.ts.map +1 -1
  293. package/dist/harness/gates/migrated-waiver-review.js +78 -80
  294. package/dist/harness/gates/migrated-waiver-review.js.map +1 -1
  295. package/dist/harness/journey.d.ts +40 -0
  296. package/dist/harness/journey.d.ts.map +1 -1
  297. package/dist/harness/journey.js +155 -22
  298. package/dist/harness/journey.js.map +1 -1
  299. package/dist/harness/next-step.d.ts +19 -0
  300. package/dist/harness/next-step.d.ts.map +1 -1
  301. package/dist/harness/next-step.js +21 -0
  302. package/dist/harness/next-step.js.map +1 -1
  303. package/dist/harness/provenance.d.ts +29 -0
  304. package/dist/harness/provenance.d.ts.map +1 -1
  305. package/dist/harness/provenance.js +109 -9
  306. package/dist/harness/provenance.js.map +1 -1
  307. package/dist/harness/triage-manual-classification.d.ts +32 -0
  308. package/dist/harness/triage-manual-classification.d.ts.map +1 -0
  309. package/dist/harness/triage-manual-classification.js +56 -0
  310. package/dist/harness/triage-manual-classification.js.map +1 -0
  311. package/dist/harness/unit-paths.d.ts +8 -0
  312. package/dist/harness/unit-paths.d.ts.map +1 -1
  313. package/dist/harness/unit-paths.js +23 -1
  314. package/dist/harness/unit-paths.js.map +1 -1
  315. package/dist/hooks/bash-read-only-segment.d.ts +9 -0
  316. package/dist/hooks/bash-read-only-segment.d.ts.map +1 -0
  317. package/dist/hooks/bash-read-only-segment.js +168 -0
  318. package/dist/hooks/bash-read-only-segment.js.map +1 -0
  319. package/dist/hooks/bash-write-targets.d.ts +12 -2
  320. package/dist/hooks/bash-write-targets.d.ts.map +1 -1
  321. package/dist/hooks/bash-write-targets.js +122 -29
  322. package/dist/hooks/bash-write-targets.js.map +1 -1
  323. package/dist/hooks/guard-protected-paths.d.ts +4 -0
  324. package/dist/hooks/guard-protected-paths.d.ts.map +1 -1
  325. package/dist/hooks/guard-protected-paths.js +13 -3
  326. package/dist/hooks/guard-protected-paths.js.map +1 -1
  327. package/dist/hooks/guard-rules.d.ts +0 -17
  328. package/dist/hooks/guard-rules.d.ts.map +1 -1
  329. package/dist/hooks/guard-rules.js +79 -10
  330. package/dist/hooks/guard-rules.js.map +1 -1
  331. package/dist/hooks/guard-tty-spoof-rule.d.ts +3 -1
  332. package/dist/hooks/guard-tty-spoof-rule.d.ts.map +1 -1
  333. package/dist/hooks/guard-tty-spoof-rule.js +3 -2
  334. package/dist/hooks/guard-tty-spoof-rule.js.map +1 -1
  335. package/dist/hooks/hand-back-core.d.ts +9 -4
  336. package/dist/hooks/hand-back-core.d.ts.map +1 -1
  337. package/dist/hooks/hand-back-core.js +24 -11
  338. package/dist/hooks/hand-back-core.js.map +1 -1
  339. package/dist/hooks/session-start-unit-state-hook.d.ts +2 -1
  340. package/dist/hooks/session-start-unit-state-hook.d.ts.map +1 -1
  341. package/dist/hooks/session-start-unit-state-hook.js +9 -4
  342. package/dist/hooks/session-start-unit-state-hook.js.map +1 -1
  343. package/dist/hooks/stop-next-step-hook.d.ts.map +1 -1
  344. package/dist/hooks/stop-next-step-hook.js +1 -0
  345. package/dist/hooks/stop-next-step-hook.js.map +1 -1
  346. package/dist/orchestrator/assets-drift.d.ts +5 -0
  347. package/dist/orchestrator/assets-drift.d.ts.map +1 -1
  348. package/dist/orchestrator/assets-drift.js +12 -3
  349. package/dist/orchestrator/assets-drift.js.map +1 -1
  350. package/dist/orchestrator/project-initializer.d.ts.map +1 -1
  351. package/dist/orchestrator/project-initializer.js +1 -0
  352. package/dist/orchestrator/project-initializer.js.map +1 -1
  353. package/dist/orchestrator/templates/ai-src/commands/create-test.md +6 -3
  354. package/dist/orchestrator/templates/ai-src/commands/delivery.md +2 -0
  355. package/dist/orchestrator/templates/ai-src/commands/review.md +2 -0
  356. package/dist/orchestrator/templates/ai-src/commands/run-test.md +1 -1
  357. package/dist/orchestrator/templates/ai-src/partials/waiting-for-you.claude.md +11 -0
  358. package/dist/orchestrator/templates/ai-src/partials/waiting-for-you.codex.md +11 -0
  359. package/dist/orchestrator/templates/ai-src/partials/waiting-for-you.copilot.md +11 -0
  360. package/package.json +3 -3
  361. package/src/capabilities/discover.ts +15 -2
  362. package/src/cli/case-triage-hint.ts +31 -0
  363. package/src/cli/commands/audit.ts +1 -1
  364. package/src/cli/commands/contract-derive-command.ts +20 -8
  365. package/src/cli/commands/contract.ts +41 -7
  366. package/src/cli/commands/delivery.ts +56 -18
  367. package/src/cli/commands/gate.ts +2 -1
  368. package/src/cli/commands/generate.ts +13 -2
  369. package/src/cli/commands/journey.ts +8 -6
  370. package/src/cli/commands/next.ts +41 -12
  371. package/src/cli/commands/triage.ts +41 -3
  372. package/src/cli/commands/update.ts +6 -2
  373. package/src/cli/index.ts +5 -1
  374. package/src/cli/json-error-on-exit.ts +72 -0
  375. package/src/cli/project-sungen-invocation.ts +59 -0
  376. package/src/cli/run-command-hints.ts +47 -0
  377. package/src/cli/waiting-for-you-block.ts +27 -0
  378. package/src/contract/accept-opaque-steps.ts +114 -0
  379. package/src/contract/approve-contract.ts +10 -3
  380. package/src/contract/build-contract-verdict.ts +2 -2
  381. package/src/contract/build-trace-conformance.ts +11 -8
  382. package/src/contract/classify-contract-change.ts +3 -3
  383. package/src/contract/classify-trace-conformance.ts +76 -22
  384. package/src/contract/contract-schema.ts +31 -2
  385. package/src/contract/contracts-lock-file.ts +1 -0
  386. package/src/contract/derive-free-feature.ts +46 -3
  387. package/src/contract/project-contract-blockers.ts +4 -2
  388. package/src/contract/record-contract-approval.ts +41 -1
  389. package/src/contract/render-free-gherkin.ts +5 -0
  390. package/src/contract/resolve-unit-trace-identities.ts +35 -12
  391. package/src/contract/trace/collect-trace-evidence.ts +105 -36
  392. package/src/contract/trace/read-file-once.ts +95 -0
  393. package/src/contract/trace/scenario-id-claims.ts +60 -0
  394. package/src/contract/trace/select-final-attempt.ts +12 -5
  395. package/src/contract/trace/test-step-join.ts +6 -5
  396. package/src/contract/trace/trace-binding.ts +7 -4
  397. package/src/contract/trace/trace-file-reader.ts +34 -13
  398. package/src/contract/trace/trace-freshness.ts +110 -0
  399. package/src/contract/trace/trace-identity-resolution.ts +7 -4
  400. package/src/contract/trace/trace-run-record.ts +37 -15
  401. package/src/contract/trace/trace-steps.ts +1 -1
  402. package/src/contract/trace/trace-zip-limits.ts +6 -2
  403. package/src/contract/verify-approval-decisions.ts +9 -5
  404. package/src/decisions/confirmed-decision-commands.ts +25 -4
  405. package/src/decisions/decision-schema.ts +2 -1
  406. package/src/decisions/git-head-trust.ts +44 -0
  407. package/src/decisions/human-confirmation.ts +5 -0
  408. package/src/decisions/legacy-waiver-migration.ts +14 -3
  409. package/src/exporters/csv-exporter.ts +12 -4
  410. package/src/exporters/matrix/export.ts +11 -4
  411. package/src/exporters/matrix/xlsx-cells.ts +1 -1
  412. package/src/exporters/xlsx-exporter.ts +5 -4
  413. package/src/graph/board-human-actions.ts +80 -0
  414. package/src/graph/evaluate-graph.ts +45 -10
  415. package/src/graph/human-action.ts +33 -0
  416. package/src/graph/manual-triage-decisions.ts +55 -0
  417. package/src/graph/node-decl.ts +18 -0
  418. package/src/graph/nodes/test-case-contract-nodes.ts +28 -7
  419. package/src/graph/nodes/test-case-nodes.ts +37 -5
  420. package/src/graph/nodes/unit-audit-nodes.ts +2 -1
  421. package/src/graph/nodes/unit-contract-node.ts +20 -2
  422. package/src/graph/nodes/unit-design-nodes.ts +2 -1
  423. package/src/graph/test-case-results.ts +25 -4
  424. package/src/graph/test-case-satisfied.ts +7 -4
  425. package/src/graph/test-case-state-shape.ts +7 -2
  426. package/src/graph/unit-artifact-probes.ts +3 -1
  427. package/src/graph/unit-results-freshness.ts +165 -0
  428. package/src/harness/audit.ts +4 -13
  429. package/src/harness/catalog/gate-rules.yaml +3 -3
  430. package/src/harness/defect-draft.ts +13 -2
  431. package/src/harness/defects.ts +22 -9
  432. package/src/harness/flow-check.ts +11 -0
  433. package/src/harness/gates/audit-gate-verdict.ts +2 -1
  434. package/src/harness/gates/audit-input-hash.ts +27 -3
  435. package/src/harness/gates/audit-report-verification.ts +57 -24
  436. package/src/harness/gates/delivery-checklist.ts +39 -7
  437. package/src/harness/gates/delivery-decision-gate.ts +29 -1
  438. package/src/harness/gates/delivery-decision-step.ts +19 -3
  439. package/src/harness/gates/in-run-decision-check.ts +38 -13
  440. package/src/harness/gates/migrated-waiver-import-bounds.ts +103 -0
  441. package/src/harness/gates/migrated-waiver-review.ts +90 -37
  442. package/src/harness/journey.ts +174 -21
  443. package/src/harness/next-step.ts +34 -1
  444. package/src/harness/provenance.ts +99 -11
  445. package/src/harness/triage-manual-classification.ts +76 -0
  446. package/src/harness/unit-paths.ts +19 -0
  447. package/src/hooks/bash-read-only-segment.ts +130 -0
  448. package/src/hooks/bash-write-targets.ts +109 -23
  449. package/src/hooks/guard-protected-paths.ts +13 -3
  450. package/src/hooks/guard-rules.ts +37 -18
  451. package/src/hooks/guard-tty-spoof-rule.ts +6 -3
  452. package/src/hooks/hand-back-core.ts +24 -12
  453. package/src/hooks/session-start-unit-state-hook.ts +9 -4
  454. package/src/hooks/stop-next-step-hook.ts +1 -0
  455. package/src/orchestrator/assets-drift.ts +12 -5
  456. package/src/orchestrator/project-initializer.ts +1 -0
  457. package/src/orchestrator/templates/ai-src/commands/create-test.md +6 -3
  458. package/src/orchestrator/templates/ai-src/commands/delivery.md +2 -0
  459. package/src/orchestrator/templates/ai-src/commands/review.md +2 -0
  460. package/src/orchestrator/templates/ai-src/commands/run-test.md +1 -1
  461. package/src/orchestrator/templates/ai-src/partials/waiting-for-you.claude.md +11 -0
  462. package/src/orchestrator/templates/ai-src/partials/waiting-for-you.codex.md +11 -0
  463. package/src/orchestrator/templates/ai-src/partials/waiting-for-you.copilot.md +11 -0
@@ -1 +1 @@
1
- {"version":3,"file":"collect-trace-evidence.d.ts","sourceRoot":"","sources":["../../../src/contract/trace/collect-trace-evidence.ts"],"names":[],"mappings":"AAeA,OAAO,EAAiB,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEjE,OAAO,EAAsC,YAAY,EAAE,UAAU,EAAoB,MAAM,wBAAwB,CAAC;AACxH,OAAO,EAAiC,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE9E,MAAM,MAAM,SAAS,GAAG,YAAY,GAAG,cAAc,GAAG,UAAU,GAAG,SAAS,GAAG,aAAa,CAAC;AAC/F,MAAM,WAAW,QAAQ;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,SAAS,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,oEAAoE;IACpE,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AACD,MAAM,WAAW,gBAAgB;IAAG,IAAI,EAAE,GAAG,CAAC,MAAM,EAAE,QAAQ,EAAE,CAAC,CAAC;IAAC,QAAQ,EAAE,MAAM,EAAE,CAAC;IAAC,MAAM,EAAE,MAAM,EAAE,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B,CAalB"}
@@ -33,8 +33,7 @@ var __importStar = (this && this.__importStar) || (function () {
33
33
  };
34
34
  })();
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
- exports.OVER_BUDGET = void 0;
37
- exports.insideProject = insideProject;
36
+ exports.OVER_BUDGET = exports.MAX_EVIDENCE_JSON_BYTES = void 0;
38
37
  exports.collectRuns = collectRuns;
39
38
  exports.collectScenarioEvidence = collectScenarioEvidence;
40
39
  /**
@@ -47,93 +46,123 @@ exports.collectScenarioEvidence = collectScenarioEvidence;
47
46
  * refused the trace exists but may not speak (swapped, stale, rejected zip…)
48
47
  * unsupported the trace's format version is unknown (exit ≠ 0)
49
48
  *
49
+ * Two recorded TESTS claiming one scenario id (#962) make its evidence ambiguous: neither speaks —
50
+ * `unproven`, both named (scenario-id-claims.ts) — instead of judging two tests' runs as one.
51
+ *
50
52
  * Only traces of the scenario ids asked for are opened, so a unit pays for its own tests only.
51
53
  */
52
54
  const fs = __importStar(require("fs"));
53
55
  const path = __importStar(require("path"));
56
+ const parse_1 = require("../../harness/parse");
57
+ const render_free_gherkin_1 = require("../render-free-gherkin");
58
+ const read_file_once_1 = require("./read-file-once");
59
+ const scenario_id_claims_1 = require("./scenario-id-claims");
54
60
  const trace_binding_1 = require("./trace-binding");
55
61
  const trace_file_reader_1 = require("./trace-file-reader");
56
62
  const trace_zip_limits_1 = require("./trace-zip-limits");
57
63
  const select_final_attempt_1 = require("./select-final-attempt");
58
64
  const trace_run_record_1 = require("./trace-run-record");
65
+ /** A run record or JSON report larger than this is refused before a byte is read (fail closed, #926). */
66
+ exports.MAX_EVIDENCE_JSON_BYTES = 64 * 1024 * 1024;
67
+ /** Why an evidence file was not read — `outside the project` covers a link out, a swap and a non-file. */
68
+ function notRead(name, r) {
69
+ if (r.status === 'too-large')
70
+ return `${name} is larger than ${exports.MAX_EVIDENCE_JSON_BYTES / 1024 / 1024} MiB — not read`;
71
+ if (r.status === 'missing')
72
+ return `${name} is missing — not read`;
73
+ return `${name} is outside the project (a symlink?) or not a regular file — not read`;
74
+ }
59
75
  /** The reason a run is not judged once the verdict's deadline has passed (fail closed). */
60
76
  exports.OVER_BUDGET = 'verdict budget exceeded; run `sungen contract check`';
61
- const NO_RECORD = "no sungen run record under test-results/ — run the free tests with trace: 'on' and the sungen run-record reporter";
62
- /** The real path of `file` when it is a regular file INSIDE the project (symlinks resolved); else null. */
63
- function insideProject(projectRoot, file) {
64
- try {
65
- const root = fs.realpathSync(projectRoot);
66
- const real = fs.realpathSync(file);
67
- return real.startsWith(root + path.sep) && fs.statSync(real).isFile() ? real : null;
68
- }
69
- catch {
70
- return null;
71
- }
77
+ const NO_RECORD = "no sungen run record under test-results-free/ (or test-results/) — run the free tests with their own config: outputDir 'test-results-free', trace: 'on' and the sungen run-record reporter";
78
+ /** `p` relative to `root` when it lies under it, else null. */
79
+ function under(root, p) {
80
+ const rel = path.relative(root, p);
81
+ return rel && !rel.startsWith('..') && !path.isAbsolute(rel) ? rel : null;
72
82
  }
73
- function resolveAttachment(projectRoot, report, p) {
74
- for (const cand of path.isAbsolute(p) ? [p] : [path.resolve(projectRoot, p), path.resolve(path.dirname(report), p)]) {
75
- if (!fs.existsSync(cand))
76
- continue;
77
- const real = insideProject(projectRoot, cand);
78
- return real ? { file: real } : { outside: true };
79
- }
80
- return {};
83
+ /**
84
+ * Where a report's trace attachment is: the first candidate that exists (read later, opened once, and
85
+ * only from inside the project). Playwright writes attachment paths ABSOLUTE, in the checkout that ran;
86
+ * after a clone or a move that checkout is elsewhere, so a path under the report's own config dir is
87
+ * first tried at the same place under this project (#967) — the run record's sha256 still binds the bytes.
88
+ */
89
+ function attachmentPath(projectRoot, test, p) {
90
+ const moved = path.isAbsolute(p) && test.configRoot && !under(path.resolve(projectRoot), p) ? under(test.configRoot, p) : null;
91
+ const candidates = path.isAbsolute(p)
92
+ ? [...(moved ? [path.resolve(projectRoot, moved)] : []), p]
93
+ : [path.resolve(projectRoot, p), path.resolve(path.dirname(test.report), p)];
94
+ return candidates.find((c) => fs.existsSync(c)) ?? null;
81
95
  }
82
- function judge(projectRoot, record, test, notBefore) {
96
+ function judge(projectRoot, record, test, contract) {
83
97
  const scenarioId = (0, select_final_attempt_1.scenarioIdOfTest)(test.title, test.tags);
84
98
  const base = { scenarioId, test, record };
85
99
  const fin = (0, select_final_attempt_1.finalAttempt)(test);
86
100
  if (fin.admissibility !== 'admissible')
87
101
  return { ...base, result: fin.result, status: fin.admissibility, reason: fin.reason };
88
- const { file, outside } = resolveAttachment(projectRoot, test.report, fin.result.tracePath);
89
- if (outside)
102
+ const missing = { ...base, result: fin.result, status: 'unproven', reason: `no trace at ${fin.result.tracePath} (the report points at a missing file)` };
103
+ const cand = attachmentPath(projectRoot, test, fin.result.tracePath);
104
+ if (!cand)
105
+ return missing;
106
+ // Opened once, inside the project, and what was opened is what is parsed and hashed (#926).
107
+ const limits = (0, trace_zip_limits_1.traceZipLimits)();
108
+ const read = (0, read_file_once_1.readInsideProject)(projectRoot, cand, limits.maxZipBytes);
109
+ if (read.status === 'missing')
110
+ return missing;
111
+ if (read.status === 'outside' || read.status === 'not-a-file') {
90
112
  return { ...base, result: fin.result, status: 'unproven', reason: `the trace ${path.basename(fin.result.tracePath)} is outside the project (or not a file) — not read` };
91
- if (!file)
92
- return { ...base, result: fin.result, status: 'unproven', reason: `no trace at ${fin.result.tracePath} (the report points at a missing file)` };
113
+ }
93
114
  let trace;
94
115
  try {
95
- trace = (0, trace_file_reader_1.readTraceFile)(file);
116
+ trace = (0, trace_file_reader_1.traceFromRead)(read, cand, limits);
96
117
  }
97
118
  catch (e) {
98
119
  const unsupported = e instanceof trace_zip_limits_1.TraceRejected && e.code === 'trace.version-unsupported';
99
120
  return { ...base, result: fin.result, status: unsupported ? 'unsupported' : 'refused', reason: `trace refused: ${e.message}` };
100
121
  }
101
- const bound = (0, trace_binding_1.bindTrace)({ projectRoot, test, result: fin.result, record, trace, notBefore });
122
+ const bound = (0, trace_binding_1.bindTrace)({ projectRoot, test, result: fin.result, record, trace, contract });
102
123
  if (bound.ok === false)
103
124
  return { ...base, result: fin.result, trace, status: 'refused', reason: `trace refused: ${bound.reason}` };
104
125
  return { ...base, result: fin.result, trace, status: 'admissible', specFile: bound.specFile };
105
126
  }
106
- /** Every judged run of the tests `want` accepts (derive: a unit's tests; check: by scenario id). */
107
- function collectRuns(projectRoot, want, notBefore, deadline = Number.POSITIVE_INFINITY) {
127
+ /**
128
+ * Every judged run of the tests `want` accepts (derive: a unit's tests; check: by scenario id). A trace
129
+ * older than `contract` — the unit's .feature files and lock, by content (#967) — is refused; derive,
130
+ * which writes the contract from the traces, passes null.
131
+ */
132
+ function collectRuns(projectRoot, want, contract, deadline = Number.POSITIVE_INFINITY) {
108
133
  const runs = [];
109
134
  const problems = [];
135
+ const untrusted = [];
110
136
  const inputs = [];
137
+ const seen = [];
111
138
  const records = (0, trace_run_record_1.findRunRecords)(projectRoot);
112
139
  for (const file of records) {
113
140
  let record;
114
- if (!insideProject(projectRoot, file)) {
115
- problems.push(`${path.basename(file)} is outside the project (a symlink?) — not read`);
141
+ const recordRead = (0, read_file_once_1.readInsideProject)(projectRoot, file, exports.MAX_EVIDENCE_JSON_BYTES);
142
+ if (recordRead.status !== 'read') {
143
+ problems.push(notRead(path.basename(file), recordRead));
116
144
  continue;
117
145
  }
118
146
  try {
119
- record = (0, trace_run_record_1.readRunRecord)(file);
147
+ record = (0, trace_run_record_1.readRunRecord)(file, recordRead.bytes.toString('utf8'));
120
148
  }
121
149
  catch (e) {
122
- problems.push(`${path.basename(file)} is not trusted: ${e.message}`);
150
+ untrusted.push(`${path.basename(file)} is not trusted: ${e.message}`);
151
+ problems.push(untrusted[untrusted.length - 1]);
123
152
  continue;
124
153
  }
125
154
  if (!record.report) {
126
155
  problems.push(`${path.basename(file)} names no JSON report — add the json reporter to the free-test config`);
127
156
  continue;
128
157
  }
129
- const reportFile = insideProject(projectRoot, path.resolve(projectRoot, record.report));
130
- if (!reportFile) {
131
- problems.push(`${path.basename(file)}: the report ${path.basename(record.report)} is missing or outside the project — not read`);
158
+ const reportRead = (0, read_file_once_1.readInsideProject)(projectRoot, path.resolve(projectRoot, record.report), exports.MAX_EVIDENCE_JSON_BYTES);
159
+ if (reportRead.status !== 'read') {
160
+ problems.push(`${path.basename(file)}: ${notRead(`the report ${path.basename(record.report)}`, reportRead)}`);
132
161
  continue;
133
162
  }
134
163
  let tests;
135
164
  try {
136
- tests = (0, select_final_attempt_1.readPlaywrightReport)(reportFile);
165
+ tests = (0, select_final_attempt_1.readPlaywrightReport)(reportRead.real, reportRead.bytes.toString('utf8'));
137
166
  }
138
167
  catch (e) {
139
168
  problems.push(e.message);
@@ -142,19 +171,48 @@ function collectRuns(projectRoot, want, notBefore, deadline = Number.POSITIVE_IN
142
171
  inputs.push(`${record.runId}:${record.report}`);
143
172
  for (const test of tests) {
144
173
  const id = (0, select_final_attempt_1.scenarioIdOfTest)(test.title, test.tags);
174
+ seen.push({ id, title: test.title });
145
175
  if (!want(id, test))
146
176
  continue;
147
- runs.push(Date.now() > deadline ? { scenarioId: id, test, record, status: 'unproven', reason: exports.OVER_BUDGET } : judge(projectRoot, record, test, notBefore));
177
+ runs.push(Date.now() > deadline ? { scenarioId: id, test, record, status: 'unproven', reason: exports.OVER_BUDGET } : judge(projectRoot, record, test, contract));
148
178
  }
149
179
  }
150
- return { runs, problems, inputs, records: records.length };
180
+ return { runs, problems, untrusted, inputs, records: records.length, seen };
151
181
  }
152
- function collectScenarioEvidence(projectRoot, ids, notBefore, deadline) {
153
- const found = collectRuns(projectRoot, (id) => ids.has(id), notBefore, deadline);
182
+ /** A title without its leading id, for comparing words only: `VP-X-001 Login works` → `login works`. */
183
+ const wordsOf = (title) => {
184
+ const lead = title.match(/^\s*([A-Za-z][A-Za-z0-9.-]*)/)?.[1];
185
+ return (lead && (0, parse_1.isIdLike)(lead) ? title.trim().slice(lead.length) : title).replace(render_free_gherkin_1.CONTROL_CHARS, '').replace(/\s+/g, ' ').trim().toLowerCase();
186
+ };
187
+ /**
188
+ * Why no recorded test speaks for `id` (#943): a recorded test with this scenario's title under
189
+ * ANOTHER id is the usual cause — the id was renamed in the .free.feature (or in the test) and the
190
+ * other side was not — so that mismatch is named, with the fix.
191
+ */
192
+ function noTestFor(id, name, seen) {
193
+ const words = name ? wordsOf(name) : '';
194
+ const twin = words ? seen.find((t) => t.id !== id && wordsOf(t.title) === words) : undefined;
195
+ if (!twin)
196
+ return `no test for ${id} in the recorded run(s)`;
197
+ // The title and its id come from the report — untrusted: clipped, control characters dropped.
198
+ const [title, other] = [(0, render_free_gherkin_1.clip)(twin.title), (0, render_free_gherkin_1.clip)(twin.id, 60)];
199
+ return `no test for ${id} in the recorded run(s) — the recorded test "${title}" (id ${other}) has this scenario's title, so the scenario id and the test no longer match: `
200
+ + `give the test the id ${id} (in its title and its @tag), or the scenario the id ${other}, then run it again with trace on`;
201
+ }
202
+ /** The runs of each scenario id; `names` (id → scenario name) lets a missing test be explained. */
203
+ function collectScenarioEvidence(projectRoot, ids, contract, deadline, names) {
204
+ const found = collectRuns(projectRoot, (id) => ids.has(id), contract, deadline);
154
205
  const runs = new Map([...ids].map((id) => [id, found.runs.filter((r) => r.scenarioId === id)]));
206
+ // Ambiguous evidence: no run of either test may speak for the id — never one picked arbitrarily.
207
+ for (const [id, claim] of (0, scenario_id_claims_1.idsClaimedByTwoTests)(projectRoot, found.runs)) {
208
+ if (runs.has(id))
209
+ runs.set(id, [{ scenarioId: id, status: 'unproven', reason: (0, scenario_id_claims_1.twoTestsClaim)(id, claim) }]);
210
+ }
155
211
  for (const [id, list] of runs) {
212
+ // A record that was not trusted may be why (a newer reporter, a hand edit): the finding says so.
213
+ const why = found.untrusted.length ? ` — ${found.untrusted.join('; ')}` : '';
156
214
  if (!list.length)
157
- list.push({ scenarioId: id, status: 'unproven', reason: found.records ? `no test for ${id} in the recorded run(s)` : NO_RECORD });
215
+ list.push({ scenarioId: id, status: 'unproven', reason: found.records ? `${noTestFor(id, names?.get(id), found.seen)}${why}` : NO_RECORD });
158
216
  }
159
217
  return { runs, problems: found.problems, inputs: found.inputs };
160
218
  }
@@ -1 +1 @@
1
- {"version":3,"file":"collect-trace-evidence.js","sourceRoot":"","sources":["../../../src/contract/trace/collect-trace-evidence.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuCA,sCAMC;AA8BD,kCAwBC;AAED,0DAOC;AA5GD;;;;;;;;;;;GAWG;AACH,uCAAyB;AACzB,2CAA6B;AAC7B,mDAA4C;AAC5C,2DAAiE;AACjE,yDAAmD;AACnD,iEAAwH;AACxH,yDAA8E;AAgB9E,2FAA2F;AAC9E,QAAA,WAAW,GAAG,sDAAsD,CAAC;AAClF,MAAM,SAAS,GAAG,mHAAmH,CAAC;AAEtI,2GAA2G;AAC3G,SAAgB,aAAa,CAAC,WAAmB,EAAE,IAAY;IAC7D,IAAI,CAAC;QACH,MAAM,IAAI,GAAG,EAAE,CAAC,YAAY,CAAC,WAAW,CAAC,CAAC;QAC1C,MAAM,IAAI,GAAG,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;QACnC,OAAO,IAAI,CAAC,UAAU,CAAC,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;IACtF,CAAC;IAAC,MAAM,CAAC;QAAC,OAAO,IAAI,CAAC;IAAC,CAAC;AAC1B,CAAC;AAED,SAAS,iBAAiB,CAAC,WAAmB,EAAE,MAAc,EAAE,CAAS;IACvE,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAA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EAAE,EAAE,CAAC,EAAE,UAAU,EAAE,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,IAAA,kCAAa,EAAC,EAAE,EAAE,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC;IAC7G,CAAC;IACD,KAAK,MAAM,CAAC,EAAE,EAAE,IAAI,CAAC,IAAI,IAAI,EAAE,CAAC;QAC9B,iGAAiG;QACjG,MAAM,GAAG,GAAG,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC7E,IAAI,CAAC,IAAI,CAAC,MAAM;YAAE,IAAI,CAAC,IAAI,CAAC,EAAE,UAAU,EAAE,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC,EAAE,EAAE,KAAK,EAAE,GAAG,CAAC,EAAE,CAAC,EAAE,KAAK,CAAC,IAAI,CAAC,GAAG,GAAG,EAAE,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC;IAChK,CAAC;IACD,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,EAAE,CAAC;AAClE,CAAC"}
@@ -0,0 +1,20 @@
1
+ export type FileRead = {
2
+ status: 'read';
3
+ real: string;
4
+ bytes: Buffer;
5
+ } | {
6
+ status: 'missing';
7
+ } | {
8
+ status: 'outside';
9
+ why: string;
10
+ } | {
11
+ status: 'not-a-file';
12
+ } | {
13
+ status: 'too-large';
14
+ size: number;
15
+ };
16
+ /** A regular file, opened once and read from that descriptor. */
17
+ export declare const readFileOnce: (file: string, maxBytes?: number) => FileRead;
18
+ /** A regular file INSIDE the project (symlinks resolved), opened once; see the header for the checks. */
19
+ export declare function readInsideProject(projectRoot: string, file: string, maxBytes?: number): FileRead;
20
+ //# sourceMappingURL=read-file-once.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"read-file-once.d.ts","sourceRoot":"","sources":["../../../src/contract/trace/read-file-once.ts"],"names":[],"mappings":"AAyBA,MAAM,MAAM,QAAQ,GAChB;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAC/C;IAAE,MAAM,EAAE,SAAS,CAAA;CAAE,GACrB;IAAE,MAAM,EAAE,SAAS,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GAClC;IAAE,MAAM,EAAE,YAAY,CAAA;CAAE,GACxB;IAAE,MAAM,EAAE,WAAW,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAsC1C,iEAAiE;AACjE,eAAO,MAAM,YAAY,GAAI,MAAM,MAAM,EAAE,iBAAmC,KAAG,QAC7B,CAAC;AAErD,yGAAyG;AACzG,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,SAA2B,GAAG,QAAQ,CAqBlH"}
@@ -0,0 +1,135 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.readFileOnce = void 0;
37
+ exports.readInsideProject = readInsideProject;
38
+ /**
39
+ * Read trace evidence (a run record, a JSON report, a trace.zip) by opening it ONCE and checking what
40
+ * was opened (#926) — never "check the path, then read the path", which leaves a window in which the
41
+ * file can be swapped for a link to anything outside the project.
42
+ *
43
+ * readFileOnce(file) a regular file, read from its descriptor; O_NONBLOCK so a
44
+ * FIFO swapped in cannot hang the guard; size checked on the
45
+ * descriptor before a byte is read
46
+ * readInsideProject(root, file) the same for a path from untrusted input:
47
+ * 1. its real path must sit inside the project's real root
48
+ * 2. that real path is opened with O_NOFOLLOW (a link put
49
+ * there in the meantime fails the open)
50
+ * 3. AFTER the open the path is resolved again: still inside,
51
+ * and the same file (device + inode) as the descriptor —
52
+ * a swap made before the open and undone after it is caught
53
+ *
54
+ * A file truncated or grown while it is read gives the bytes the descriptor had; the caller hashes
55
+ * those bytes, so nothing unread is ever vouched for.
56
+ *
57
+ * Windows has no O_NOFOLLOW (the constant is 0 there): the open follows a link swapped in, and the
58
+ * device + inode re-check after the open is what refuses it.
59
+ */
60
+ const fs = __importStar(require("fs"));
61
+ const path = __importStar(require("path"));
62
+ const { O_RDONLY } = fs.constants;
63
+ const O_NOFOLLOW = fs.constants.O_NOFOLLOW ?? 0;
64
+ const O_NONBLOCK = fs.constants.O_NONBLOCK ?? 0;
65
+ function readFd(fd, size) {
66
+ const buf = Buffer.alloc(size);
67
+ let off = 0;
68
+ while (off < size) {
69
+ const n = fs.readSync(fd, buf, off, size - off, off);
70
+ if (n === 0)
71
+ break;
72
+ off += n;
73
+ }
74
+ return off === size ? buf : buf.subarray(0, off);
75
+ }
76
+ function openAndRead(file, flags, maxBytes, recheck) {
77
+ let fd;
78
+ try {
79
+ fd = fs.openSync(file, flags);
80
+ }
81
+ catch (e) {
82
+ const code = e.code;
83
+ if (code === 'ENOENT')
84
+ return { status: 'missing' };
85
+ // O_NOFOLLOW on a link: ELOOP (Linux, macOS) or EMLINK (FreeBSD).
86
+ if (code === 'ELOOP' || code === 'EMLINK')
87
+ return { status: 'outside', why: 'it became a link while it was opened' };
88
+ throw e;
89
+ }
90
+ try {
91
+ const st = fs.fstatSync(fd);
92
+ if (!st.isFile())
93
+ return { status: 'not-a-file' };
94
+ if (st.size > maxBytes)
95
+ return { status: 'too-large', size: st.size };
96
+ const moved = recheck?.(st);
97
+ if (moved)
98
+ return { status: 'outside', why: moved };
99
+ return { status: 'read', real: file, bytes: readFd(fd, st.size) };
100
+ }
101
+ finally {
102
+ fs.closeSync(fd);
103
+ }
104
+ }
105
+ /** A regular file, opened once and read from that descriptor. */
106
+ const readFileOnce = (file, maxBytes = Number.POSITIVE_INFINITY) => openAndRead(file, O_RDONLY | O_NONBLOCK, maxBytes);
107
+ exports.readFileOnce = readFileOnce;
108
+ /** A regular file INSIDE the project (symlinks resolved), opened once; see the header for the checks. */
109
+ function readInsideProject(projectRoot, file, maxBytes = Number.POSITIVE_INFINITY) {
110
+ let root;
111
+ let real;
112
+ try {
113
+ root = fs.realpathSync(projectRoot);
114
+ real = fs.realpathSync(file);
115
+ }
116
+ catch (e) {
117
+ return e.code === 'ENOENT' ? { status: 'missing' } : { status: 'outside', why: 'its real path cannot be resolved' };
118
+ }
119
+ const within = (p) => p.startsWith(root + path.sep);
120
+ if (!within(real))
121
+ return { status: 'outside', why: 'its real path is outside the project' };
122
+ return openAndRead(real, O_RDONLY | O_NOFOLLOW | O_NONBLOCK, maxBytes, (opened) => {
123
+ try {
124
+ const again = fs.realpathSync(file);
125
+ if (!within(again))
126
+ return 'it was swapped for a link outside the project while it was opened';
127
+ const now = fs.statSync(again);
128
+ return now.dev === opened.dev && now.ino === opened.ino ? null : 'it was swapped for another file while it was opened';
129
+ }
130
+ catch {
131
+ return 'it moved while it was opened';
132
+ }
133
+ });
134
+ }
135
+ //# sourceMappingURL=read-file-once.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"read-file-once.js","sourceRoot":"","sources":["../../../src/contract/trace/read-file-once.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyEA,8CAqBC;AA9FD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,uCAAyB;AACzB,2CAA6B;AAS7B,MAAM,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC;AAClC,MAAM,UAAU,GAAG,EAAE,CAAC,SAAS,CAAC,UAAU,IAAI,CAAC,CAAC;AAChD,MAAM,UAAU,GAAG,EAAE,CAAC,SAAS,CAAC,UAAU,IAAI,CAAC,CAAC;AAEhD,SAAS,MAAM,CAAC,EAAU,EAAE,IAAY;IACtC,MAAM,GAAG,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAC/B,IAAI,GAAG,GAAG,CAAC,CAAC;IACZ,OAAO,GAAG,GAAG,IAAI,EAAE,CAAC;QAClB,MAAM,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,GAAG,GAAG,EAAE,GAAG,CAAC,CAAC;QACrD,IAAI,CAAC,KAAK,CAAC;YAAE,MAAM;QACnB,GAAG,IAAI,CAAC,CAAC;IACX,CAAC;IACD,OAAO,GAAG,KAAK,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC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AAO,mEAAmE,CAAC;YAC/F,MAAM,GAAG,GAAG,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;YAC/B,OAAO,GAAG,CAAC,GAAG,KAAK,MAAM,CAAC,GAAG,IAAI,GAAG,CAAC,GAAG,KAAK,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,qDAAqD,CAAC;QACzH,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,8BAA8B,CAAC;QACxC,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,11 @@
1
+ import type { TraceRun } from './collect-trace-evidence';
2
+ export interface IdClaim {
3
+ /** `file:line "title" (run record <path>)` per claiming test, sorted. */
4
+ tests: string[];
5
+ /** Project-relative records under test-results/ that are a claim's only source, next to a test-results-free/ claim. */
6
+ staleRecords: string[];
7
+ }
8
+ export declare function idsClaimedByTwoTests(projectRoot: string, runs: readonly TraceRun[]): Map<string, IdClaim>;
9
+ /** What to tell the user when several tests claim one id — check and derive say it the same way. */
10
+ export declare function twoTestsClaim(id: string, claim: IdClaim): string;
11
+ //# sourceMappingURL=scenario-id-claims.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scenario-id-claims.d.ts","sourceRoot":"","sources":["../../../src/contract/trace/scenario-id-claims.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAGzD,MAAM,WAAW,OAAO;IACtB,yEAAyE;IACzE,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,uHAAuH;IACvH,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB;AAQD,wBAAgB,oBAAoB,CAAC,WAAW,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,QAAQ,EAAE,GAAG,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAuBzG;AAED,oGAAoG;AACpG,wBAAgB,aAAa,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,MAAM,CAKhE"}
@@ -0,0 +1,89 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.idsClaimedByTwoTests = idsClaimedByTwoTests;
37
+ exports.twoTestsClaim = twoTestsClaim;
38
+ /**
39
+ * One scenario id, one test (#962): which ids more than one recorded TEST claims, said the same way
40
+ * by `contract derive` (it refuses) and `contract check` (the id is unproven). One test recorded
41
+ * again — another run or shard, a retry, a second Playwright project — is still one test: the same
42
+ * file and the same Playwright test id.
43
+ *
44
+ * Each claiming test names the run record(s) it came from. A test that only an older run's record
45
+ * under `test-results/` still mentions — while another claim comes from the free config's own
46
+ * `test-results-free/` — is most likely gone: that record is offered for deletion.
47
+ */
48
+ const path = __importStar(require("path"));
49
+ const render_free_gherkin_1 = require("../render-free-gherkin");
50
+ const trace_run_record_1 = require("./trace-run-record");
51
+ const posix = (p) => p.split(path.sep).join('/');
52
+ /** A run's project-relative test file: the run record's (what the binding checks), else the report's. */
53
+ const testFileOf = (r) => r.record?.attempts.find((a) => a.testId === r.test?.testId)?.file ?? r.test?.file ?? '?';
54
+ const label = (r, records) => `${(0, render_free_gherkin_1.clip)(testFileOf(r), 200)}:${r.test?.line ?? 0} "${(0, render_free_gherkin_1.clip)(r.test?.title ?? '')}" (run record ${records.map((f) => (0, render_free_gherkin_1.clip)(f, 200)).join(', ')})`;
55
+ function idsClaimedByTwoTests(projectRoot, runs) {
56
+ const byId = new Map();
57
+ for (const r of runs) {
58
+ if (!r.test)
59
+ continue;
60
+ const tests = byId.get(r.scenarioId) ?? new Map();
61
+ const key = `${testFileOf(r)}\0${r.test.testId}`;
62
+ const entry = tests.get(key) ?? { run: r, records: new Set() };
63
+ if (r.record?.file)
64
+ entry.records.add(posix(path.relative(projectRoot, r.record.file)));
65
+ tests.set(key, entry);
66
+ byId.set(r.scenarioId, tests);
67
+ }
68
+ const claims = new Map();
69
+ for (const [id, tests] of byId) {
70
+ if (tests.size < 2)
71
+ continue;
72
+ const entries = [...tests.values()].map((t) => ({ ...t, records: [...t.records].sort() }));
73
+ const inFreeDir = entries.some((t) => t.records.some((f) => f.startsWith(`${trace_run_record_1.FREE_RUN_DIR}/`)));
74
+ const legacyOnly = entries.filter((t) => t.records.length > 0 && t.records.every((f) => f.startsWith('test-results/')));
75
+ claims.set(id, {
76
+ tests: entries.map((t) => label(t.run, t.records)).sort(),
77
+ staleRecords: inFreeDir ? [...new Set(legacyOnly.flatMap((t) => t.records))].sort() : [],
78
+ });
79
+ }
80
+ return claims;
81
+ }
82
+ /** What to tell the user when several tests claim one id — check and derive say it the same way. */
83
+ function twoTestsClaim(id, claim) {
84
+ const stale = claim.staleRecords.length
85
+ ? `; if that test is gone, delete ${claim.staleRecords.join(', ')} — an older run's record (free tests now record under ${trace_run_record_1.FREE_RUN_DIR}/)`
86
+ : '';
87
+ return `${claim.tests.length} recorded tests claim ${id}: ${claim.tests.join(', ')} — give each test its own ID (its title's leading ID, or its @tag), then run them again with trace on${stale}`;
88
+ }
89
+ //# sourceMappingURL=scenario-id-claims.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scenario-id-claims.js","sourceRoot":"","sources":["../../../src/contract/trace/scenario-id-claims.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BA,oDAuBC;AAGD,sCAKC;AA3DD;;;;;;;;;GASG;AACH,2CAA6B;AAC7B,gEAA8C;AAE9C,yDAAkD;AASlD,MAAM,KAAK,GAAG,CAAC,CAAS,EAAU,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACjE,yGAAyG;AACzG,MAAM,UAAU,GAAG,CAAC,CAAW,EAAU,EAAE,CAAC,CAAC,CAAC,MAAM,EAAE,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,IAAI,EAAE,MAAM,CAAC,EAAE,IAAI,IAAI,CAAC,CAAC,IAAI,EAAE,IAAI,IAAI,GAAG,CAAC;AACrI,MAAM,KAAK,GAAG,CAAC,CAAW,EAAE,OAAiB,EAAU,EAAE,CACvD,GAAG,IAAA,0BAAI,EAAC,UAAU,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,IAAI,IAAI,CAAC,KAAK,IAAA,0BAAI,EAAC,CAAC,CAAC,IAAI,EAAE,KAAK,IAAI,EAAE,CAAC,iBAAiB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IA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AI,CAAC,IAAI,CAAC,yDAAyD,+BAAY,IAAI;QAC1I,CAAC,CAAC,EAAE,CAAC;IACP,OAAO,GAAG,KAAK,CAAC,KAAK,CAAC,MAAM,yBAAyB,EAAE,KAAK,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,wGAAwG,KAAK,EAAE,CAAC;AACpM,CAAC"}
@@ -14,10 +14,12 @@ export interface ReportTest {
14
14
  project: string;
15
15
  results: ReportResult[];
16
16
  report: string;
17
+ /** The directory of the config that ran (`config.configFile`, absolute as Playwright writes it) — where absolute attachment paths start. */
18
+ configRoot?: string;
17
19
  }
18
20
  export type Admissibility = 'admissible' | 'inconclusive' | 'unproven';
19
- /** Every test of a report; throws when the file is not a Playwright JSON report at all. */
20
- export declare function readPlaywrightReport(file: string): ReportTest[];
21
+ /** Every test of a report (`text`: its bytes, already read once by the caller); throws when it is not a Playwright JSON report at all. */
22
+ export declare function readPlaywrightReport(file: string, text?: string): ReportTest[];
21
23
  export declare function scenarioIdOfTest(title: string, tags: string[]): string;
22
24
  export declare function finalAttempt(t: ReportTest): {
23
25
  result?: ReportResult;
@@ -1 +1 @@
1
- {"version":3,"file":"select-final-attempt.d.ts","sourceRoot":"","sources":["../../../src/contract/trace/select-final-attempt.ts"],"names":[],"mappings":"AAeA,MAAM,WAAW,YAAY;IAAG,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE;AAC9H,MAAM,WAAW,UAAU;IAAG,MAAM,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,EAAE,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,YAAY,E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