@hominis/fireforge 0.45.0 → 0.46.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (662) hide show
  1. package/CHANGELOG.md +409 -446
  2. package/dist/bin/fireforge.d.ts +1 -1
  3. package/dist/bin/fireforge.js +21 -15
  4. package/dist/build-info.json +4 -4
  5. package/dist/src/cli-usage-error.d.ts +46 -0
  6. package/dist/src/cli-usage-error.js +81 -0
  7. package/dist/src/cli.d.ts +7 -2
  8. package/dist/src/cli.js +47 -47
  9. package/dist/src/commands/bootstrap-checks.js +2 -1
  10. package/dist/src/commands/bootstrap.js +3 -4
  11. package/dist/src/commands/build.js +27 -17
  12. package/dist/src/commands/config.js +9 -9
  13. package/dist/src/commands/destructive-decision.d.ts +19 -0
  14. package/dist/src/commands/destructive-decision.js +31 -0
  15. package/dist/src/commands/discard.js +5 -5
  16. package/dist/src/commands/doctor-check-core.d.ts +4 -10
  17. package/dist/src/commands/doctor-check-core.js +0 -8
  18. package/dist/src/commands/doctor-external-toolchains.js +2 -2
  19. package/dist/src/commands/doctor-furnace-config-sync.d.ts +2 -2
  20. package/dist/src/commands/doctor-furnace-config-sync.js +20 -20
  21. package/dist/src/commands/doctor-furnace-jar.d.ts +1 -1
  22. package/dist/src/commands/doctor-furnace-jar.js +1 -1
  23. package/dist/src/commands/doctor-furnace.js +22 -22
  24. package/dist/src/commands/doctor-orphaned-harness.d.ts +10 -17
  25. package/dist/src/commands/doctor-orphaned-harness.js +14 -23
  26. package/dist/src/commands/doctor-patch-manifest.d.ts +2 -1
  27. package/dist/src/commands/doctor-patch-manifest.js +7 -6
  28. package/dist/src/commands/doctor-post-rebase-audit.js +3 -3
  29. package/dist/src/commands/doctor-source-pin.d.ts +12 -12
  30. package/dist/src/commands/doctor-source-pin.js +14 -14
  31. package/dist/src/commands/doctor-working-tree.d.ts +3 -3
  32. package/dist/src/commands/doctor-working-tree.js +3 -3
  33. package/dist/src/commands/doctor.d.ts +3 -1
  34. package/dist/src/commands/doctor.js +15 -16
  35. package/dist/src/commands/download.js +50 -37
  36. package/dist/src/commands/export-all.js +29 -12
  37. package/dist/src/commands/export-flow.d.ts +5 -5
  38. package/dist/src/commands/export-flow.js +29 -59
  39. package/dist/src/commands/export-placement-conflicts.d.ts +3 -3
  40. package/dist/src/commands/export-placement-conflicts.js +12 -12
  41. package/dist/src/commands/export-placement-gate.d.ts +2 -2
  42. package/dist/src/commands/export-placement-gate.js +7 -13
  43. package/dist/src/commands/export-placement-policy.d.ts +1 -1
  44. package/dist/src/commands/export-placement-policy.js +4 -6
  45. package/dist/src/commands/export-shared.d.ts +51 -32
  46. package/dist/src/commands/export-shared.js +17 -32
  47. package/dist/src/commands/export.js +14 -5
  48. package/dist/src/commands/furnace/apply.js +16 -16
  49. package/dist/src/commands/furnace/authoring-config.d.ts +13 -0
  50. package/dist/src/commands/furnace/authoring-config.js +19 -0
  51. package/dist/src/commands/furnace/chrome-doc-remove.d.ts +1 -1
  52. package/dist/src/commands/furnace/chrome-doc-remove.js +2 -2
  53. package/dist/src/commands/furnace/chrome-doc-templates.d.ts +14 -14
  54. package/dist/src/commands/furnace/chrome-doc-templates.js +17 -17
  55. package/dist/src/commands/furnace/chrome-doc-tests.d.ts +2 -2
  56. package/dist/src/commands/furnace/chrome-doc-tests.js +4 -4
  57. package/dist/src/commands/furnace/chrome-doc.d.ts +8 -8
  58. package/dist/src/commands/furnace/chrome-doc.js +18 -18
  59. package/dist/src/commands/furnace/create-browser-test.d.ts +1 -1
  60. package/dist/src/commands/furnace/create-browser-test.js +7 -12
  61. package/dist/src/commands/furnace/create-dry-run.d.ts +4 -4
  62. package/dist/src/commands/furnace/create-dry-run.js +6 -9
  63. package/dist/src/commands/furnace/create-features.d.ts +2 -2
  64. package/dist/src/commands/furnace/create-features.js +2 -2
  65. package/dist/src/commands/furnace/create-mochikit.d.ts +4 -4
  66. package/dist/src/commands/furnace/create-mochikit.js +7 -7
  67. package/dist/src/commands/furnace/create-templates.d.ts +31 -15
  68. package/dist/src/commands/furnace/create-templates.js +20 -19
  69. package/dist/src/commands/furnace/create-xpcshell.d.ts +5 -5
  70. package/dist/src/commands/furnace/create-xpcshell.js +8 -8
  71. package/dist/src/commands/furnace/create.d.ts +1 -1
  72. package/dist/src/commands/furnace/create.js +35 -29
  73. package/dist/src/commands/furnace/deploy.js +15 -6
  74. package/dist/src/commands/furnace/diff.js +7 -7
  75. package/dist/src/commands/furnace/index.js +1 -1
  76. package/dist/src/commands/furnace/init.js +17 -16
  77. package/dist/src/commands/furnace/list.js +2 -2
  78. package/dist/src/commands/furnace/override.d.ts +1 -1
  79. package/dist/src/commands/furnace/override.js +43 -34
  80. package/dist/src/commands/furnace/preview.js +17 -17
  81. package/dist/src/commands/furnace/refresh.js +15 -7
  82. package/dist/src/commands/furnace/remove-mutations.d.ts +9 -10
  83. package/dist/src/commands/furnace/remove-mutations.js +19 -19
  84. package/dist/src/commands/furnace/remove-state.d.ts +1 -1
  85. package/dist/src/commands/furnace/remove-state.js +1 -1
  86. package/dist/src/commands/furnace/remove.js +4 -8
  87. package/dist/src/commands/furnace/rename-browser-test.js +10 -15
  88. package/dist/src/commands/furnace/rename-xpcshell.d.ts +2 -2
  89. package/dist/src/commands/furnace/rename-xpcshell.js +3 -3
  90. package/dist/src/commands/furnace/rename.js +36 -36
  91. package/dist/src/commands/furnace/scan.js +3 -3
  92. package/dist/src/commands/furnace/status.js +19 -16
  93. package/dist/src/commands/furnace/sync.js +6 -6
  94. package/dist/src/commands/furnace/test-file-name.d.ts +28 -0
  95. package/dist/src/commands/furnace/test-file-name.js +39 -0
  96. package/dist/src/commands/furnace/validate.js +11 -12
  97. package/dist/src/commands/furnace/validation-output.d.ts +21 -9
  98. package/dist/src/commands/furnace/validation-output.js +3 -8
  99. package/dist/src/commands/import.js +22 -29
  100. package/dist/src/commands/lint-per-patch.d.ts +2 -2
  101. package/dist/src/commands/lint-per-patch.js +27 -12
  102. package/dist/src/commands/lint-per-run-checkjs.d.ts +14 -15
  103. package/dist/src/commands/lint-per-run-checkjs.js +14 -15
  104. package/dist/src/commands/lint-report.d.ts +3 -3
  105. package/dist/src/commands/lint-report.js +4 -4
  106. package/dist/src/commands/lint.d.ts +5 -4
  107. package/dist/src/commands/lint.js +36 -36
  108. package/dist/src/commands/manifest.d.ts +4 -4
  109. package/dist/src/commands/manifest.js +1 -1
  110. package/dist/src/commands/package.js +4 -6
  111. package/dist/src/commands/patch/compact.d.ts +2 -2
  112. package/dist/src/commands/patch/compact.js +19 -20
  113. package/dist/src/commands/patch/delete.d.ts +1 -1
  114. package/dist/src/commands/patch/delete.js +23 -33
  115. package/dist/src/commands/patch/entry-projection.d.ts +13 -0
  116. package/dist/src/commands/patch/entry-projection.js +24 -0
  117. package/dist/src/commands/patch/lint-ignore.d.ts +3 -12
  118. package/dist/src/commands/patch/lint-ignore.js +33 -44
  119. package/dist/src/commands/patch/move-files-create.d.ts +2 -2
  120. package/dist/src/commands/patch/move-files-create.js +29 -15
  121. package/dist/src/commands/patch/move-files-into.d.ts +2 -2
  122. package/dist/src/commands/patch/move-files-into.js +41 -37
  123. package/dist/src/commands/patch/move-files.js +5 -14
  124. package/dist/src/commands/patch/patch-context.d.ts +1 -1
  125. package/dist/src/commands/patch/rename.d.ts +4 -4
  126. package/dist/src/commands/patch/rename.js +35 -49
  127. package/dist/src/commands/patch/reorder.js +35 -48
  128. package/dist/src/commands/patch/split-plan.d.ts +7 -8
  129. package/dist/src/commands/patch/split-plan.js +10 -13
  130. package/dist/src/commands/patch/split.d.ts +2 -2
  131. package/dist/src/commands/patch/split.js +50 -48
  132. package/dist/src/commands/patch/staged-dependency-validate.d.ts +1 -1
  133. package/dist/src/commands/patch/staged-dependency-validate.js +3 -3
  134. package/dist/src/commands/patch/staged-dependency.d.ts +1 -1
  135. package/dist/src/commands/patch/staged-dependency.js +22 -28
  136. package/dist/src/commands/patch/tier.d.ts +2 -2
  137. package/dist/src/commands/patch/tier.js +20 -30
  138. package/dist/src/commands/patch-rename-map.d.ts +19 -0
  139. package/dist/src/commands/patch-rename-map.js +36 -0
  140. package/dist/src/commands/pending-resolution.d.ts +15 -0
  141. package/dist/src/commands/pending-resolution.js +25 -0
  142. package/dist/src/commands/re-export-adjacent.d.ts +25 -3
  143. package/dist/src/commands/re-export-adjacent.js +40 -24
  144. package/dist/src/commands/re-export-bulk-scan.d.ts +3 -3
  145. package/dist/src/commands/re-export-bulk-scan.js +23 -27
  146. package/dist/src/commands/re-export-drift.d.ts +10 -10
  147. package/dist/src/commands/re-export-drift.js +33 -33
  148. package/dist/src/commands/re-export-files.d.ts +2 -3
  149. package/dist/src/commands/re-export-files.js +52 -44
  150. package/dist/src/commands/re-export-lint.d.ts +29 -30
  151. package/dist/src/commands/re-export-lint.js +36 -29
  152. package/dist/src/commands/re-export-options.d.ts +1 -1
  153. package/dist/src/commands/re-export-options.js +1 -1
  154. package/dist/src/commands/re-export-register.d.ts +1 -1
  155. package/dist/src/commands/re-export-register.js +1 -1
  156. package/dist/src/commands/re-export-scan.d.ts +1 -1
  157. package/dist/src/commands/re-export-scan.js +12 -9
  158. package/dist/src/commands/re-export-single.d.ts +23 -4
  159. package/dist/src/commands/re-export-single.js +39 -31
  160. package/dist/src/commands/re-export.js +35 -17
  161. package/dist/src/commands/rebase/abort.js +9 -14
  162. package/dist/src/commands/rebase/continue.js +20 -19
  163. package/dist/src/commands/rebase/index.d.ts +1 -1
  164. package/dist/src/commands/rebase/index.js +5 -5
  165. package/dist/src/commands/rebase/patch-loop.d.ts +2 -2
  166. package/dist/src/commands/rebase/patch-loop.js +20 -24
  167. package/dist/src/commands/register.js +5 -5
  168. package/dist/src/commands/reset.js +1 -1
  169. package/dist/src/commands/resolve.d.ts +2 -2
  170. package/dist/src/commands/resolve.js +21 -13
  171. package/dist/src/commands/run.d.ts +0 -13
  172. package/dist/src/commands/run.js +38 -51
  173. package/dist/src/commands/setup-support.d.ts +16 -4
  174. package/dist/src/commands/setup-support.js +20 -20
  175. package/dist/src/commands/setup.js +4 -10
  176. package/dist/src/commands/source.js +9 -2
  177. package/dist/src/commands/status-check.d.ts +3 -3
  178. package/dist/src/commands/status-check.js +6 -6
  179. package/dist/src/commands/status-json.d.ts +14 -13
  180. package/dist/src/commands/status-json.js +9 -8
  181. package/dist/src/commands/status-output.d.ts +3 -3
  182. package/dist/src/commands/status-output.js +5 -5
  183. package/dist/src/commands/status-ownership.d.ts +3 -3
  184. package/dist/src/commands/status-ownership.js +3 -3
  185. package/dist/src/commands/status.js +25 -26
  186. package/dist/src/commands/test-build-phase.d.ts +3 -3
  187. package/dist/src/commands/test-build-phase.js +48 -24
  188. package/dist/src/commands/test-diagnose.d.ts +1 -1
  189. package/dist/src/commands/test-diagnose.js +20 -20
  190. package/dist/src/commands/test-modes.d.ts +4 -4
  191. package/dist/src/commands/test-modes.js +4 -5
  192. package/dist/src/commands/test-register.js +5 -3
  193. package/dist/src/commands/test-run.d.ts +11 -11
  194. package/dist/src/commands/test-run.js +40 -33
  195. package/dist/src/commands/test-stale-gate.d.ts +12 -12
  196. package/dist/src/commands/test-stale-gate.js +17 -17
  197. package/dist/src/commands/test-verdict.d.ts +19 -5
  198. package/dist/src/commands/test-verdict.js +26 -11
  199. package/dist/src/commands/test.d.ts +3 -3
  200. package/dist/src/commands/test.js +73 -36
  201. package/dist/src/commands/token-coverage.js +3 -3
  202. package/dist/src/commands/token-list.d.ts +26 -0
  203. package/dist/src/commands/token-list.js +153 -0
  204. package/dist/src/commands/token.js +26 -10
  205. package/dist/src/commands/tree.js +26 -21
  206. package/dist/src/commands/typecheck.d.ts +6 -6
  207. package/dist/src/commands/typecheck.js +16 -16
  208. package/dist/src/commands/verify.d.ts +3 -3
  209. package/dist/src/commands/verify.js +10 -10
  210. package/dist/src/commands/watch.js +11 -11
  211. package/dist/src/commands/wire.js +17 -16
  212. package/dist/src/core/ast-utils.d.ts +7 -7
  213. package/dist/src/core/ast-utils.js +8 -8
  214. package/dist/src/core/branding.d.ts +5 -12
  215. package/dist/src/core/branding.js +6 -5
  216. package/dist/src/core/browser-wire.d.ts +1 -1
  217. package/dist/src/core/browser-wire.js +10 -7
  218. package/dist/src/core/build-audit-platform.d.ts +32 -3
  219. package/dist/src/core/build-audit-platform.js +153 -13
  220. package/dist/src/core/build-audit-registration.d.ts +5 -5
  221. package/dist/src/core/build-audit-registration.js +10 -9
  222. package/dist/src/core/build-audit-resolve.d.ts +5 -5
  223. package/dist/src/core/build-audit-resolve.js +6 -6
  224. package/dist/src/core/build-audit-skip.d.ts +57 -0
  225. package/dist/src/core/build-audit-skip.js +112 -0
  226. package/dist/src/core/build-audit-transforms.d.ts +2 -2
  227. package/dist/src/core/build-audit-transforms.js +3 -3
  228. package/dist/src/core/build-audit.d.ts +21 -8
  229. package/dist/src/core/build-audit.js +142 -40
  230. package/dist/src/core/build-baseline-types.d.ts +19 -18
  231. package/dist/src/core/build-baseline-types.js +1 -1
  232. package/dist/src/core/build-baseline.d.ts +48 -31
  233. package/dist/src/core/build-baseline.js +20 -43
  234. package/dist/src/core/build-jar-escalation.d.ts +8 -8
  235. package/dist/src/core/build-jar-escalation.js +18 -17
  236. package/dist/src/core/build-overwrite-guard.d.ts +4 -4
  237. package/dist/src/core/build-overwrite-guard.js +14 -14
  238. package/dist/src/core/build-prepare.d.ts +4 -12
  239. package/dist/src/core/build-prepare.js +22 -26
  240. package/dist/src/core/config-mutate.js +4 -4
  241. package/dist/src/core/config-paths.d.ts +2 -6
  242. package/dist/src/core/config-paths.js +4 -2
  243. package/dist/src/core/config-state.d.ts +0 -6
  244. package/dist/src/core/config-state.js +3 -21
  245. package/dist/src/core/config-validate-build-audit.d.ts +8 -0
  246. package/dist/src/core/config-validate-build-audit.js +80 -0
  247. package/dist/src/core/config-validate-file-size.d.ts +1 -1
  248. package/dist/src/core/config-validate-file-size.js +3 -3
  249. package/dist/src/core/config-validate-patch-policy.d.ts +2 -2
  250. package/dist/src/core/config-validate-patch-policy.js +3 -3
  251. package/dist/src/core/config-validate-test-toolchains.d.ts +2 -2
  252. package/dist/src/core/config-validate-test-toolchains.js +4 -5
  253. package/dist/src/core/config-validate.js +22 -12
  254. package/dist/src/core/config.d.ts +12 -12
  255. package/dist/src/core/config.js +21 -25
  256. package/dist/src/core/coverage-extend.d.ts +16 -16
  257. package/dist/src/core/coverage-extend.js +20 -20
  258. package/dist/src/core/destructive.d.ts +14 -14
  259. package/dist/src/core/destructive.js +9 -9
  260. package/dist/src/core/diff-hunks.d.ts +2 -2
  261. package/dist/src/core/diff-hunks.js +7 -7
  262. package/dist/src/core/discard-baseline.d.ts +10 -10
  263. package/dist/src/core/discard-baseline.js +22 -23
  264. package/dist/src/core/display-state.d.ts +11 -11
  265. package/dist/src/core/display-state.js +12 -12
  266. package/dist/src/core/engine-changes.d.ts +2 -2
  267. package/dist/src/core/engine-changes.js +2 -2
  268. package/dist/src/core/engine-precondition.d.ts +5 -13
  269. package/dist/src/core/engine-precondition.js +5 -10
  270. package/dist/src/core/engine-session-lock.d.ts +18 -18
  271. package/dist/src/core/engine-session-lock.js +50 -54
  272. package/dist/src/core/export-moved-code-shape.d.ts +7 -7
  273. package/dist/src/core/export-moved-code-shape.js +10 -10
  274. package/dist/src/core/file-lock-owner.d.ts +103 -0
  275. package/dist/src/core/file-lock-owner.js +259 -0
  276. package/dist/src/core/file-lock.d.ts +14 -19
  277. package/dist/src/core/file-lock.js +90 -128
  278. package/dist/src/core/firefox-cache.d.ts +13 -1
  279. package/dist/src/core/firefox-cache.js +61 -36
  280. package/dist/src/core/firefox-download.d.ts +15 -0
  281. package/dist/src/core/firefox-download.js +38 -22
  282. package/dist/src/core/firefox-extract.d.ts +8 -7
  283. package/dist/src/core/firefox-extract.js +45 -27
  284. package/dist/src/core/firefox.d.ts +34 -36
  285. package/dist/src/core/firefox.js +13 -44
  286. package/dist/src/core/furnace-apply-dry-run.d.ts +1 -6
  287. package/dist/src/core/furnace-apply-dry-run.js +2 -8
  288. package/dist/src/core/furnace-apply-ftl.d.ts +5 -5
  289. package/dist/src/core/furnace-apply-ftl.js +8 -8
  290. package/dist/src/core/furnace-apply-helpers.d.ts +9 -20
  291. package/dist/src/core/furnace-apply-helpers.js +28 -39
  292. package/dist/src/core/furnace-apply-output.js +1 -1
  293. package/dist/src/core/furnace-apply-overwrite-warn.d.ts +9 -9
  294. package/dist/src/core/furnace-apply-overwrite-warn.js +13 -11
  295. package/dist/src/core/furnace-apply-undeploy-actions.d.ts +1 -1
  296. package/dist/src/core/furnace-apply-undeploy-actions.js +1 -1
  297. package/dist/src/core/furnace-apply.d.ts +4 -4
  298. package/dist/src/core/furnace-apply.js +50 -29
  299. package/dist/src/core/furnace-checksum-utils.d.ts +5 -5
  300. package/dist/src/core/furnace-checksum-utils.js +5 -5
  301. package/dist/src/core/furnace-config-custom.d.ts +1 -1
  302. package/dist/src/core/furnace-config-custom.js +2 -2
  303. package/dist/src/core/furnace-config-order.js +1 -1
  304. package/dist/src/core/furnace-config-tokens.d.ts +3 -3
  305. package/dist/src/core/furnace-config-tokens.js +3 -3
  306. package/dist/src/core/furnace-config-validate.js +2 -2
  307. package/dist/src/core/furnace-config.d.ts +5 -5
  308. package/dist/src/core/furnace-config.js +40 -53
  309. package/dist/src/core/furnace-constants.d.ts +6 -6
  310. package/dist/src/core/furnace-constants.js +9 -8
  311. package/dist/src/core/furnace-css-fragments.d.ts +6 -6
  312. package/dist/src/core/furnace-css-fragments.js +11 -11
  313. package/dist/src/core/furnace-dir-entry.d.ts +20 -0
  314. package/dist/src/core/furnace-dir-entry.js +21 -0
  315. package/dist/src/core/furnace-jsconfig.d.ts +7 -7
  316. package/dist/src/core/furnace-jsconfig.js +22 -20
  317. package/dist/src/core/furnace-operation.d.ts +22 -19
  318. package/dist/src/core/furnace-operation.js +38 -34
  319. package/dist/src/core/furnace-precondition.d.ts +10 -10
  320. package/dist/src/core/furnace-precondition.js +8 -8
  321. package/dist/src/core/furnace-refresh.d.ts +18 -6
  322. package/dist/src/core/furnace-refresh.js +5 -8
  323. package/dist/src/core/furnace-registration-ast.d.ts +2 -3
  324. package/dist/src/core/furnace-registration-ast.js +9 -12
  325. package/dist/src/core/furnace-registration-remove.d.ts +4 -4
  326. package/dist/src/core/furnace-registration-remove.js +6 -6
  327. package/dist/src/core/furnace-registration-validate.d.ts +2 -2
  328. package/dist/src/core/furnace-registration-validate.js +2 -2
  329. package/dist/src/core/furnace-registration.d.ts +7 -6
  330. package/dist/src/core/furnace-registration.js +29 -36
  331. package/dist/src/core/furnace-rollback.d.ts +1 -1
  332. package/dist/src/core/furnace-rollback.js +5 -5
  333. package/dist/src/core/furnace-scanner.js +3 -6
  334. package/dist/src/core/furnace-stale-export.d.ts +17 -16
  335. package/dist/src/core/furnace-stale-export.js +16 -15
  336. package/dist/src/core/furnace-staleness.d.ts +2 -2
  337. package/dist/src/core/furnace-staleness.js +2 -2
  338. package/dist/src/core/furnace-state-persist.d.ts +12 -12
  339. package/dist/src/core/furnace-state-persist.js +10 -10
  340. package/dist/src/core/furnace-step-errors.d.ts +6 -6
  341. package/dist/src/core/furnace-step-errors.js +6 -6
  342. package/dist/src/core/furnace-validate-accessibility.js +14 -14
  343. package/dist/src/core/furnace-validate-compatibility.js +9 -9
  344. package/dist/src/core/furnace-validate-registration.d.ts +2 -2
  345. package/dist/src/core/furnace-validate-registration.js +18 -20
  346. package/dist/src/core/furnace-validate-structure.d.ts +1 -1
  347. package/dist/src/core/furnace-validate-structure.js +4 -4
  348. package/dist/src/core/furnace-validate.js +9 -9
  349. package/dist/src/core/furnace-version-drift.d.ts +5 -5
  350. package/dist/src/core/furnace-version-drift.js +5 -5
  351. package/dist/src/core/git-base.d.ts +6 -4
  352. package/dist/src/core/git-base.js +29 -7
  353. package/dist/src/core/git-diff-new-file.d.ts +40 -0
  354. package/dist/src/core/git-diff-new-file.js +119 -0
  355. package/dist/src/core/git-diff.d.ts +13 -13
  356. package/dist/src/core/git-diff.js +121 -189
  357. package/dist/src/core/git-file-ops.d.ts +6 -13
  358. package/dist/src/core/git-file-ops.js +11 -35
  359. package/dist/src/core/git-readonly-index.d.ts +12 -14
  360. package/dist/src/core/git-readonly-index.js +12 -16
  361. package/dist/src/core/git-status.d.ts +9 -2
  362. package/dist/src/core/git-status.js +23 -11
  363. package/dist/src/core/git.d.ts +3 -9
  364. package/dist/src/core/git.js +28 -57
  365. package/dist/src/core/harness-orphans.d.ts +17 -17
  366. package/dist/src/core/harness-orphans.js +28 -27
  367. package/dist/src/core/history-log.d.ts +19 -0
  368. package/dist/src/core/history-log.js +29 -0
  369. package/dist/src/core/license-headers.d.ts +19 -18
  370. package/dist/src/core/license-headers.js +29 -28
  371. package/dist/src/core/mach-build-artifacts.d.ts +21 -21
  372. package/dist/src/core/mach-build-artifacts.js +23 -23
  373. package/dist/src/core/mach-error-hints.d.ts +5 -10
  374. package/dist/src/core/mach-error-hints.js +14 -14
  375. package/dist/src/core/mach-known-noise-filter.d.ts +42 -38
  376. package/dist/src/core/mach-known-noise-filter.js +57 -56
  377. package/dist/src/core/mach-mozconfig.d.ts +6 -6
  378. package/dist/src/core/mach-mozconfig.js +17 -16
  379. package/dist/src/core/mach-python.d.ts +3 -0
  380. package/dist/src/core/mach-python.js +13 -7
  381. package/dist/src/core/mach-resource-shim.d.ts +24 -12
  382. package/dist/src/core/mach-resource-shim.js +124 -21
  383. package/dist/src/core/mach.d.ts +59 -73
  384. package/dist/src/core/mach.js +47 -115
  385. package/dist/src/core/marionette-port.d.ts +15 -30
  386. package/dist/src/core/marionette-port.js +46 -89
  387. package/dist/src/core/marionette-preflight.d.ts +6 -6
  388. package/dist/src/core/marionette-preflight.js +32 -50
  389. package/dist/src/core/markdown-table.d.ts +9 -9
  390. package/dist/src/core/markdown-table.js +14 -14
  391. package/dist/src/core/mochitest-server-port.d.ts +8 -8
  392. package/dist/src/core/mochitest-server-port.js +17 -17
  393. package/dist/src/core/module-resolution-preflight.d.ts +8 -8
  394. package/dist/src/core/module-resolution-preflight.js +11 -11
  395. package/dist/src/core/moz-manifest-helpers.d.ts +7 -7
  396. package/dist/src/core/moz-manifest-helpers.js +7 -7
  397. package/dist/src/core/moz-manifest-register.d.ts +1 -1
  398. package/dist/src/core/moz-manifest-register.js +2 -2
  399. package/dist/src/core/moz-manifest-rules.js +46 -42
  400. package/dist/src/core/moz-manifest-tokenizers.js +1 -1
  401. package/dist/src/core/ownership-table.d.ts +5 -5
  402. package/dist/src/core/ownership-table.js +7 -7
  403. package/dist/src/core/parser-fallback.d.ts +3 -3
  404. package/dist/src/core/parser-fallback.js +3 -3
  405. package/dist/src/core/patch-apply-fuzz.d.ts +5 -5
  406. package/dist/src/core/patch-apply-fuzz.js +13 -13
  407. package/dist/src/core/patch-apply.d.ts +13 -14
  408. package/dist/src/core/patch-apply.js +36 -42
  409. package/dist/src/core/patch-export-coverage.d.ts +0 -9
  410. package/dist/src/core/patch-export-coverage.js +1 -30
  411. package/dist/src/core/patch-export-update.d.ts +21 -4
  412. package/dist/src/core/patch-export-update.js +7 -6
  413. package/dist/src/core/patch-export.d.ts +20 -30
  414. package/dist/src/core/patch-export.js +55 -77
  415. package/dist/src/core/patch-files.d.ts +0 -4
  416. package/dist/src/core/patch-files.js +0 -11
  417. package/dist/src/core/patch-identifier-suggest.d.ts +1 -1
  418. package/dist/src/core/patch-identifier-suggest.js +4 -4
  419. package/dist/src/core/patch-lint-binary.d.ts +12 -18
  420. package/dist/src/core/patch-lint-cache.d.ts +18 -2
  421. package/dist/src/core/patch-lint-cache.js +16 -19
  422. package/dist/src/core/patch-lint-checkjs.d.ts +55 -38
  423. package/dist/src/core/patch-lint-checkjs.js +78 -64
  424. package/dist/src/core/patch-lint-chrome-jsdoc.d.ts +8 -9
  425. package/dist/src/core/patch-lint-chrome-jsdoc.js +10 -11
  426. package/dist/src/core/patch-lint-creators.d.ts +5 -9
  427. package/dist/src/core/patch-lint-creators.js +3 -3
  428. package/dist/src/core/patch-lint-cross.d.ts +27 -19
  429. package/dist/src/core/patch-lint-cross.js +67 -110
  430. package/dist/src/core/patch-lint-css.d.ts +1 -1
  431. package/dist/src/core/patch-lint-css.js +15 -11
  432. package/dist/src/core/patch-lint-diff-tag.d.ts +5 -5
  433. package/dist/src/core/patch-lint-diff-tag.js +5 -5
  434. package/dist/src/core/patch-lint-diff.d.ts +4 -4
  435. package/dist/src/core/patch-lint-diff.js +4 -4
  436. package/dist/src/core/patch-lint-file-size.d.ts +3 -3
  437. package/dist/src/core/patch-lint-file-size.js +6 -6
  438. package/dist/src/core/patch-lint-forward-registration.d.ts +58 -0
  439. package/dist/src/core/patch-lint-forward-registration.js +210 -0
  440. package/dist/src/core/patch-lint-jsdoc.d.ts +2 -2
  441. package/dist/src/core/patch-lint-jsdoc.js +46 -46
  442. package/dist/src/core/patch-lint-module-registration.d.ts +3 -9
  443. package/dist/src/core/patch-lint-module-registration.js +1 -1
  444. package/dist/src/core/patch-lint-mozbuild.d.ts +1 -1
  445. package/dist/src/core/patch-lint-mozbuild.js +10 -10
  446. package/dist/src/core/patch-lint-observer.d.ts +3 -3
  447. package/dist/src/core/patch-lint-observer.js +7 -7
  448. package/dist/src/core/patch-lint-ownership.d.ts +6 -6
  449. package/dist/src/core/patch-lint-ownership.js +6 -6
  450. package/dist/src/core/patch-lint-prettier.d.ts +6 -6
  451. package/dist/src/core/patch-lint-prettier.js +7 -7
  452. package/dist/src/core/patch-lint-queue-types.d.ts +60 -0
  453. package/dist/src/core/patch-lint-queue-types.js +12 -0
  454. package/dist/src/core/patch-lint-staged-registration.d.ts +61 -0
  455. package/dist/src/core/patch-lint-staged-registration.js +90 -0
  456. package/dist/src/core/patch-lint-unmanaged-companion.d.ts +23 -23
  457. package/dist/src/core/patch-lint-unmanaged-companion.js +26 -26
  458. package/dist/src/core/patch-lint.d.ts +41 -35
  459. package/dist/src/core/patch-lint.js +52 -49
  460. package/dist/src/core/patch-lock.d.ts +1 -1
  461. package/dist/src/core/patch-lock.js +11 -11
  462. package/dist/src/core/patch-manifest-consistency.d.ts +7 -7
  463. package/dist/src/core/patch-manifest-consistency.js +16 -17
  464. package/dist/src/core/patch-manifest-files-affected.d.ts +1 -1
  465. package/dist/src/core/patch-manifest-files-affected.js +3 -3
  466. package/dist/src/core/patch-manifest-io.d.ts +14 -14
  467. package/dist/src/core/patch-manifest-io.js +35 -34
  468. package/dist/src/core/patch-manifest-query.d.ts +1 -1
  469. package/dist/src/core/patch-manifest-query.js +4 -4
  470. package/dist/src/core/patch-manifest-resolve.d.ts +5 -5
  471. package/dist/src/core/patch-manifest-resolve.js +7 -7
  472. package/dist/src/core/patch-manifest-validate.js +3 -3
  473. package/dist/src/core/patch-manifest.d.ts +2 -2
  474. package/dist/src/core/patch-manifest.js +2 -2
  475. package/dist/src/core/patch-parse.d.ts +32 -21
  476. package/dist/src/core/patch-parse.js +40 -15
  477. package/dist/src/core/patch-policy.js +15 -27
  478. package/dist/src/core/patch-registration-refs.d.ts +4 -4
  479. package/dist/src/core/patch-registration-refs.js +7 -7
  480. package/dist/src/core/patch-source-metadata.d.ts +1 -3
  481. package/dist/src/core/patch-source-metadata.js +0 -4
  482. package/dist/src/core/patch-transform.d.ts +8 -16
  483. package/dist/src/core/patch-transform.js +13 -23
  484. package/dist/src/core/process-cpu-time.d.ts +1 -1
  485. package/dist/src/core/process-cpu-time.js +6 -6
  486. package/dist/src/core/rebase-session.d.ts +9 -15
  487. package/dist/src/core/rebase-session.js +13 -25
  488. package/dist/src/core/register-browser-content.js +3 -2
  489. package/dist/src/core/register-browser-test.js +2 -1
  490. package/dist/src/core/register-module.js +2 -1
  491. package/dist/src/core/register-result.d.ts +1 -1
  492. package/dist/src/core/register-result.js +1 -1
  493. package/dist/src/core/register-scaffold.d.ts +2 -2
  494. package/dist/src/core/register-scaffold.js +8 -7
  495. package/dist/src/core/register-shared-css.d.ts +3 -3
  496. package/dist/src/core/register-shared-css.js +6 -5
  497. package/dist/src/core/register-xpcshell-test.d.ts +2 -2
  498. package/dist/src/core/register-xpcshell-test.js +2 -2
  499. package/dist/src/core/run-log-redact.d.ts +38 -0
  500. package/dist/src/core/run-log-redact.js +69 -0
  501. package/dist/src/core/run-log.d.ts +21 -10
  502. package/dist/src/core/run-log.js +76 -27
  503. package/dist/src/core/shared-ftl.d.ts +2 -2
  504. package/dist/src/core/shared-ftl.js +6 -6
  505. package/dist/src/core/signal-critical.d.ts +2 -2
  506. package/dist/src/core/signal-critical.js +4 -6
  507. package/dist/src/core/smoke-patterns.d.ts +5 -6
  508. package/dist/src/core/smoke-patterns.js +15 -20
  509. package/dist/src/core/state-file.d.ts +15 -4
  510. package/dist/src/core/state-file.js +14 -1
  511. package/dist/src/core/status-binary.d.ts +8 -8
  512. package/dist/src/core/status-binary.js +12 -12
  513. package/dist/src/core/status-classify.d.ts +17 -17
  514. package/dist/src/core/status-classify.js +13 -12
  515. package/dist/src/core/test-changed-prefs.d.ts +12 -12
  516. package/dist/src/core/test-changed-prefs.js +40 -25
  517. package/dist/src/core/test-harness-crash.d.ts +39 -39
  518. package/dist/src/core/test-harness-crash.js +69 -69
  519. package/dist/src/core/test-harness-output.d.ts +7 -7
  520. package/dist/src/core/test-harness-output.js +7 -7
  521. package/dist/src/core/test-harness-verdict-notes.d.ts +13 -14
  522. package/dist/src/core/test-harness-verdict-notes.js +4 -4
  523. package/dist/src/core/test-path-scope.d.ts +8 -8
  524. package/dist/src/core/test-path-scope.js +11 -11
  525. package/dist/src/core/test-stale-check.d.ts +22 -23
  526. package/dist/src/core/test-stale-check.js +31 -30
  527. package/dist/src/core/test-stale-symlink.d.ts +1 -1
  528. package/dist/src/core/test-stale-symlink.js +1 -1
  529. package/dist/src/core/test-stall-triage.d.ts +9 -9
  530. package/dist/src/core/test-stall-triage.js +22 -22
  531. package/dist/src/core/test-xpcshell-retry.d.ts +26 -7
  532. package/dist/src/core/test-xpcshell-retry.js +14 -11
  533. package/dist/src/core/token-category.d.ts +35 -2
  534. package/dist/src/core/token-category.js +67 -58
  535. package/dist/src/core/token-coverage.js +4 -5
  536. package/dist/src/core/token-dark-mode.d.ts +9 -9
  537. package/dist/src/core/token-dark-mode.js +13 -25
  538. package/dist/src/core/token-docs.d.ts +1 -1
  539. package/dist/src/core/token-inventory.d.ts +56 -0
  540. package/dist/src/core/token-inventory.js +109 -0
  541. package/dist/src/core/token-manager.d.ts +4 -4
  542. package/dist/src/core/token-manager.js +22 -22
  543. package/dist/src/core/token-scaffold.d.ts +4 -4
  544. package/dist/src/core/token-scaffold.js +4 -4
  545. package/dist/src/core/token-variant.d.ts +14 -14
  546. package/dist/src/core/token-variant.js +52 -53
  547. package/dist/src/core/toolchain-preflight.d.ts +15 -15
  548. package/dist/src/core/toolchain-preflight.js +23 -23
  549. package/dist/src/core/tree-cow.d.ts +3 -5
  550. package/dist/src/core/tree-cow.js +8 -8
  551. package/dist/src/core/tree-guard.d.ts +3 -3
  552. package/dist/src/core/tree-guard.js +23 -23
  553. package/dist/src/core/tree-store.d.ts +15 -15
  554. package/dist/src/core/tree-store.js +39 -38
  555. package/dist/src/core/typecheck-shim.d.ts +16 -15
  556. package/dist/src/core/typecheck-shim.js +26 -25
  557. package/dist/src/core/typecheck.d.ts +12 -12
  558. package/dist/src/core/typecheck.js +33 -33
  559. package/dist/src/core/wire-destroy.d.ts +2 -2
  560. package/dist/src/core/wire-destroy.js +5 -5
  561. package/dist/src/core/wire-dom-fragment.d.ts +3 -3
  562. package/dist/src/core/wire-dom-fragment.js +12 -23
  563. package/dist/src/core/wire-init.d.ts +2 -2
  564. package/dist/src/core/wire-init.js +7 -7
  565. package/dist/src/core/wire-subscript.d.ts +1 -1
  566. package/dist/src/core/wire-subscript.js +3 -3
  567. package/dist/src/core/wire-utils.d.ts +9 -9
  568. package/dist/src/core/wire-utils.js +16 -28
  569. package/dist/src/core/xpcshell-appdir.d.ts +20 -20
  570. package/dist/src/core/xpcshell-appdir.js +28 -30
  571. package/dist/src/core/xpcshell-profile-dir.d.ts +3 -3
  572. package/dist/src/core/xpcshell-profile-dir.js +7 -7
  573. package/dist/src/errors/base.d.ts +69 -16
  574. package/dist/src/errors/base.js +95 -26
  575. package/dist/src/errors/build.d.ts +6 -6
  576. package/dist/src/errors/build.js +26 -34
  577. package/dist/src/errors/codes.d.ts +10 -10
  578. package/dist/src/errors/codes.js +10 -10
  579. package/dist/src/errors/config.d.ts +0 -14
  580. package/dist/src/errors/config.js +13 -34
  581. package/dist/src/errors/download.d.ts +13 -0
  582. package/dist/src/errors/download.js +53 -24
  583. package/dist/src/errors/furnace.d.ts +2 -2
  584. package/dist/src/errors/furnace.js +8 -9
  585. package/dist/src/errors/git.d.ts +9 -9
  586. package/dist/src/errors/git.js +21 -31
  587. package/dist/src/errors/patch.d.ts +3 -3
  588. package/dist/src/errors/patch.js +11 -13
  589. package/dist/src/errors/rebase.d.ts +1 -1
  590. package/dist/src/errors/rebase.js +8 -8
  591. package/dist/src/errors/run.d.ts +1 -1
  592. package/dist/src/errors/run.js +1 -1
  593. package/dist/src/index.d.ts +4 -4
  594. package/dist/src/index.js +4 -4
  595. package/dist/src/types/commands/options.d.ts +155 -200
  596. package/dist/src/types/commands/patches.d.ts +19 -19
  597. package/dist/src/types/commands/project.d.ts +3 -3
  598. package/dist/src/types/config.d.ts +52 -19
  599. package/dist/src/types/furnace.d.ts +17 -17
  600. package/dist/src/types/index.d.ts +0 -1
  601. package/dist/src/types/json.d.ts +3 -3
  602. package/dist/src/types/json.js +2 -2
  603. package/dist/src/types/typecheck.d.ts +3 -3
  604. package/dist/src/utils/assert.d.ts +4 -16
  605. package/dist/src/utils/assert.js +7 -24
  606. package/dist/src/utils/build-info.d.ts +6 -6
  607. package/dist/src/utils/build-info.js +6 -6
  608. package/dist/src/utils/child-env.d.ts +7 -6
  609. package/dist/src/utils/child-env.js +5 -5
  610. package/dist/src/utils/concurrency.d.ts +2 -2
  611. package/dist/src/utils/concurrency.js +2 -2
  612. package/dist/src/utils/elapsed.js +10 -1
  613. package/dist/src/utils/errors.d.ts +8 -8
  614. package/dist/src/utils/errors.js +8 -8
  615. package/dist/src/utils/fs.d.ts +1 -1
  616. package/dist/src/utils/fs.js +15 -20
  617. package/dist/src/utils/hash.d.ts +12 -0
  618. package/dist/src/utils/hash.js +16 -0
  619. package/dist/src/utils/line-dispatch.d.ts +15 -0
  620. package/dist/src/utils/line-dispatch.js +48 -0
  621. package/dist/src/utils/logger.d.ts +4 -4
  622. package/dist/src/utils/logger.js +11 -11
  623. package/dist/src/utils/machine-output.js +2 -2
  624. package/dist/src/utils/options.d.ts +14 -20
  625. package/dist/src/utils/options.js +26 -27
  626. package/dist/src/utils/package-root.js +5 -14
  627. package/dist/src/utils/paths.d.ts +4 -4
  628. package/dist/src/utils/paths.js +4 -4
  629. package/dist/src/utils/platform.d.ts +0 -4
  630. package/dist/src/utils/process-group.d.ts +10 -9
  631. package/dist/src/utils/process-group.js +37 -36
  632. package/dist/src/utils/process.d.ts +70 -55
  633. package/dist/src/utils/process.js +129 -179
  634. package/dist/src/utils/ps-duration.d.ts +4 -4
  635. package/dist/src/utils/ps-duration.js +9 -9
  636. package/dist/src/utils/regex.d.ts +4 -4
  637. package/dist/src/utils/regex.js +7 -7
  638. package/dist/src/utils/sleep.d.ts +26 -0
  639. package/dist/src/utils/sleep.js +31 -0
  640. package/dist/src/utils/stdio-drain.d.ts +7 -7
  641. package/dist/src/utils/stdio-drain.js +8 -8
  642. package/dist/src/utils/validation.d.ts +12 -49
  643. package/dist/src/utils/validation.js +26 -36
  644. package/docs/README.md +2 -2
  645. package/docs/configuration.md +163 -69
  646. package/docs/exit-codes.md +66 -49
  647. package/docs/furnace.md +20 -19
  648. package/docs/lifecycle-invariants.md +414 -247
  649. package/docs/machine-output.md +58 -34
  650. package/docs/patch-workflow.md +48 -44
  651. package/docs/run-logs.md +72 -28
  652. package/docs/testing.md +105 -98
  653. package/docs/verification-trees.md +23 -22
  654. package/package.json +7 -6
  655. package/dist/src/commands/rebase.d.ts +0 -4
  656. package/dist/src/commands/rebase.js +0 -5
  657. package/dist/src/core/patch-artifact-normalize.d.ts +0 -21
  658. package/dist/src/core/patch-artifact-normalize.js +0 -24
  659. package/dist/src/core/patch-lint-reexports.d.ts +0 -7
  660. package/dist/src/core/patch-lint-reexports.js +0 -8
  661. package/dist/src/core/wire-targets.d.ts +0 -7
  662. package/dist/src/core/wire-targets.js +0 -8
