@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.
- package/CHANGELOG.md +409 -446
- package/dist/bin/fireforge.d.ts +1 -1
- package/dist/bin/fireforge.js +21 -15
- package/dist/build-info.json +4 -4
- package/dist/src/cli-usage-error.d.ts +46 -0
- package/dist/src/cli-usage-error.js +81 -0
- package/dist/src/cli.d.ts +7 -2
- package/dist/src/cli.js +47 -47
- package/dist/src/commands/bootstrap-checks.js +2 -1
- package/dist/src/commands/bootstrap.js +3 -4
- package/dist/src/commands/build.js +27 -17
- package/dist/src/commands/config.js +9 -9
- package/dist/src/commands/destructive-decision.d.ts +19 -0
- package/dist/src/commands/destructive-decision.js +31 -0
- package/dist/src/commands/discard.js +5 -5
- package/dist/src/commands/doctor-check-core.d.ts +4 -10
- package/dist/src/commands/doctor-check-core.js +0 -8
- package/dist/src/commands/doctor-external-toolchains.js +2 -2
- package/dist/src/commands/doctor-furnace-config-sync.d.ts +2 -2
- package/dist/src/commands/doctor-furnace-config-sync.js +20 -20
- package/dist/src/commands/doctor-furnace-jar.d.ts +1 -1
- package/dist/src/commands/doctor-furnace-jar.js +1 -1
- package/dist/src/commands/doctor-furnace.js +22 -22
- package/dist/src/commands/doctor-orphaned-harness.d.ts +10 -17
- package/dist/src/commands/doctor-orphaned-harness.js +14 -23
- package/dist/src/commands/doctor-patch-manifest.d.ts +2 -1
- package/dist/src/commands/doctor-patch-manifest.js +7 -6
- package/dist/src/commands/doctor-post-rebase-audit.js +3 -3
- package/dist/src/commands/doctor-source-pin.d.ts +12 -12
- package/dist/src/commands/doctor-source-pin.js +14 -14
- package/dist/src/commands/doctor-working-tree.d.ts +3 -3
- package/dist/src/commands/doctor-working-tree.js +3 -3
- package/dist/src/commands/doctor.d.ts +3 -1
- package/dist/src/commands/doctor.js +15 -16
- package/dist/src/commands/download.js +50 -37
- package/dist/src/commands/export-all.js +29 -12
- package/dist/src/commands/export-flow.d.ts +5 -5
- package/dist/src/commands/export-flow.js +29 -59
- package/dist/src/commands/export-placement-conflicts.d.ts +3 -3
- package/dist/src/commands/export-placement-conflicts.js +12 -12
- package/dist/src/commands/export-placement-gate.d.ts +2 -2
- package/dist/src/commands/export-placement-gate.js +7 -13
- package/dist/src/commands/export-placement-policy.d.ts +1 -1
- package/dist/src/commands/export-placement-policy.js +4 -6
- package/dist/src/commands/export-shared.d.ts +51 -32
- package/dist/src/commands/export-shared.js +17 -32
- package/dist/src/commands/export.js +14 -5
- package/dist/src/commands/furnace/apply.js +16 -16
- package/dist/src/commands/furnace/authoring-config.d.ts +13 -0
- package/dist/src/commands/furnace/authoring-config.js +19 -0
- package/dist/src/commands/furnace/chrome-doc-remove.d.ts +1 -1
- package/dist/src/commands/furnace/chrome-doc-remove.js +2 -2
- package/dist/src/commands/furnace/chrome-doc-templates.d.ts +14 -14
- package/dist/src/commands/furnace/chrome-doc-templates.js +17 -17
- package/dist/src/commands/furnace/chrome-doc-tests.d.ts +2 -2
- package/dist/src/commands/furnace/chrome-doc-tests.js +4 -4
- package/dist/src/commands/furnace/chrome-doc.d.ts +8 -8
- package/dist/src/commands/furnace/chrome-doc.js +18 -18
- package/dist/src/commands/furnace/create-browser-test.d.ts +1 -1
- package/dist/src/commands/furnace/create-browser-test.js +7 -12
- package/dist/src/commands/furnace/create-dry-run.d.ts +4 -4
- package/dist/src/commands/furnace/create-dry-run.js +6 -9
- package/dist/src/commands/furnace/create-features.d.ts +2 -2
- package/dist/src/commands/furnace/create-features.js +2 -2
- package/dist/src/commands/furnace/create-mochikit.d.ts +4 -4
- package/dist/src/commands/furnace/create-mochikit.js +7 -7
- package/dist/src/commands/furnace/create-templates.d.ts +31 -15
- package/dist/src/commands/furnace/create-templates.js +20 -19
- package/dist/src/commands/furnace/create-xpcshell.d.ts +5 -5
- package/dist/src/commands/furnace/create-xpcshell.js +8 -8
- package/dist/src/commands/furnace/create.d.ts +1 -1
- package/dist/src/commands/furnace/create.js +35 -29
- package/dist/src/commands/furnace/deploy.js +15 -6
- package/dist/src/commands/furnace/diff.js +7 -7
- package/dist/src/commands/furnace/index.js +1 -1
- package/dist/src/commands/furnace/init.js +17 -16
- package/dist/src/commands/furnace/list.js +2 -2
- package/dist/src/commands/furnace/override.d.ts +1 -1
- package/dist/src/commands/furnace/override.js +43 -34
- package/dist/src/commands/furnace/preview.js +17 -17
- package/dist/src/commands/furnace/refresh.js +15 -7
- package/dist/src/commands/furnace/remove-mutations.d.ts +9 -10
- package/dist/src/commands/furnace/remove-mutations.js +19 -19
- package/dist/src/commands/furnace/remove-state.d.ts +1 -1
- package/dist/src/commands/furnace/remove-state.js +1 -1
- package/dist/src/commands/furnace/remove.js +4 -8
- package/dist/src/commands/furnace/rename-browser-test.js +10 -15
- package/dist/src/commands/furnace/rename-xpcshell.d.ts +2 -2
- package/dist/src/commands/furnace/rename-xpcshell.js +3 -3
- package/dist/src/commands/furnace/rename.js +36 -36
- package/dist/src/commands/furnace/scan.js +3 -3
- package/dist/src/commands/furnace/status.js +19 -16
- package/dist/src/commands/furnace/sync.js +6 -6
- package/dist/src/commands/furnace/test-file-name.d.ts +28 -0
- package/dist/src/commands/furnace/test-file-name.js +39 -0
- package/dist/src/commands/furnace/validate.js +11 -12
- package/dist/src/commands/furnace/validation-output.d.ts +21 -9
- package/dist/src/commands/furnace/validation-output.js +3 -8
- package/dist/src/commands/import.js +22 -29
- package/dist/src/commands/lint-per-patch.d.ts +2 -2
- package/dist/src/commands/lint-per-patch.js +27 -12
- package/dist/src/commands/lint-per-run-checkjs.d.ts +14 -15
- package/dist/src/commands/lint-per-run-checkjs.js +14 -15
- package/dist/src/commands/lint-report.d.ts +3 -3
- package/dist/src/commands/lint-report.js +4 -4
- package/dist/src/commands/lint.d.ts +5 -4
- package/dist/src/commands/lint.js +36 -36
- package/dist/src/commands/manifest.d.ts +4 -4
- package/dist/src/commands/manifest.js +1 -1
- package/dist/src/commands/package.js +4 -6
- package/dist/src/commands/patch/compact.d.ts +2 -2
- package/dist/src/commands/patch/compact.js +19 -20
- package/dist/src/commands/patch/delete.d.ts +1 -1
- package/dist/src/commands/patch/delete.js +23 -33
- package/dist/src/commands/patch/entry-projection.d.ts +13 -0
- package/dist/src/commands/patch/entry-projection.js +24 -0
- package/dist/src/commands/patch/lint-ignore.d.ts +3 -12
- package/dist/src/commands/patch/lint-ignore.js +33 -44
- package/dist/src/commands/patch/move-files-create.d.ts +2 -2
- package/dist/src/commands/patch/move-files-create.js +29 -15
- package/dist/src/commands/patch/move-files-into.d.ts +2 -2
- package/dist/src/commands/patch/move-files-into.js +41 -37
- package/dist/src/commands/patch/move-files.js +5 -14
- package/dist/src/commands/patch/patch-context.d.ts +1 -1
- package/dist/src/commands/patch/rename.d.ts +4 -4
- package/dist/src/commands/patch/rename.js +35 -49
- package/dist/src/commands/patch/reorder.js +35 -48
- package/dist/src/commands/patch/split-plan.d.ts +7 -8
- package/dist/src/commands/patch/split-plan.js +10 -13
- package/dist/src/commands/patch/split.d.ts +2 -2
- package/dist/src/commands/patch/split.js +50 -48
- package/dist/src/commands/patch/staged-dependency-validate.d.ts +1 -1
- package/dist/src/commands/patch/staged-dependency-validate.js +3 -3
- package/dist/src/commands/patch/staged-dependency.d.ts +1 -1
- package/dist/src/commands/patch/staged-dependency.js +22 -28
- package/dist/src/commands/patch/tier.d.ts +2 -2
- package/dist/src/commands/patch/tier.js +20 -30
- package/dist/src/commands/patch-rename-map.d.ts +19 -0
- package/dist/src/commands/patch-rename-map.js +36 -0
- package/dist/src/commands/pending-resolution.d.ts +15 -0
- package/dist/src/commands/pending-resolution.js +25 -0
- package/dist/src/commands/re-export-adjacent.d.ts +25 -3
- package/dist/src/commands/re-export-adjacent.js +40 -24
- package/dist/src/commands/re-export-bulk-scan.d.ts +3 -3
- package/dist/src/commands/re-export-bulk-scan.js +23 -27
- package/dist/src/commands/re-export-drift.d.ts +10 -10
- package/dist/src/commands/re-export-drift.js +33 -33
- package/dist/src/commands/re-export-files.d.ts +2 -3
- package/dist/src/commands/re-export-files.js +52 -44
- package/dist/src/commands/re-export-lint.d.ts +29 -30
- package/dist/src/commands/re-export-lint.js +36 -29
- package/dist/src/commands/re-export-options.d.ts +1 -1
- package/dist/src/commands/re-export-options.js +1 -1
- package/dist/src/commands/re-export-register.d.ts +1 -1
- package/dist/src/commands/re-export-register.js +1 -1
- package/dist/src/commands/re-export-scan.d.ts +1 -1
- package/dist/src/commands/re-export-scan.js +12 -9
- package/dist/src/commands/re-export-single.d.ts +23 -4
- package/dist/src/commands/re-export-single.js +39 -31
- package/dist/src/commands/re-export.js +35 -17
- package/dist/src/commands/rebase/abort.js +9 -14
- package/dist/src/commands/rebase/continue.js +20 -19
- package/dist/src/commands/rebase/index.d.ts +1 -1
- package/dist/src/commands/rebase/index.js +5 -5
- package/dist/src/commands/rebase/patch-loop.d.ts +2 -2
- package/dist/src/commands/rebase/patch-loop.js +20 -24
- package/dist/src/commands/register.js +5 -5
- package/dist/src/commands/reset.js +1 -1
- package/dist/src/commands/resolve.d.ts +2 -2
- package/dist/src/commands/resolve.js +21 -13
- package/dist/src/commands/run.d.ts +0 -13
- package/dist/src/commands/run.js +38 -51
- package/dist/src/commands/setup-support.d.ts +16 -4
- package/dist/src/commands/setup-support.js +20 -20
- package/dist/src/commands/setup.js +4 -10
- package/dist/src/commands/source.js +9 -2
- package/dist/src/commands/status-check.d.ts +3 -3
- package/dist/src/commands/status-check.js +6 -6
- package/dist/src/commands/status-json.d.ts +14 -13
- package/dist/src/commands/status-json.js +9 -8
- package/dist/src/commands/status-output.d.ts +3 -3
- package/dist/src/commands/status-output.js +5 -5
- package/dist/src/commands/status-ownership.d.ts +3 -3
- package/dist/src/commands/status-ownership.js +3 -3
- package/dist/src/commands/status.js +25 -26
- package/dist/src/commands/test-build-phase.d.ts +3 -3
- package/dist/src/commands/test-build-phase.js +48 -24
- package/dist/src/commands/test-diagnose.d.ts +1 -1
- package/dist/src/commands/test-diagnose.js +20 -20
- package/dist/src/commands/test-modes.d.ts +4 -4
- package/dist/src/commands/test-modes.js +4 -5
- package/dist/src/commands/test-register.js +5 -3
- package/dist/src/commands/test-run.d.ts +11 -11
- package/dist/src/commands/test-run.js +40 -33
- package/dist/src/commands/test-stale-gate.d.ts +12 -12
- package/dist/src/commands/test-stale-gate.js +17 -17
- package/dist/src/commands/test-verdict.d.ts +19 -5
- package/dist/src/commands/test-verdict.js +26 -11
- package/dist/src/commands/test.d.ts +3 -3
- package/dist/src/commands/test.js +73 -36
- package/dist/src/commands/token-coverage.js +3 -3
- package/dist/src/commands/token-list.d.ts +26 -0
- package/dist/src/commands/token-list.js +153 -0
- package/dist/src/commands/token.js +26 -10
- package/dist/src/commands/tree.js +26 -21
- package/dist/src/commands/typecheck.d.ts +6 -6
- package/dist/src/commands/typecheck.js +16 -16
- package/dist/src/commands/verify.d.ts +3 -3
- package/dist/src/commands/verify.js +10 -10
- package/dist/src/commands/watch.js +11 -11
- package/dist/src/commands/wire.js +17 -16
- package/dist/src/core/ast-utils.d.ts +7 -7
- package/dist/src/core/ast-utils.js +8 -8
- package/dist/src/core/branding.d.ts +5 -12
- package/dist/src/core/branding.js +6 -5
- package/dist/src/core/browser-wire.d.ts +1 -1
- package/dist/src/core/browser-wire.js +10 -7
- package/dist/src/core/build-audit-platform.d.ts +32 -3
- package/dist/src/core/build-audit-platform.js +153 -13
- package/dist/src/core/build-audit-registration.d.ts +5 -5
- package/dist/src/core/build-audit-registration.js +10 -9
- package/dist/src/core/build-audit-resolve.d.ts +5 -5
- package/dist/src/core/build-audit-resolve.js +6 -6
- package/dist/src/core/build-audit-skip.d.ts +57 -0
- package/dist/src/core/build-audit-skip.js +112 -0
- package/dist/src/core/build-audit-transforms.d.ts +2 -2
- package/dist/src/core/build-audit-transforms.js +3 -3
- package/dist/src/core/build-audit.d.ts +21 -8
- package/dist/src/core/build-audit.js +142 -40
- package/dist/src/core/build-baseline-types.d.ts +19 -18
- package/dist/src/core/build-baseline-types.js +1 -1
- package/dist/src/core/build-baseline.d.ts +48 -31
- package/dist/src/core/build-baseline.js +20 -43
- package/dist/src/core/build-jar-escalation.d.ts +8 -8
- package/dist/src/core/build-jar-escalation.js +18 -17
- package/dist/src/core/build-overwrite-guard.d.ts +4 -4
- package/dist/src/core/build-overwrite-guard.js +14 -14
- package/dist/src/core/build-prepare.d.ts +4 -12
- package/dist/src/core/build-prepare.js +22 -26
- package/dist/src/core/config-mutate.js +4 -4
- package/dist/src/core/config-paths.d.ts +2 -6
- package/dist/src/core/config-paths.js +4 -2
- package/dist/src/core/config-state.d.ts +0 -6
- package/dist/src/core/config-state.js +3 -21
- package/dist/src/core/config-validate-build-audit.d.ts +8 -0
- package/dist/src/core/config-validate-build-audit.js +80 -0
- package/dist/src/core/config-validate-file-size.d.ts +1 -1
- package/dist/src/core/config-validate-file-size.js +3 -3
- package/dist/src/core/config-validate-patch-policy.d.ts +2 -2
- package/dist/src/core/config-validate-patch-policy.js +3 -3
- package/dist/src/core/config-validate-test-toolchains.d.ts +2 -2
- package/dist/src/core/config-validate-test-toolchains.js +4 -5
- package/dist/src/core/config-validate.js +22 -12
- package/dist/src/core/config.d.ts +12 -12
- package/dist/src/core/config.js +21 -25
- package/dist/src/core/coverage-extend.d.ts +16 -16
- package/dist/src/core/coverage-extend.js +20 -20
- package/dist/src/core/destructive.d.ts +14 -14
- package/dist/src/core/destructive.js +9 -9
- package/dist/src/core/diff-hunks.d.ts +2 -2
- package/dist/src/core/diff-hunks.js +7 -7
- package/dist/src/core/discard-baseline.d.ts +10 -10
- package/dist/src/core/discard-baseline.js +22 -23
- package/dist/src/core/display-state.d.ts +11 -11
- package/dist/src/core/display-state.js +12 -12
- package/dist/src/core/engine-changes.d.ts +2 -2
- package/dist/src/core/engine-changes.js +2 -2
- package/dist/src/core/engine-precondition.d.ts +5 -13
- package/dist/src/core/engine-precondition.js +5 -10
- package/dist/src/core/engine-session-lock.d.ts +18 -18
- package/dist/src/core/engine-session-lock.js +50 -54
- package/dist/src/core/export-moved-code-shape.d.ts +7 -7
- package/dist/src/core/export-moved-code-shape.js +10 -10
- package/dist/src/core/file-lock-owner.d.ts +103 -0
- package/dist/src/core/file-lock-owner.js +259 -0
- package/dist/src/core/file-lock.d.ts +14 -19
- package/dist/src/core/file-lock.js +90 -128
- package/dist/src/core/firefox-cache.d.ts +13 -1
- package/dist/src/core/firefox-cache.js +61 -36
- package/dist/src/core/firefox-download.d.ts +15 -0
- package/dist/src/core/firefox-download.js +38 -22
- package/dist/src/core/firefox-extract.d.ts +8 -7
- package/dist/src/core/firefox-extract.js +45 -27
- package/dist/src/core/firefox.d.ts +34 -36
- package/dist/src/core/firefox.js +13 -44
- package/dist/src/core/furnace-apply-dry-run.d.ts +1 -6
- package/dist/src/core/furnace-apply-dry-run.js +2 -8
- package/dist/src/core/furnace-apply-ftl.d.ts +5 -5
- package/dist/src/core/furnace-apply-ftl.js +8 -8
- package/dist/src/core/furnace-apply-helpers.d.ts +9 -20
- package/dist/src/core/furnace-apply-helpers.js +28 -39
- package/dist/src/core/furnace-apply-output.js +1 -1
- package/dist/src/core/furnace-apply-overwrite-warn.d.ts +9 -9
- package/dist/src/core/furnace-apply-overwrite-warn.js +13 -11
- package/dist/src/core/furnace-apply-undeploy-actions.d.ts +1 -1
- package/dist/src/core/furnace-apply-undeploy-actions.js +1 -1
- package/dist/src/core/furnace-apply.d.ts +4 -4
- package/dist/src/core/furnace-apply.js +50 -29
- package/dist/src/core/furnace-checksum-utils.d.ts +5 -5
- package/dist/src/core/furnace-checksum-utils.js +5 -5
- package/dist/src/core/furnace-config-custom.d.ts +1 -1
- package/dist/src/core/furnace-config-custom.js +2 -2
- package/dist/src/core/furnace-config-order.js +1 -1
- package/dist/src/core/furnace-config-tokens.d.ts +3 -3
- package/dist/src/core/furnace-config-tokens.js +3 -3
- package/dist/src/core/furnace-config-validate.js +2 -2
- package/dist/src/core/furnace-config.d.ts +5 -5
- package/dist/src/core/furnace-config.js +40 -53
- package/dist/src/core/furnace-constants.d.ts +6 -6
- package/dist/src/core/furnace-constants.js +9 -8
- package/dist/src/core/furnace-css-fragments.d.ts +6 -6
- package/dist/src/core/furnace-css-fragments.js +11 -11
- package/dist/src/core/furnace-dir-entry.d.ts +20 -0
- package/dist/src/core/furnace-dir-entry.js +21 -0
- package/dist/src/core/furnace-jsconfig.d.ts +7 -7
- package/dist/src/core/furnace-jsconfig.js +22 -20
- package/dist/src/core/furnace-operation.d.ts +22 -19
- package/dist/src/core/furnace-operation.js +38 -34
- package/dist/src/core/furnace-precondition.d.ts +10 -10
- package/dist/src/core/furnace-precondition.js +8 -8
- package/dist/src/core/furnace-refresh.d.ts +18 -6
- package/dist/src/core/furnace-refresh.js +5 -8
- package/dist/src/core/furnace-registration-ast.d.ts +2 -3
- package/dist/src/core/furnace-registration-ast.js +9 -12
- package/dist/src/core/furnace-registration-remove.d.ts +4 -4
- package/dist/src/core/furnace-registration-remove.js +6 -6
- package/dist/src/core/furnace-registration-validate.d.ts +2 -2
- package/dist/src/core/furnace-registration-validate.js +2 -2
- package/dist/src/core/furnace-registration.d.ts +7 -6
- package/dist/src/core/furnace-registration.js +29 -36
- package/dist/src/core/furnace-rollback.d.ts +1 -1
- package/dist/src/core/furnace-rollback.js +5 -5
- package/dist/src/core/furnace-scanner.js +3 -6
- package/dist/src/core/furnace-stale-export.d.ts +17 -16
- package/dist/src/core/furnace-stale-export.js +16 -15
- package/dist/src/core/furnace-staleness.d.ts +2 -2
- package/dist/src/core/furnace-staleness.js +2 -2
- package/dist/src/core/furnace-state-persist.d.ts +12 -12
- package/dist/src/core/furnace-state-persist.js +10 -10
- package/dist/src/core/furnace-step-errors.d.ts +6 -6
- package/dist/src/core/furnace-step-errors.js +6 -6
- package/dist/src/core/furnace-validate-accessibility.js +14 -14
- package/dist/src/core/furnace-validate-compatibility.js +9 -9
- package/dist/src/core/furnace-validate-registration.d.ts +2 -2
- package/dist/src/core/furnace-validate-registration.js +18 -20
- package/dist/src/core/furnace-validate-structure.d.ts +1 -1
- package/dist/src/core/furnace-validate-structure.js +4 -4
- package/dist/src/core/furnace-validate.js +9 -9
- package/dist/src/core/furnace-version-drift.d.ts +5 -5
- package/dist/src/core/furnace-version-drift.js +5 -5
- package/dist/src/core/git-base.d.ts +6 -4
- package/dist/src/core/git-base.js +29 -7
- package/dist/src/core/git-diff-new-file.d.ts +40 -0
- package/dist/src/core/git-diff-new-file.js +119 -0
- package/dist/src/core/git-diff.d.ts +13 -13
- package/dist/src/core/git-diff.js +121 -189
- package/dist/src/core/git-file-ops.d.ts +6 -13
- package/dist/src/core/git-file-ops.js +11 -35
- package/dist/src/core/git-readonly-index.d.ts +12 -14
- package/dist/src/core/git-readonly-index.js +12 -16
- package/dist/src/core/git-status.d.ts +9 -2
- package/dist/src/core/git-status.js +23 -11
- package/dist/src/core/git.d.ts +3 -9
- package/dist/src/core/git.js +28 -57
- package/dist/src/core/harness-orphans.d.ts +17 -17
- package/dist/src/core/harness-orphans.js +28 -27
- package/dist/src/core/history-log.d.ts +19 -0
- package/dist/src/core/history-log.js +29 -0
- package/dist/src/core/license-headers.d.ts +19 -18
- package/dist/src/core/license-headers.js +29 -28
- package/dist/src/core/mach-build-artifacts.d.ts +21 -21
- package/dist/src/core/mach-build-artifacts.js +23 -23
- package/dist/src/core/mach-error-hints.d.ts +5 -10
- package/dist/src/core/mach-error-hints.js +14 -14
- package/dist/src/core/mach-known-noise-filter.d.ts +42 -38
- package/dist/src/core/mach-known-noise-filter.js +57 -56
- package/dist/src/core/mach-mozconfig.d.ts +6 -6
- package/dist/src/core/mach-mozconfig.js +17 -16
- package/dist/src/core/mach-python.d.ts +3 -0
- package/dist/src/core/mach-python.js +13 -7
- package/dist/src/core/mach-resource-shim.d.ts +24 -12
- package/dist/src/core/mach-resource-shim.js +124 -21
- package/dist/src/core/mach.d.ts +59 -73
- package/dist/src/core/mach.js +47 -115
- package/dist/src/core/marionette-port.d.ts +15 -30
- package/dist/src/core/marionette-port.js +46 -89
- package/dist/src/core/marionette-preflight.d.ts +6 -6
- package/dist/src/core/marionette-preflight.js +32 -50
- package/dist/src/core/markdown-table.d.ts +9 -9
- package/dist/src/core/markdown-table.js +14 -14
- package/dist/src/core/mochitest-server-port.d.ts +8 -8
- package/dist/src/core/mochitest-server-port.js +17 -17
- package/dist/src/core/module-resolution-preflight.d.ts +8 -8
- package/dist/src/core/module-resolution-preflight.js +11 -11
- package/dist/src/core/moz-manifest-helpers.d.ts +7 -7
- package/dist/src/core/moz-manifest-helpers.js +7 -7
- package/dist/src/core/moz-manifest-register.d.ts +1 -1
- package/dist/src/core/moz-manifest-register.js +2 -2
- package/dist/src/core/moz-manifest-rules.js +46 -42
- package/dist/src/core/moz-manifest-tokenizers.js +1 -1
- package/dist/src/core/ownership-table.d.ts +5 -5
- package/dist/src/core/ownership-table.js +7 -7
- package/dist/src/core/parser-fallback.d.ts +3 -3
- package/dist/src/core/parser-fallback.js +3 -3
- package/dist/src/core/patch-apply-fuzz.d.ts +5 -5
- package/dist/src/core/patch-apply-fuzz.js +13 -13
- package/dist/src/core/patch-apply.d.ts +13 -14
- package/dist/src/core/patch-apply.js +36 -42
- package/dist/src/core/patch-export-coverage.d.ts +0 -9
- package/dist/src/core/patch-export-coverage.js +1 -30
- package/dist/src/core/patch-export-update.d.ts +21 -4
- package/dist/src/core/patch-export-update.js +7 -6
- package/dist/src/core/patch-export.d.ts +20 -30
- package/dist/src/core/patch-export.js +55 -77
- package/dist/src/core/patch-files.d.ts +0 -4
- package/dist/src/core/patch-files.js +0 -11
- package/dist/src/core/patch-identifier-suggest.d.ts +1 -1
- package/dist/src/core/patch-identifier-suggest.js +4 -4
- package/dist/src/core/patch-lint-binary.d.ts +12 -18
- package/dist/src/core/patch-lint-cache.d.ts +18 -2
- package/dist/src/core/patch-lint-cache.js +16 -19
- package/dist/src/core/patch-lint-checkjs.d.ts +55 -38
- package/dist/src/core/patch-lint-checkjs.js +78 -64
- package/dist/src/core/patch-lint-chrome-jsdoc.d.ts +8 -9
- package/dist/src/core/patch-lint-chrome-jsdoc.js +10 -11
- package/dist/src/core/patch-lint-creators.d.ts +5 -9
- package/dist/src/core/patch-lint-creators.js +3 -3
- package/dist/src/core/patch-lint-cross.d.ts +27 -19
- package/dist/src/core/patch-lint-cross.js +67 -110
- package/dist/src/core/patch-lint-css.d.ts +1 -1
- package/dist/src/core/patch-lint-css.js +15 -11
- package/dist/src/core/patch-lint-diff-tag.d.ts +5 -5
- package/dist/src/core/patch-lint-diff-tag.js +5 -5
- package/dist/src/core/patch-lint-diff.d.ts +4 -4
- package/dist/src/core/patch-lint-diff.js +4 -4
- package/dist/src/core/patch-lint-file-size.d.ts +3 -3
- package/dist/src/core/patch-lint-file-size.js +6 -6
- package/dist/src/core/patch-lint-forward-registration.d.ts +58 -0
- package/dist/src/core/patch-lint-forward-registration.js +210 -0
- package/dist/src/core/patch-lint-jsdoc.d.ts +2 -2
- package/dist/src/core/patch-lint-jsdoc.js +46 -46
- package/dist/src/core/patch-lint-module-registration.d.ts +3 -9
- package/dist/src/core/patch-lint-module-registration.js +1 -1
- package/dist/src/core/patch-lint-mozbuild.d.ts +1 -1
- package/dist/src/core/patch-lint-mozbuild.js +10 -10
- package/dist/src/core/patch-lint-observer.d.ts +3 -3
- package/dist/src/core/patch-lint-observer.js +7 -7
- package/dist/src/core/patch-lint-ownership.d.ts +6 -6
- package/dist/src/core/patch-lint-ownership.js +6 -6
- package/dist/src/core/patch-lint-prettier.d.ts +6 -6
- package/dist/src/core/patch-lint-prettier.js +7 -7
- package/dist/src/core/patch-lint-queue-types.d.ts +60 -0
- package/dist/src/core/patch-lint-queue-types.js +12 -0
- package/dist/src/core/patch-lint-staged-registration.d.ts +61 -0
- package/dist/src/core/patch-lint-staged-registration.js +90 -0
- package/dist/src/core/patch-lint-unmanaged-companion.d.ts +23 -23
- package/dist/src/core/patch-lint-unmanaged-companion.js +26 -26
- package/dist/src/core/patch-lint.d.ts +41 -35
- package/dist/src/core/patch-lint.js +52 -49
- package/dist/src/core/patch-lock.d.ts +1 -1
- package/dist/src/core/patch-lock.js +11 -11
- package/dist/src/core/patch-manifest-consistency.d.ts +7 -7
- package/dist/src/core/patch-manifest-consistency.js +16 -17
- package/dist/src/core/patch-manifest-files-affected.d.ts +1 -1
- package/dist/src/core/patch-manifest-files-affected.js +3 -3
- package/dist/src/core/patch-manifest-io.d.ts +14 -14
- package/dist/src/core/patch-manifest-io.js +35 -34
- package/dist/src/core/patch-manifest-query.d.ts +1 -1
- package/dist/src/core/patch-manifest-query.js +4 -4
- package/dist/src/core/patch-manifest-resolve.d.ts +5 -5
- package/dist/src/core/patch-manifest-resolve.js +7 -7
- package/dist/src/core/patch-manifest-validate.js +3 -3
- package/dist/src/core/patch-manifest.d.ts +2 -2
- package/dist/src/core/patch-manifest.js +2 -2
- package/dist/src/core/patch-parse.d.ts +32 -21
- package/dist/src/core/patch-parse.js +40 -15
- package/dist/src/core/patch-policy.js +15 -27
- package/dist/src/core/patch-registration-refs.d.ts +4 -4
- package/dist/src/core/patch-registration-refs.js +7 -7
- package/dist/src/core/patch-source-metadata.d.ts +1 -3
- package/dist/src/core/patch-source-metadata.js +0 -4
- package/dist/src/core/patch-transform.d.ts +8 -16
- package/dist/src/core/patch-transform.js +13 -23
- package/dist/src/core/process-cpu-time.d.ts +1 -1
- package/dist/src/core/process-cpu-time.js +6 -6
- package/dist/src/core/rebase-session.d.ts +9 -15
- package/dist/src/core/rebase-session.js +13 -25
- package/dist/src/core/register-browser-content.js +3 -2
- package/dist/src/core/register-browser-test.js +2 -1
- package/dist/src/core/register-module.js +2 -1
- package/dist/src/core/register-result.d.ts +1 -1
- package/dist/src/core/register-result.js +1 -1
- package/dist/src/core/register-scaffold.d.ts +2 -2
- package/dist/src/core/register-scaffold.js +8 -7
- package/dist/src/core/register-shared-css.d.ts +3 -3
- package/dist/src/core/register-shared-css.js +6 -5
- package/dist/src/core/register-xpcshell-test.d.ts +2 -2
- package/dist/src/core/register-xpcshell-test.js +2 -2
- package/dist/src/core/run-log-redact.d.ts +38 -0
- package/dist/src/core/run-log-redact.js +69 -0
- package/dist/src/core/run-log.d.ts +21 -10
- package/dist/src/core/run-log.js +76 -27
- package/dist/src/core/shared-ftl.d.ts +2 -2
- package/dist/src/core/shared-ftl.js +6 -6
- package/dist/src/core/signal-critical.d.ts +2 -2
- package/dist/src/core/signal-critical.js +4 -6
- package/dist/src/core/smoke-patterns.d.ts +5 -6
- package/dist/src/core/smoke-patterns.js +15 -20
- package/dist/src/core/state-file.d.ts +15 -4
- package/dist/src/core/state-file.js +14 -1
- package/dist/src/core/status-binary.d.ts +8 -8
- package/dist/src/core/status-binary.js +12 -12
- package/dist/src/core/status-classify.d.ts +17 -17
- package/dist/src/core/status-classify.js +13 -12
- package/dist/src/core/test-changed-prefs.d.ts +12 -12
- package/dist/src/core/test-changed-prefs.js +40 -25
- package/dist/src/core/test-harness-crash.d.ts +39 -39
- package/dist/src/core/test-harness-crash.js +69 -69
- package/dist/src/core/test-harness-output.d.ts +7 -7
- package/dist/src/core/test-harness-output.js +7 -7
- package/dist/src/core/test-harness-verdict-notes.d.ts +13 -14
- package/dist/src/core/test-harness-verdict-notes.js +4 -4
- package/dist/src/core/test-path-scope.d.ts +8 -8
- package/dist/src/core/test-path-scope.js +11 -11
- package/dist/src/core/test-stale-check.d.ts +22 -23
- package/dist/src/core/test-stale-check.js +31 -30
- package/dist/src/core/test-stale-symlink.d.ts +1 -1
- package/dist/src/core/test-stale-symlink.js +1 -1
- package/dist/src/core/test-stall-triage.d.ts +9 -9
- package/dist/src/core/test-stall-triage.js +22 -22
- package/dist/src/core/test-xpcshell-retry.d.ts +26 -7
- package/dist/src/core/test-xpcshell-retry.js +14 -11
- package/dist/src/core/token-category.d.ts +35 -2
- package/dist/src/core/token-category.js +67 -58
- package/dist/src/core/token-coverage.js +4 -5
- package/dist/src/core/token-dark-mode.d.ts +9 -9
- package/dist/src/core/token-dark-mode.js +13 -25
- package/dist/src/core/token-docs.d.ts +1 -1
- package/dist/src/core/token-inventory.d.ts +56 -0
- package/dist/src/core/token-inventory.js +109 -0
- package/dist/src/core/token-manager.d.ts +4 -4
- package/dist/src/core/token-manager.js +22 -22
- package/dist/src/core/token-scaffold.d.ts +4 -4
- package/dist/src/core/token-scaffold.js +4 -4
- package/dist/src/core/token-variant.d.ts +14 -14
- package/dist/src/core/token-variant.js +52 -53
- package/dist/src/core/toolchain-preflight.d.ts +15 -15
- package/dist/src/core/toolchain-preflight.js +23 -23
- package/dist/src/core/tree-cow.d.ts +3 -5
- package/dist/src/core/tree-cow.js +8 -8
- package/dist/src/core/tree-guard.d.ts +3 -3
- package/dist/src/core/tree-guard.js +23 -23
- package/dist/src/core/tree-store.d.ts +15 -15
- package/dist/src/core/tree-store.js +39 -38
- package/dist/src/core/typecheck-shim.d.ts +16 -15
- package/dist/src/core/typecheck-shim.js +26 -25
- package/dist/src/core/typecheck.d.ts +12 -12
- package/dist/src/core/typecheck.js +33 -33
- package/dist/src/core/wire-destroy.d.ts +2 -2
- package/dist/src/core/wire-destroy.js +5 -5
- package/dist/src/core/wire-dom-fragment.d.ts +3 -3
- package/dist/src/core/wire-dom-fragment.js +12 -23
- package/dist/src/core/wire-init.d.ts +2 -2
- package/dist/src/core/wire-init.js +7 -7
- package/dist/src/core/wire-subscript.d.ts +1 -1
- package/dist/src/core/wire-subscript.js +3 -3
- package/dist/src/core/wire-utils.d.ts +9 -9
- package/dist/src/core/wire-utils.js +16 -28
- package/dist/src/core/xpcshell-appdir.d.ts +20 -20
- package/dist/src/core/xpcshell-appdir.js +28 -30
- package/dist/src/core/xpcshell-profile-dir.d.ts +3 -3
- package/dist/src/core/xpcshell-profile-dir.js +7 -7
- package/dist/src/errors/base.d.ts +69 -16
- package/dist/src/errors/base.js +95 -26
- package/dist/src/errors/build.d.ts +6 -6
- package/dist/src/errors/build.js +26 -34
- package/dist/src/errors/codes.d.ts +10 -10
- package/dist/src/errors/codes.js +10 -10
- package/dist/src/errors/config.d.ts +0 -14
- package/dist/src/errors/config.js +13 -34
- package/dist/src/errors/download.d.ts +13 -0
- package/dist/src/errors/download.js +53 -24
- package/dist/src/errors/furnace.d.ts +2 -2
- package/dist/src/errors/furnace.js +8 -9
- package/dist/src/errors/git.d.ts +9 -9
- package/dist/src/errors/git.js +21 -31
- package/dist/src/errors/patch.d.ts +3 -3
- package/dist/src/errors/patch.js +11 -13
- package/dist/src/errors/rebase.d.ts +1 -1
- package/dist/src/errors/rebase.js +8 -8
- package/dist/src/errors/run.d.ts +1 -1
- package/dist/src/errors/run.js +1 -1
- package/dist/src/index.d.ts +4 -4
- package/dist/src/index.js +4 -4
- package/dist/src/types/commands/options.d.ts +155 -200
- package/dist/src/types/commands/patches.d.ts +19 -19
- package/dist/src/types/commands/project.d.ts +3 -3
- package/dist/src/types/config.d.ts +52 -19
- package/dist/src/types/furnace.d.ts +17 -17
- package/dist/src/types/index.d.ts +0 -1
- package/dist/src/types/json.d.ts +3 -3
- package/dist/src/types/json.js +2 -2
- package/dist/src/types/typecheck.d.ts +3 -3
- package/dist/src/utils/assert.d.ts +4 -16
- package/dist/src/utils/assert.js +7 -24
- package/dist/src/utils/build-info.d.ts +6 -6
- package/dist/src/utils/build-info.js +6 -6
- package/dist/src/utils/child-env.d.ts +7 -6
- package/dist/src/utils/child-env.js +5 -5
- package/dist/src/utils/concurrency.d.ts +2 -2
- package/dist/src/utils/concurrency.js +2 -2
- package/dist/src/utils/elapsed.js +10 -1
- package/dist/src/utils/errors.d.ts +8 -8
- package/dist/src/utils/errors.js +8 -8
- package/dist/src/utils/fs.d.ts +1 -1
- package/dist/src/utils/fs.js +15 -20
- package/dist/src/utils/hash.d.ts +12 -0
- package/dist/src/utils/hash.js +16 -0
- package/dist/src/utils/line-dispatch.d.ts +15 -0
- package/dist/src/utils/line-dispatch.js +48 -0
- package/dist/src/utils/logger.d.ts +4 -4
- package/dist/src/utils/logger.js +11 -11
- package/dist/src/utils/machine-output.js +2 -2
- package/dist/src/utils/options.d.ts +14 -20
- package/dist/src/utils/options.js +26 -27
- package/dist/src/utils/package-root.js +5 -14
- package/dist/src/utils/paths.d.ts +4 -4
- package/dist/src/utils/paths.js +4 -4
- package/dist/src/utils/platform.d.ts +0 -4
- package/dist/src/utils/process-group.d.ts +10 -9
- package/dist/src/utils/process-group.js +37 -36
- package/dist/src/utils/process.d.ts +70 -55
- package/dist/src/utils/process.js +129 -179
- package/dist/src/utils/ps-duration.d.ts +4 -4
- package/dist/src/utils/ps-duration.js +9 -9
- package/dist/src/utils/regex.d.ts +4 -4
- package/dist/src/utils/regex.js +7 -7
- package/dist/src/utils/sleep.d.ts +26 -0
- package/dist/src/utils/sleep.js +31 -0
- package/dist/src/utils/stdio-drain.d.ts +7 -7
- package/dist/src/utils/stdio-drain.js +8 -8
- package/dist/src/utils/validation.d.ts +12 -49
- package/dist/src/utils/validation.js +26 -36
- package/docs/README.md +2 -2
- package/docs/configuration.md +163 -69
- package/docs/exit-codes.md +66 -49
- package/docs/furnace.md +20 -19
- package/docs/lifecycle-invariants.md +414 -247
- package/docs/machine-output.md +58 -34
- package/docs/patch-workflow.md +48 -44
- package/docs/run-logs.md +72 -28
- package/docs/testing.md +105 -98
- package/docs/verification-trees.md +23 -22
- package/package.json +7 -6
- package/dist/src/commands/rebase.d.ts +0 -4
- package/dist/src/commands/rebase.js +0 -5
- package/dist/src/core/patch-artifact-normalize.d.ts +0 -21
- package/dist/src/core/patch-artifact-normalize.js +0 -24
- package/dist/src/core/patch-lint-reexports.d.ts +0 -7
- package/dist/src/core/patch-lint-reexports.js +0 -8
- package/dist/src/core/wire-targets.d.ts +0 -7
- 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
|
|
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
|
|
52
|
-
* `--check`/`--fail-on` policy is active, a `check`
|
|
53
|
-
* fail set, the verdict, and the offending files per
|
|
54
|
-
* classification (sourced from the same collector as the human
|
|
55
|
-
* message, so the two views can never disagree). The absent
|
|
56
|
-
* the mode signal within schemaVersion 1
|
|
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
|
|
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
|
|
20
|
-
* engine tree overwrite constantly
|
|
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
|
|
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
|
|
197
|
-
* engine tree overwrite constantly
|
|
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 ${
|
|
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 (${
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
-
//
|
|
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
|
|
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
|
|
119
|
+
* policy, which stays the only exit driver on this path.
|
|
120
120
|
*
|
|
121
|
-
* `--include-ownership` is a
|
|
122
|
-
* block without touching exit semantics, so an ownership
|
|
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
|
-
*
|
|
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
|
|
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
|
|
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
|
-
//
|
|
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
|
|
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
|
-
|
|
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
|
-
//
|
|
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
|
|
265
|
-
//
|
|
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
|
-
//
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
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
|
|
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:
|
|
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
|
-
|
|
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
|
|
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
|
|
34
|
-
//
|
|
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
|
|
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
|
-
//
|
|
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
|
|
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
|
|
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(
|
|
85
|
-
|
|
86
|
-
:
|
|
87
|
-
|
|
88
|
-
|
|
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
|
|
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
|
|
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
|
|
119
|
-
* `--build`/`--build-only` would arm a belt over work that never happens
|
|
120
|
-
*
|
|
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
|
|
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
|
-
//
|
|
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(
|
|
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
|
|
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
|
|
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
|
-
//
|
|
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
|
|
41
|
-
// the installed app dir after a successful build
|
|
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
|
|
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
|
|
81
|
-
// a manifest that sets `firefox-appdir = "browser"`. Checked
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
217
|
-
// pass return and every throw path alike
|
|
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
|
|
251
|
+
// zero TEST-START lines must fail rather than pass.
|
|
252
252
|
throw new GeneralError(buildNoTestsRanMessage(0, normalizedPaths));
|
|
253
253
|
}
|
|
254
|
-
// A green-
|
|
255
|
-
// own explanation instead of the generic exit-code message
|
|
256
|
-
//
|
|
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
|
|
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 =
|
|
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
|
|
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
|
|
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;
|