@@ -16,8 +16,8 @@ function countByClassification(classified) {
16
16
  return byClassification;
17
17
  }
18
18
  /**
19
- * Full `--json` payload: summary plus the per-file `files[]` list, and —
20
- * under `--include-ownership` — the additive `ownership` block.
19
+ * Full `--json` payload: summary plus the per-file `files[]` list, and,
20
+ * under `--include-ownership`, the additive `ownership` block.
21
21
  * Additive within schemaVersion 1: a consumer that does not ask for the
22
22
  * block never sees the key.
23
23
  */
@@ -48,12 +48,13 @@ export function renderJsonStatus(classified, ownership) {
48
48
  setStdoutSealed(true);
49
49
  }
50
50
  /**
51
- * Summary-only `--json --summary` payload: counts always; when the
52
- * `--check`/`--fail-on` policy is active, a `check` block with the active
53
- * fail set, the verdict, and the offending files per fail-set
54
- * classification (sourced from the same collector as the human `--check`
55
- * message, so the two views can never disagree). The absent `files[]` is
56
- * the mode signal within schemaVersion 1 — consumers opt in via the flag.
51
+ * Summary-only `--json --summary` payload. Counts are always present. When
52
+ * the `--check`/`--fail-on` policy is active, the payload adds a `check`
53
+ * block with the active fail set, the verdict, and the offending files per
54
+ * fail-set classification (sourced from the same collector as the human
55
+ * `--check` message, so the two views can never disagree). The absent
56
+ * `files[]` is the mode signal within schemaVersion 1. Consumers opt in via
57
+ * the flag.
57
58
  */
58
59
  export function renderJsonSummaryStatus(classified, policy, ownership) {
59
60
  const output = {
@@ -14,10 +14,10 @@ export declare function renderUnmanagedOnly(unmanagedFiles: ClassifiedFile[], to
14
14
  /** Renders the default classified status buckets. */
15
15
  export declare function renderDefaultStatus(totalModified: number, buckets: ClassifiedBuckets, projectRoot: string, binaryName: string): Promise<void>;
16
16
  /**
17
- * Renders `fireforge status --test-coverage`: a READ-ONLY view of the last
17
+ * Renders `fireforge status --test-coverage`: a read-only view of the last
18
18
  * build baseline's test-packaging coverage. Without it, the only way to
19
- * learn the recorded coverage scope — which concurrent sessions sharing one
20
- * engine tree overwrite constantly — is to trip the out-of-coverage refusal
19
+ * learn the recorded coverage scope (which concurrent sessions sharing one
20
+ * engine tree overwrite constantly) is to trip the out-of-coverage refusal
21
21
  * on a real test run.
22
22
  */
23
23
  export declare function renderTestCoverageStatus(baseline: BuildBaseline | undefined): void;
@@ -191,10 +191,10 @@ export async function renderDefaultStatus(totalModified, buckets, projectRoot, b
191
191
  outro(parts.join(', '));
192
192
  }
193
193
  /**
194
- * Renders `fireforge status --test-coverage`: a READ-ONLY view of the last
194
+ * Renders `fireforge status --test-coverage`: a read-only view of the last
195
195
  * build baseline's test-packaging coverage. Without it, the only way to
196
- * learn the recorded coverage scope — which concurrent sessions sharing one
197
- * engine tree overwrite constantly — is to trip the out-of-coverage refusal
196
+ * learn the recorded coverage scope (which concurrent sessions sharing one
197
+ * engine tree overwrite constantly) is to trip the out-of-coverage refusal
198
198
  * on a real test run.
199
199
  */
200
200
  export function renderTestCoverageStatus(baseline) {
@@ -219,7 +219,7 @@ export function renderTestCoverageStatus(baseline) {
219
219
  return;
220
220
  }
221
221
  const list = coverage.map((path) => ` - ${path}`).join('\n');
222
- info(`Test packaging coverage: scoped to ${String(coverage.length)} path(s):\n${list}\n` +
222
+ info(`Test packaging coverage: scoped to ${coverage.length} path(s):\n${list}\n` +
223
223
  'A "fireforge test" over paths outside this list will be refused as uncovered.');
224
- outro(`Coverage: scoped (${String(coverage.length)} paths)`);
224
+ outro(`Coverage: scoped (${coverage.length} paths)`);
225
225
  }
@@ -1,11 +1,11 @@
1
1
  /**
2
2
  * Ownership-table assembly for `status`, split out of `status.ts` so the
3
3
  * human `--ownership` mode and the additive `ownership` block on the
4
- * `--json` payload build the SAME rows from the SAME scan.
4
+ * `--json` payload build the same rows from the same scan.
5
5
  *
6
6
  * A separate `--ownership` branch re-implements the shared scan and inlines
7
7
  * a second copy of the classification call, then discards everything but
8
- * each file's classification — so three back-to-back `status` invocations in
8
+ * each file's classification, so three back-to-back `status` invocations in
9
9
  * a gate pay three full worktree scans. Both callers hand this module the
10
10
  * already-classified files instead.
11
11
  *
@@ -29,7 +29,7 @@ export interface OwnershipJsonBlock {
29
29
  /**
30
30
  * Builds the flat path→owning-patch rows. Sources are the manifest's
31
31
  * `filesAffected`, worktree drift, and the cross-patch
32
- * duplicate-new-file-creation map produced by walking each patch body — the
32
+ * duplicate-new-file-creation map produced by walking each patch body, the
33
33
  * last being what keeps `status --ownership` aligned with `fireforge verify`
34
34
  * (see `buildOwnershipTable`'s header).
35
35
  *
@@ -2,11 +2,11 @@
2
2
  /**
3
3
  * Ownership-table assembly for `status`, split out of `status.ts` so the
4
4
  * human `--ownership` mode and the additive `ownership` block on the
5
- * `--json` payload build the SAME rows from the SAME scan.
5
+ * `--json` payload build the same rows from the same scan.
6
6
  *
7
7
  * A separate `--ownership` branch re-implements the shared scan and inlines
8
8
  * a second copy of the classification call, then discards everything but
9
- * each file's classification — so three back-to-back `status` invocations in
9
+ * each file's classification, so three back-to-back `status` invocations in
10
10
  * a gate pay three full worktree scans. Both callers hand this module the
11
11
  * already-classified files instead.
12
12
  *
@@ -19,7 +19,7 @@ import { pathExists } from '../utils/fs.js';
19
19
  /**
20
20
  * Builds the flat path→owning-patch rows. Sources are the manifest's
21
21
  * `filesAffected`, worktree drift, and the cross-patch
22
- * duplicate-new-file-creation map produced by walking each patch body — the
22
+ * duplicate-new-file-creation map produced by walking each patch body, the
23
23
  * last being what keeps `status --ownership` aligned with `fireforge verify`
24
24
  * (see `buildOwnershipTable`'s header).
25
25
  *
@@ -15,7 +15,7 @@ import { GeneralError, InvalidArgumentError } from '../errors/base.js';
15
15
  import { FIREFORGE_TMP_PATH_PATTERN, pathExists } from '../utils/fs.js';
16
16
  import { info, intro, isMachineOutputMode, outro, setMachineOutputMode, warn, } from '../utils/logger.js';
17
17
  import { emitMachineError } from '../utils/machine-output.js';
18
- import { resolveStatusCheckPolicy, runStatusCheck } from './status-check.js';
18
+ import { resolveStatusCheckPolicy, runStatusCheck, } from './status-check.js';
19
19
  import { renderJsonStatus, renderJsonSummaryStatus } from './status-json.js';
20
20
  import { renderDefaultStatus, renderTestCoverageStatus, renderUnmanagedOnly, } from './status-output.js';
21
21
  import { buildOwnershipJsonBlock, collectOwnershipRows, summarizeOwnership, } from './status-ownership.js';
@@ -29,7 +29,7 @@ function renderRawStatus(files) {
29
29
  }
30
30
  }
31
31
  // Resolved lazily at first use (shared with core/git-status): this module
32
- // is imported by the command manifest for EVERY command, so a
32
+ // is imported by the command manifest for every command, so a
33
33
  // module-load-time parse printed the status-specific env warning during
34
34
  // `fireforge build` etc.
35
35
  let maxUntrackedFilesPerDir;
@@ -54,8 +54,8 @@ async function expandDirectoryEntries(files, engineDir) {
54
54
  const individualFiles = await getUntrackedFilesInDir(engineDir, entry.file);
55
55
  const cap = getMaxUntrackedFilesPerDir();
56
56
  if (individualFiles.length > cap) {
57
- // Recorded once here, reported once by renderTruncationBanner —
58
- // the previous per-directory warn duplicated the banner's content.
57
+ // Recorded once here, reported once by renderTruncationBanner. The
58
+ // previous per-directory warn duplicated the banner's content.
59
59
  truncations.push({
60
60
  dir: entry.file,
61
61
  total: individualFiles.length,
@@ -78,7 +78,7 @@ async function expandDirectoryEntries(files, engineDir) {
78
78
  * FireForge's own `writeText` produces (see
79
79
  * {@link import('../utils/fs.js').FIREFORGE_TMP_PATH_PATTERN}). Those
80
80
  * files only exist for the duration of a write + rename and should
81
- * never appear in `status` output; filtering them here keeps every
81
+ * never appear in `status` output. Filtering them here keeps every
82
82
  * status mode (default, raw, unmanaged, ownership, json) symmetric so
83
83
  * the operator never sees a `.mozconfig.fireforge-tmp-<pid>-<uuid>`
84
84
  * entry mid-write. Files named for unrelated reasons (e.g. a user's
@@ -116,11 +116,11 @@ async function scanEngineStatusFiles(engineDir, requireGitRepository) {
116
116
  }
117
117
  /**
118
118
  * Emits the `--json` payload (full or `--summary`) and applies the `--check`
119
- * policy, which stays the SOLE exit driver on this path.
119
+ * policy, which stays the only exit driver on this path.
120
120
  *
121
- * `--include-ownership` is a MODIFIER, not a mode: it appends an ownership
122
- * block without touching exit semantics, so an ownership conflict still
123
- * fails only the human `--ownership` mode.
121
+ * `--include-ownership` is a modifier rather than a mode: it appends an
122
+ * ownership block without touching exit semantics, so an ownership
123
+ * conflict still fails only the human `--ownership` mode.
124
124
  *
125
125
  * @param classified - Classified worktree entries
126
126
  * @param files - The same entries pre-classification, for ownership rows
@@ -141,8 +141,8 @@ async function renderJsonMode(classified, files, paths, options, checkPolicy) {
141
141
  runStatusCheck(classified, checkPolicy);
142
142
  }
143
143
  /**
144
- * Detects the "unborn HEAD" aftermath of an interrupted `fireforge download`
145
- * — git init succeeded but the initial Firefox source commit was never
144
+ * Detects the "unborn HEAD" aftermath of an interrupted `fireforge download`:
145
+ * git init succeeded but the initial Firefox source commit was never
146
146
  * created, so every file in engine/ reads as untracked. On a ~600 MB
147
147
  * Firefox tree this would flood the output with hundreds of thousands of
148
148
  * entries and a truncation warning, which is technically correct but not
@@ -189,7 +189,7 @@ export async function statusCommand(projectRoot, options = {}) {
189
189
  if (shouldUseMachineOutput) {
190
190
  setMachineOutputMode(true);
191
191
  }
192
- // On a throw, machine mode deliberately stays ENGAGED: withErrorHandling
192
+ // On a throw, machine mode stays engaged: withErrorHandling
193
193
  // routes the styled error to stderr while the mode is on and resets it
194
194
  // centrally. A mid-throw restore here would put the refusal on stdout
195
195
  // after the JSON payload.
@@ -198,7 +198,7 @@ export async function statusCommand(projectRoot, options = {}) {
198
198
  setMachineOutputMode(previousMachineOutputMode);
199
199
  }
200
200
  }
201
- /** The status body proper; the machine-mode lifecycle lives in {@link statusCommand}. */
201
+ /** The status body proper. The machine-mode lifecycle lives in {@link statusCommand}. */
202
202
  async function runStatusCommandBody(projectRoot, options) {
203
203
  const modeCount = [
204
204
  options.raw,
@@ -211,12 +211,12 @@ async function runStatusCommandBody(projectRoot, options) {
211
211
  if (modeCount > 1) {
212
212
  throw new GeneralError('Cannot use --raw, --unmanaged, --ownership, --test-coverage, --lock, and --json together. Pick at most one.');
213
213
  }
214
- // --summary elides the files[] payload for gate consumers;
215
- // it only makes sense on the JSON shape.
214
+ // --summary elides the files[] payload for gate consumers. It only
215
+ // makes sense on the JSON shape.
216
216
  if (options.summary === true && options.json !== true) {
217
217
  throw new InvalidArgumentError('--summary requires --json.', '--summary');
218
218
  }
219
- // --include-ownership adds a block to the JSON payload; it is meaningless
219
+ // --include-ownership adds a block to the JSON payload. It is meaningless
220
220
  // on the human views, where --ownership is the mode that renders the
221
221
  // table.
222
222
  if (options.includeOwnership === true && options.json !== true) {
@@ -253,19 +253,18 @@ async function runStatusCommandBody(projectRoot, options) {
253
253
  const config = await loadConfig(projectRoot);
254
254
  // Shared envelope: see src/utils/machine-output.ts and
255
255
  // docs/machine-output.md. `status` was the only command that had one.
256
- const emitJsonError = emitMachineError;
257
- // Ownership mode is a flat file→patch table; sources are the manifest's
256
+ // Ownership mode is a flat file→patch table. Sources are the manifest's
258
257
  // filesAffected, any worktree drift, and the cross-patch
259
258
  // duplicate-new-file-creation map produced by walking each patch body. The
260
259
  // last is what keeps `status --ownership` aligned with `fireforge verify`
261
- // — see buildOwnershipTable's header. Runs before the default classify
260
+ // (see buildOwnershipTable's header). Runs before the default classify
262
261
  // path so it can short-circuit without computing patch-backed state.
263
262
  if (options.ownership) {
264
- // Rung 1 only, deliberately — see the note below on why this branch
265
- // does not take the full assertEngineGitReady ladder.
263
+ // Rung 1 only. See the note below on why this branch does not take the
264
+ // full assertEngineGitReady ladder.
266
265
  await assertEngineExists(paths.engine);
267
266
  const manifest = await loadPatchesManifest(paths.patches);
268
- // Same scan and the SAME classification pass as every other mode.
267
+ // The same scan and the same classification pass as every other mode.
269
268
  // This branch keeps its historical guard shape on purpose:
270
269
  // no baseline-commit assertion, and a non-git engine degrades to an
271
270
  // empty table rather than the recovery banner.
@@ -287,19 +286,19 @@ async function runStatusCommandBody(projectRoot, options) {
287
286
  return;
288
287
  }
289
288
  // Not routed through assertEngineExists: the --json contract requires a
290
- // machine-readable payload on stdout BEFORE the throw, so scripted
289
+ // machine-readable payload on stdout before the throw, so scripted
291
290
  // consumers get a parseable refusal instead of a bare non-zero exit. The
292
291
  // message is kept identical to the helper's on purpose.
293
292
  if (!(await pathExists(paths.engine))) {
294
293
  if (options.json) {
295
- emitJsonError('engine-missing', 'Firefox source not found. Run "fireforge download" first.');
294
+ emitMachineError('engine-missing', 'Firefox source not found. Run "fireforge download" first.');
296
295
  }
297
296
  throw new GeneralError('Firefox source not found. Run "fireforge download" first.');
298
297
  }
299
298
  // Check if it's a git repository
300
299
  if (!(await isGitRepository(paths.engine))) {
301
300
  if (options.json) {
302
- emitJsonError('engine-not-git', 'Engine directory is not a git repository. Run "fireforge download" to initialize.');
301
+ emitMachineError('engine-not-git', 'Engine directory is not a git repository. Run "fireforge download" to initialize.');
303
302
  }
304
303
  throw new GeneralError('Engine directory is not a git repository. Run "fireforge download" to initialize.');
305
304
  }
@@ -317,7 +316,7 @@ async function runStatusCommandBody(projectRoot, options) {
317
316
  }
318
317
  // `--raw` consumers parse the native `git status --porcelain` output
319
318
  // directly. On a clean tree the raw mode should produce nothing on
320
- // stdout — the human "Working tree clean" banner would contaminate the
319
+ // stdout: the human "Working tree clean" banner would contaminate the
321
320
  // pipe. Short-circuit before the human clean-tree branch below.
322
321
  if (options.raw && files.length === 0) {
323
322
  return;
@@ -3,17 +3,17 @@
3
3
  * the per-file line budget): the incremental protected mach build with
4
4
  * its baseline write, and the `--build-only` union-build shape.
5
5
  */
6
- import type { getProjectPaths, loadConfig } from '../core/config.js';
7
6
  import type { TestOptions } from '../types/commands/index.js';
7
+ import type { FireForgeConfig, ProjectPaths } from '../types/config.js';
8
8
  import type { HarnessClassification } from './test-modes.js';
9
9
  /**
10
10
  * Runs the pre-test build (or the stale-build gate when no build was
11
- * requested). Returns `true` when the run is COMPLETE — the `--build-only`
11
+ * requested). Returns `true` when the run is complete: the `--build-only`
12
12
  * union-build shape, which packages every requested path
13
13
  * (mixed harnesses legal, nothing dispatches), prints the per-harness
14
14
  * next steps, and emits the run's single `PASS` verdict.
15
15
  */
16
- export declare function runTestBuildPhase(projectRoot: string, paths: ReturnType<typeof getProjectPaths>, projectConfig: Awaited<ReturnType<typeof loadConfig>>, harnessRetries: number, options: TestOptions, request: {
16
+ export declare function runTestBuildPhase(projectRoot: string, paths: ProjectPaths, projectConfig: FireForgeConfig, harnessRetries: number, options: TestOptions, request: {
17
17
  classification: HarnessClassification;
18
18
  normalizedPaths: string[];
19
19
  }): Promise<boolean>;
@@ -16,12 +16,19 @@ import { info, notice, spinner, verbose } from '../utils/logger.js';
16
16
  import { reportBuildOnlyCompletion } from './test-modes.js';
17
17
  import { enforceStaleBuildGate, enforceStaticComponentsGate } from './test-stale-gate.js';
18
18
  import { emitPassVerdict } from './test-verdict.js';
19
- async function runPreTestBuild(projectRoot, paths, projectConfig, harnessRetries, testPackagingCoverage, refuseUnexportedDrift, extend) {
19
+ /**
20
+ * Runs the incremental pre-test build under the build lock and records the
21
+ * baseline it produced.
22
+ *
23
+ * @param options - See {@link RunPreTestBuildOptions}
24
+ */
25
+ async function runPreTestBuild(options) {
26
+ const { projectRoot, paths, projectConfig, harnessRetries, testPackagingCoverage, refuseUnexportedDrift, extend, } = options;
20
27
  await withBuildLock(projectRoot, async () => {
21
28
  // Pass the previous baseline exactly like `fireforge build` does, so
22
29
  // auto-configure runs under the same conditions on both paths. The
23
30
  // pre-test build must never invalidate more of the objdir than a plain
24
- // `mach build faster` would — a failed pre-test build followed by a full
31
+ // `mach build faster` would: a failed pre-test build followed by a full
25
32
  // rebuild is an hour where an incremental one would have sufficed.
26
33
  const previousBaseline = await readBuildBaseline(projectRoot);
27
34
  const preparation = await prepareBuildEnvironment(projectRoot, paths, projectConfig, {
@@ -30,8 +37,8 @@ async function runPreTestBuild(projectRoot, paths, projectConfig, harnessRetries
30
37
  });
31
38
  // The mozconfig half of the --extend-coverage anchor can
32
39
  // only be checked once prepareBuildEnvironment has regenerated
33
- // engine/mozconfig — that is the file this build will configure with —
34
- // and must still be checked before mach, so a refusal costs no build.
40
+ // engine/mozconfig (the file this build will configure with), and must
41
+ // still be checked before mach, so a refusal costs no build.
35
42
  if (extend !== undefined) {
36
43
  const mozconfigAnchor = await checkExtendMozconfigAnchor(paths.engine, previousBaseline);
37
44
  if (!mozconfigAnchor.ok) {
@@ -40,7 +47,7 @@ async function runPreTestBuild(projectRoot, paths, projectConfig, harnessRetries
40
47
  }
41
48
  const buildKind = preparation.fullBuildRequired ? 'full' : 'faster';
42
49
  if (preparation.fullBuildRequired) {
43
- // Warning severity, not info: agent-facing output filters
50
+ // Warning severity rather than info: agent-facing output filters
44
51
  // keep warnings and errors only, and this is the line that explains an
45
52
  // otherwise unexplained multi-minute build.
46
53
  notice(preparation.fullBuildReason ??
@@ -53,7 +60,7 @@ async function runPreTestBuild(projectRoot, paths, projectConfig, harnessRetries
53
60
  // `fireforge build` / `build --ui`: in-venv resource-monitor guard plus
54
61
  // the uniform recognized-crash retry budget, with a fresh mach process
55
62
  // (and fresh guard install) per attempt. prepareBuildEnvironment runs
56
- // ONCE, outside the retry loop — retries never re-run mach configure.
63
+ // once, outside the retry loop. Retries never re-run mach configure.
57
64
  const result = await runProtectedMachBuild(buildKind, paths.engine, {
58
65
  retries: harnessRetries,
59
66
  onRetry: (signature, nextAttempt, maxAttempts) => {
@@ -70,10 +77,10 @@ async function runPreTestBuild(projectRoot, paths, projectConfig, harnessRetries
70
77
  // coverage claim is scoped to the requested test paths, since a
71
78
  // file-scoped `test --build` only guarantees packaging for those
72
79
  // manifests. The previous baseline is passed through so a scoped write
73
- // carries the static-components anchor forward — `mach build faster`
74
- // does not rebake components.conf into the compiled table.
80
+ // carries the static-components anchor forward, since `mach build
81
+ // faster` does not rebake components.conf into the compiled table.
75
82
  try {
76
- // Under --extend-coverage the claim is the UNION of the previous
83
+ // Under --extend-coverage the claim is the union of the previous
77
84
  // record and this build's paths, and the static-components anchor
78
85
  // is always carried forward: that union can evaluate to 'full'
79
86
  // while the build behind it was a scoped `mach build faster` that
@@ -81,11 +88,20 @@ async function runPreTestBuild(projectRoot, paths, projectConfig, harnessRetries
81
88
  const recordedCoverage = extend !== undefined
82
89
  ? unionTestPackagingCoverage(previousBaseline?.testPackagingCoverage, extend.requestedPaths)
83
90
  : testPackagingCoverage;
84
- await writeBuildBaseline(projectRoot, paths.engine, projectConfig.binaryName, recordedCoverage, previousBaseline, describeBuildInvocation(extend !== undefined, testPackagingCoverage), preparation.fullBuildRequired
85
- ? 'refresh'
86
- : extend !== undefined
87
- ? 'carry-forward'
88
- : 'auto', buildKind);
91
+ await writeBuildBaseline({
92
+ projectRoot,
93
+ engineDir: paths.engine,
94
+ binaryName: projectConfig.binaryName,
95
+ testPackagingCoverage: recordedCoverage,
96
+ previousBaseline,
97
+ recordedBy: describeBuildInvocation(extend !== undefined, testPackagingCoverage),
98
+ staticComponentsHandling: preparation.fullBuildRequired
99
+ ? 'refresh'
100
+ : extend !== undefined
101
+ ? 'carry-forward'
102
+ : 'auto',
103
+ buildKind,
104
+ });
89
105
  }
90
106
  catch (baselineError) {
91
107
  verbose(`Could not persist build baseline: ${toError(baselineError).message}`);
@@ -99,10 +115,10 @@ async function runPreTestBuild(projectRoot, paths, projectConfig, harnessRetries
99
115
  });
100
116
  }
101
117
  /**
102
- * `--extend-coverage` only means something for a SCOPED build: it unions
118
+ * `--extend-coverage` only means something for a scoped build: it unions
103
119
  * this build's paths onto the recorded claim. Without `--build`/
104
120
  * `--build-only` there is no build to extend from, and a path-less build
105
- * records `'full'`, which already covers everything — refusing both is more
121
+ * records `'full'`, which already covers everything. Refusing both is more
106
122
  * honest than silently ignoring the flag.
107
123
  */
108
124
  function assertExtendCoverageUsage(options, normalizedPaths) {
@@ -115,9 +131,9 @@ function assertExtendCoverageUsage(options, normalizedPaths) {
115
131
  }
116
132
  /**
117
133
  * Refuses `--refuse-unexported-drift` on a run that dispatches no build.
118
- * The flag governs the PRE-TEST build only, so accepting it without
119
- * `--build`/`--build-only` would arm a belt over work that never happens —
120
- * exactly the silent no-op this release fixes elsewhere.
134
+ * The flag governs the pre-test build only, so accepting it without
135
+ * `--build`/`--build-only` would arm a belt over work that never happens,
136
+ * the same silent no-op this release fixes elsewhere.
121
137
  */
122
138
  function assertRefuseUnexportedDriftUsage(options) {
123
139
  if (options.refuseUnexportedDrift !== true)
@@ -135,7 +151,7 @@ function describeBuildInvocation(extending, coverage) {
135
151
  }
136
152
  /**
137
153
  * Runs the pre-test build (or the stale-build gate when no build was
138
- * requested). Returns `true` when the run is COMPLETE — the `--build-only`
154
+ * requested). Returns `true` when the run is complete: the `--build-only`
139
155
  * union-build shape, which packages every requested path
140
156
  * (mixed harnesses legal, nothing dispatches), prints the per-harness
141
157
  * next steps, and emits the run's single `PASS` verdict.
@@ -148,8 +164,8 @@ export async function runTestBuildPhase(projectRoot, paths, projectConfig, harne
148
164
  }
149
165
  assertRefuseUnexportedDriftUsage(options);
150
166
  if (options.build || options.buildOnly) {
151
- // A path-less `test --build` runs (and packages for) the full suite;
152
- // a scoped invocation only vouches for the requested paths. A SCOPED
167
+ // A path-less `test --build` runs (and packages for) the full suite.
168
+ // A scoped invocation only vouches for the requested paths. A scoped
153
169
  // rebuild also cannot regenerate the compiled StaticComponents table,
154
170
  // so it runs the components.conf gate up-front (the path-less shape
155
171
  // refreshes the anchor itself and skips it).
@@ -166,12 +182,20 @@ export async function runTestBuildPhase(projectRoot, paths, projectConfig, harne
166
182
  }
167
183
  }
168
184
  }
169
- await runPreTestBuild(projectRoot, paths, projectConfig, harnessRetries, coverage, options.refuseUnexportedDrift === true, extending ? { requestedPaths: normalizedPaths } : undefined);
185
+ await runPreTestBuild({
186
+ projectRoot,
187
+ paths,
188
+ projectConfig,
189
+ harnessRetries,
190
+ testPackagingCoverage: coverage,
191
+ refuseUnexportedDrift: options.refuseUnexportedDrift === true,
192
+ extend: extending ? { requestedPaths: normalizedPaths } : undefined,
193
+ });
170
194
  info('');
171
195
  if (options.buildOnly) {
172
196
  // Union build for mixed harnesses: the coverage claim
173
197
  // above lists every requested path, so each harness half can run
174
- // build-less against this packaging. Nothing dispatches here; the
198
+ // build-less against this packaging. Nothing dispatches here. The
175
199
  // run still ends with exactly one verdict line.
176
200
  reportBuildOnlyCompletion(classification, normalizedPaths);
177
201
  emitPassVerdict();
@@ -11,7 +11,7 @@ import type { TestRunOutcome } from './test-run.js';
11
11
  /**
12
12
  * Applies the harness-run verdict for a single (non-sharded) invocation:
13
13
  * exhausted harness-crash retries and silent zero-TEST-START runs are
14
- * harness problems with their own messages; everything else flows into
14
+ * harness problems with their own messages. Everything else flows into
15
15
  * the regular non-zero-exit diagnosis chain.
16
16
  */
17
17
  export declare function finalizeSingleRunOutcome(outcome: TestRunOutcome, normalizedPaths: string[], binaryName: string, postRebuildContext: PostRebuildFailureContext | undefined, headless?: boolean): void;
@@ -34,11 +34,11 @@ function buildStaleBuildMessage(postRebuild) {
34
34
  'Re-run "fireforge build --ui" or "fireforge test --build" and then retry.');
35
35
  }
36
36
  function hasStaleBuildArtifactsSignal(output) {
37
- // Deliberately narrow: only fire on branding-specific resource paths that
37
+ // Narrow on purpose: only fire on branding-specific resource paths that
38
38
  // are always a stale-artifact symptom. A pattern that also matches
39
39
  // `resource:///modules/distribution.sys.mjs` fires on real packaging and
40
- // module-resolution failures too — a fork's own `.sys.mjs` missing from
41
- // the installed app dir after a successful build — pushing operators
40
+ // module-resolution failures too (a fork's own `.sys.mjs` missing from
41
+ // the installed app dir after a successful build), pushing operators
42
42
  // toward "rebuild" advice for a module-registration issue.
43
43
  return (/chrome:\/\/branding\/locale\/brand\.properties/i.test(output) ||
44
44
  /browser\/branding\/[^/\s]+\/moz\.build/i.test(output));
@@ -48,7 +48,7 @@ function hasStaleBuildArtifactsSignal(output) {
48
48
  *
49
49
  * A fork's test failing with `Failed to load
50
50
  * resource:///modules/<binary>/Store.sys.mjs` can also match the branding
51
- * pattern, because the harness prints a branding warning during teardown —
51
+ * pattern, because the harness prints a branding warning during teardown,
52
52
  * and the stale-build branch then wins by precedence, telling the operator
53
53
  * to rebuild when the real fix is to register the module in the fork's
54
54
  * `browser/modules/<binary>/moz.build`. Matching a
@@ -56,8 +56,8 @@ function hasStaleBuildArtifactsSignal(output) {
56
56
  */
57
57
  function hasForkModuleSignal(output, binaryName) {
58
58
  // `binaryName` comes from fireforge.json, and config validation bars only
59
- // `..`, path separators, NUL and absolute paths — regex metacharacters get
60
- // through. A hand-written character class is easy to get wrong (one that
59
+ // `..`, path separators, NUL and absolute paths, so regex metacharacters
60
+ // get through. A hand-written character class is easy to get wrong (one that
61
61
  // closes early after an escaped backslash escapes nothing), which makes
62
62
  // `my.browser` match `myXbrowser` and lets an unbalanced `(` or `[` throw
63
63
  // a SyntaxError out of the failure-diagnosis path, replacing the real test
@@ -77,8 +77,8 @@ function buildForkModuleMessage(binaryName) {
77
77
  '/<file>.sys.mjs` to add the EXTRA_JS_MODULES entry if it is missing.');
78
78
  }
79
79
  // Detects the broader xpcshell symptom where every `resource:///modules/...`
80
- // import fails — the signature of xpcshell running with the wrong app-dir on
81
- // a manifest that sets `firefox-appdir = "browser"`. Checked AFTER the
80
+ // import fails, the signature of xpcshell running with the wrong app-dir on
81
+ // a manifest that sets `firefox-appdir = "browser"`. Checked after the
82
82
  // stale-build signal (which matches the narrower `distribution.sys.mjs`
83
83
  // path) so the more specific diagnosis wins when both patterns apply.
84
84
  function hasXpcshellAppdirSignal(output) {
@@ -110,7 +110,7 @@ function buildHarnessSymlinkMessage() {
110
110
  }
111
111
  // Detects the `AttributeError: 'MochitestDesktop' object has no attribute
112
112
  // 'http3Server'` teardown crash. The attribute is lazy-initialized inside
113
- // harness code paths that presume chrome://branding resolves correctly; a
113
+ // harness code paths that presume chrome://branding resolves correctly. A
114
114
  // missing or miswired branding registration short-circuits the setup and
115
115
  // leaves the cleanup path looking up an attribute that was never assigned.
116
116
  function hasMochitestHttp3ServerSignal(output) {
@@ -136,7 +136,7 @@ function buildMochitestHttp3ServerMessage() {
136
136
  function handleNonZeroTestExit(result, normalizedPaths, appdirInjectionAttempted, binaryName, postRebuildContext,
137
137
  /**
138
138
  * The classified verdict, when one was reached. Carries the failing-test
139
- * evidence the final throw names; every branch ABOVE that throw is a
139
+ * evidence the final throw names. Every branch above that throw is a
140
140
  * different diagnosis and does not use it.
141
141
  */
142
142
  verdict) {
@@ -176,7 +176,7 @@ verdict) {
176
176
  // fails to resolve, the fix really is "rebuild", not "pass --app-path".
177
177
  // The stale-build check is narrow enough not to match
178
178
  // `resource:///modules/distribution.sys.mjs` alone, which produced
179
- // false-positive rebuild advice on fork-custom module-load failures; those
179
+ // false-positive rebuild advice on fork-custom module-load failures. Those
180
180
  // cases fall through to xpcshell-appdir, the more useful diagnosis for
181
181
  // `Failed to load resource:///modules/…`.
182
182
  if (hasStaleBuildArtifactsSignal(combinedOutput)) {
@@ -198,7 +198,7 @@ verdict) {
198
198
  info('Run "fireforge register <test-path>" to register it.');
199
199
  }
200
200
  // Last, and additive rather than a branch of its own: the run really did
201
- // fail (exit code stays 5), so this only says WHICH KIND of failure it is.
201
+ // fail (exit code stays 5), so this only says which kind of failure it is.
202
202
  // Every branch above is a different diagnosis and outranks it.
203
203
  const changedPrefNoise = describeChangedPrefNoise(combinedOutput);
204
204
  const failureBlocks = formatFailureBlocks(verdict?.realFailureBlocks);
@@ -209,12 +209,12 @@ verdict) {
209
209
  /**
210
210
  * Applies the harness-run verdict for a single (non-sharded) invocation:
211
211
  * exhausted harness-crash retries and silent zero-TEST-START runs are
212
- * harness problems with their own messages; everything else flows into
212
+ * harness problems with their own messages. Everything else flows into
213
213
  * the regular non-zero-exit diagnosis chain.
214
214
  */
215
215
  export function finalizeSingleRunOutcome(outcome, normalizedPaths, binaryName, postRebuildContext, headless = false) {
216
- // The FIREFORGE-VERDICT line is the LAST stdout write of the run, on the
217
- // pass return and every throw path alike — written raw (not via clack,
216
+ // The FIREFORGE-VERDICT line is the last stdout write of the run, on the
217
+ // pass return and every throw path alike, written raw (not via clack,
218
218
  // whose renderer drops output under non-TTY capture) so harness-verdict
219
219
  // consumers grep one stable line instead of mach internals.
220
220
  try {
@@ -248,12 +248,12 @@ function applySingleRunOutcome(outcome, normalizedPaths, binaryName, postRebuild
248
248
  }
249
249
  if (outcome.verdict.kind === 'no-tests' && outcome.result.exitCode === 0) {
250
250
  // The silent false green: exit 0 plus a "Passed: 0"-style summary with
251
- // zero TEST-START lines must fail, not pass.
251
+ // zero TEST-START lines must fail rather than pass.
252
252
  throw new GeneralError(buildNoTestsRanMessage(0, normalizedPaths));
253
253
  }
254
- // A green-LOOKING summary rejected on crash/truncation evidence gets its
255
- // own explanation instead of the generic exit-code message — the operator
256
- // must see WHY the green counts were not trusted.
254
+ // A green-looking summary rejected on crash/truncation evidence gets its
255
+ // own explanation instead of the generic exit-code message, so the
256
+ // operator can see why the green counts were not trusted.
257
257
  if (outcome.verdict.greenSummaryRejected) {
258
258
  throw new GeneralError(buildGreenSummaryRejectedMessage(outcome.verdict.greenSummaryRejected, outcome.result.exitCode));
259
259
  }
@@ -300,7 +300,7 @@ export function diagnoseShardOutcome(outcome, path, binaryName, postRebuildConte
300
300
  function formatFailureBlocks(blocks) {
301
301
  if (blocks === undefined || blocks.length === 0)
302
302
  return undefined;
303
- // The collector appends a `…(+N more …)` note when it truncated; that
303
+ // The collector appends a `…(+N more …)` note when it truncated. That
304
304
  // note is not a failure block, so it does not count toward the header.
305
305
  const shown = blocks.filter((block) => !block.startsWith('…(')).length;
306
306
  return `Unexpected test failures (first ${shown}):\n${blocks.join('\n\n')}`;
@@ -1,7 +1,7 @@
1
- import { loadConfig } from '../core/config.js';
2
1
  import type { TestOptions } from '../types/commands/index.js';
2
+ import type { FireForgeConfig } from '../types/config.js';
3
3
  import type { TestRunOutcome } from './test-run.js';
4
- type ProjectConfig = Awaited<ReturnType<typeof loadConfig>>;
4
+ type ProjectConfig = FireForgeConfig;
5
5
  /** Rejects pathless `fireforge test` unless the operator selected a pathless mode. */
6
6
  export declare function assertPathlessTestMode(testPaths: readonly string[], options: TestOptions): void;
7
7
  /** Rejects invalid combinations for mode-like `fireforge test` options. */
@@ -23,11 +23,11 @@ export interface HarnessClassification {
23
23
  * dispatch, so refusing it before spending minutes in a pre-test build
24
24
  * is strictly better. A nonexistent path classifies as
25
25
  * nonXpcshell (findNearestXpcshellManifest returns null), so classifying
26
- * before assertTestPathsExist is harmless — existence is still asserted
26
+ * before assertTestPathsExist is harmless: existence is still asserted
27
27
  * after the stale/coverage gates, preserving their precedence over
28
28
  * missing-path errors. `xpcshellOnly` (non-empty request, zero
29
29
  * nonXpcshell paths) gates the Marionette preflight and the mochitest
30
- * client flags; pathless runs keep the full-suite behavior.
30
+ * client flags. Pathless runs keep the full-suite behavior.
31
31
  */
32
32
  export declare function classifyBeforeDispatch(engineDir: string, normalizedPaths: string[], options?: {
33
33
  allowMixed?: boolean;