@hominis/fireforge 0.44.3 → 0.45.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +47 -0
- package/dist/build-info.json +4 -4
- package/dist/src/commands/build.js +9 -4
- package/dist/src/commands/doctor-source-pin.d.ts +29 -0
- package/dist/src/commands/doctor-source-pin.js +81 -0
- package/dist/src/commands/doctor.js +2 -0
- package/dist/src/commands/export-flow.js +3 -18
- package/dist/src/commands/furnace/create-browser-test.d.ts +9 -0
- package/dist/src/commands/furnace/create-browser-test.js +6 -6
- package/dist/src/commands/furnace/create-dry-run.d.ts +10 -0
- package/dist/src/commands/furnace/create-dry-run.js +16 -11
- package/dist/src/commands/furnace/create-xpcshell.js +2 -2
- package/dist/src/commands/furnace/create.js +5 -0
- package/dist/src/commands/patch/move-files-into.js +3 -6
- package/dist/src/commands/patch/split-plan.js +3 -6
- package/dist/src/commands/re-export-adjacent.d.ts +8 -0
- package/dist/src/commands/re-export-adjacent.js +26 -1
- package/dist/src/commands/re-export-drift.d.ts +8 -0
- package/dist/src/commands/re-export-drift.js +61 -0
- package/dist/src/commands/re-export-files.js +3 -6
- package/dist/src/commands/re-export-options.js +19 -5
- package/dist/src/commands/re-export-register.js +5 -1
- package/dist/src/commands/re-export-scan.js +3 -6
- package/dist/src/commands/re-export.js +16 -16
- package/dist/src/commands/test-build-phase.js +3 -2
- package/dist/src/commands/test-diagnose.js +14 -5
- package/dist/src/commands/test-register.js +1 -0
- package/dist/src/commands/test-run.js +4 -3
- package/dist/src/commands/test-stale-gate.js +5 -2
- package/dist/src/commands/test.js +9 -2
- package/dist/src/core/build-audit.d.ts +20 -0
- package/dist/src/core/build-audit.js +69 -3
- package/dist/src/core/build-baseline-types.d.ts +28 -0
- package/dist/src/core/build-baseline.d.ts +16 -1
- package/dist/src/core/build-baseline.js +38 -2
- package/dist/src/core/build-jar-escalation.d.ts +64 -0
- package/dist/src/core/build-jar-escalation.js +127 -0
- package/dist/src/core/build-prepare.d.ts +12 -1
- package/dist/src/core/build-prepare.js +68 -6
- package/dist/src/core/config-validate-file-size.d.ts +12 -0
- package/dist/src/core/config-validate-file-size.js +65 -0
- package/dist/src/core/config-validate.js +6 -0
- package/dist/src/core/engine-changes.d.ts +18 -0
- package/dist/src/core/engine-changes.js +34 -0
- package/dist/src/core/furnace-constants.d.ts +21 -0
- package/dist/src/core/furnace-constants.js +26 -1
- package/dist/src/core/harness-orphans.d.ts +73 -0
- package/dist/src/core/harness-orphans.js +186 -0
- package/dist/src/core/license-headers.d.ts +9 -5
- package/dist/src/core/license-headers.js +33 -7
- package/dist/src/core/mach-known-noise-filter.d.ts +21 -0
- package/dist/src/core/mach-known-noise-filter.js +24 -1
- package/dist/src/core/mach.d.ts +7 -0
- package/dist/src/core/mach.js +18 -2
- package/dist/src/core/patch-apply.js +49 -20
- package/dist/src/core/patch-lint-checkjs.js +6 -1
- package/dist/src/core/patch-lint-file-size.d.ts +52 -0
- package/dist/src/core/patch-lint-file-size.js +53 -0
- package/dist/src/core/patch-lint-prettier.d.ts +36 -0
- package/dist/src/core/patch-lint-prettier.js +126 -0
- package/dist/src/core/patch-lint-unmanaged-companion.d.ts +106 -0
- package/dist/src/core/patch-lint-unmanaged-companion.js +214 -0
- package/dist/src/core/patch-lint.js +23 -24
- package/dist/src/core/patch-transform.d.ts +21 -0
- package/dist/src/core/patch-transform.js +38 -0
- package/dist/src/core/smoke-patterns.js +12 -0
- package/dist/src/core/test-harness-crash.js +61 -48
- package/dist/src/core/test-harness-verdict-notes.d.ts +55 -0
- package/dist/src/core/test-harness-verdict-notes.js +48 -0
- package/dist/src/core/test-stale-check.d.ts +23 -6
- package/dist/src/core/test-stale-check.js +77 -15
- package/dist/src/core/test-stall-triage.js +37 -19
- package/dist/src/errors/build.d.ts +28 -0
- package/dist/src/errors/build.js +49 -0
- package/dist/src/types/commands/options.d.ts +19 -0
- package/dist/src/types/commands/patches.d.ts +17 -6
- package/dist/src/types/config.d.ts +41 -0
- package/dist/src/utils/fs.d.ts +4 -2
- package/dist/src/utils/fs.js +3 -1
- package/docs/configuration.md +47 -0
- package/docs/exit-codes.md +4 -2
- package/docs/testing.md +83 -0
- package/package.json +1 -1
package/docs/testing.md
CHANGED
|
@@ -38,11 +38,62 @@ coverage instead of replacing it; it is refused when the build anchor moved
|
|
|
38
38
|
(engine HEAD, `engine/mozconfig`, or a previously fingerprinted packageable
|
|
39
39
|
file).
|
|
40
40
|
|
|
41
|
+
### What a pre-test build costs
|
|
42
|
+
|
|
43
|
+
`test --build` runs `mach build faster`, with two escalations decided by
|
|
44
|
+
comparing build inputs against the **last successful build** recorded in
|
|
45
|
+
`.fireforge/last-build.json` — not against engine HEAD, since a fork's
|
|
46
|
+
worktree is permanently dirty (imported patches, Furnace-applied
|
|
47
|
+
components):
|
|
48
|
+
|
|
49
|
+
- a changed `moz.build` / `moz.configure` / `Makefile.in` runs
|
|
50
|
+
`mach configure` first;
|
|
51
|
+
- a changed `jar.mn` escalates the whole build to a full `mach build`
|
|
52
|
+
(minutes rather than seconds) **only** when it is a NEW manifest
|
|
53
|
+
(untracked in the engine repo, so no install manifest exists for it yet)
|
|
54
|
+
or when its jar declaration carries a bracketed base-directory prefix,
|
|
55
|
+
which redirects the install destination away from the default chrome
|
|
56
|
+
root. An entry added to an existing `dist/bin` manifest no longer
|
|
57
|
+
escalates. Any probe failure (unreadable manifest, no git) escalates, and
|
|
58
|
+
the notice names the manifest and the reason.
|
|
59
|
+
|
|
60
|
+
Each escalation is paid once per actual content change: a `jar.mn` that is
|
|
61
|
+
dirty against HEAD but byte-identical to what the last full build consumed
|
|
62
|
+
does not escalate again. `fireforge build --ui` is itself a
|
|
63
|
+
`mach build faster` and never escalates; the `jar.mn` record it writes is
|
|
64
|
+
carried forward from the previous full build, so a registration made
|
|
65
|
+
between a `build --ui` and the next `test --build` still triggers the full
|
|
66
|
+
build once.
|
|
67
|
+
|
|
68
|
+
The open question the 0.44.0 changelog recorded here — whether a full build
|
|
69
|
+
is really required for an entry added to an existing `dist/bin` `jar.mn` —
|
|
70
|
+
was settled downstream by exactly the experiment that entry asked for: two
|
|
71
|
+
clean runs where a jar-only registration of a new content file was
|
|
72
|
+
installed by a plain `fireforge build --ui`
|
|
73
|
+
(`faster/install_dist_bin_browser` named the destination, the file reached
|
|
74
|
+
`dist/bin` and the `.app` bundle) and fetched over `chrome://` by a plain
|
|
75
|
+
`fireforge test`. That case no longer escalates. The two halves the
|
|
76
|
+
experiment did NOT exercise — a new `jar.mn` file, and a non-default
|
|
77
|
+
install destination — still do, for the reason the original entry gives:
|
|
78
|
+
relaxing a stale-artifact guard without evidence trades a slow build for a
|
|
79
|
+
silently wrong test.
|
|
80
|
+
|
|
41
81
|
## Resilience
|
|
42
82
|
|
|
43
83
|
- Recognized harness crashes retry up to `--harness-retries <n>` times
|
|
44
84
|
(default 2).
|
|
45
85
|
- `--kill-stale-marionette` terminates recognized stale browsers.
|
|
86
|
+
- Every dispatch runs a **census of orphaned harness helpers** — `xpcshell`
|
|
87
|
+
(the harness httpd), `pywebsocket`, `ssltunnel`, `moz-http2` — that
|
|
88
|
+
survived an earlier run in this project's objdir. It runs at preflight,
|
|
89
|
+
before this run spawns anything, so every hit is a survivor by
|
|
90
|
+
construction; a match must be objdir-anchored, since `xpcshell` and
|
|
91
|
+
`server.js` are far too generic to report on their own. Survivors slow
|
|
92
|
+
every later run without appearing in its output (a three-second suite
|
|
93
|
+
taking minutes of wall clock is the usual symptom). Report-only by
|
|
94
|
+
default; `--reap-orphans` terminates them. It never refuses a run.
|
|
95
|
+
A different shape — reparented Python `multiprocessing` workers — is
|
|
96
|
+
covered by the `Orphaned harness workers` doctor check.
|
|
46
97
|
- `--perf-samples <path>` publishes a perf-sample artifact path to the
|
|
47
98
|
harness (exported as `<BINARYNAME>_PERF_SAMPLE_JSON`).
|
|
48
99
|
|
|
@@ -78,6 +129,38 @@ the build path stays quiet. It is opt-in rather than automatic because it
|
|
|
78
129
|
changes how much a third party prints, and an operator who wants the quieting
|
|
79
130
|
should keep it.
|
|
80
131
|
|
|
132
|
+
## Known upstream teardown noise
|
|
133
|
+
|
|
134
|
+
Recent engines can end a run with a Python traceback at harness teardown:
|
|
135
|
+
|
|
136
|
+
```
|
|
137
|
+
AttributeError: 'SystemResourceMonitor' object has no attribute 'stop_time'
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
(or `poll_interval`), raised from `mozsystemmonitor/resourcemonitor.py`. It is
|
|
141
|
+
an upstream defect in the resource monitor's own shutdown, it is cosmetic, and
|
|
142
|
+
it does not affect any verdict. It matters only because it lands exactly where
|
|
143
|
+
a reader looks for the failure summary.
|
|
144
|
+
|
|
145
|
+
FireForge recognizes this one signature — and only this one. Recognition
|
|
146
|
+
requires **all** of: an `AttributeError` on `SystemResourceMonitor` naming one
|
|
147
|
+
of those two attributes, a `resourcemonitor.py` stack frame, and (in a test
|
|
148
|
+
run) a preceding `SUITE_END`. A novel attribute, a different exception, or the
|
|
149
|
+
same traceback before shutdown is treated as a real failure and printed
|
|
150
|
+
verbatim, always.
|
|
151
|
+
|
|
152
|
+
The two phases handle it differently, deliberately:
|
|
153
|
+
|
|
154
|
+
- **Tests** collapse the traceback in the terminal echo to one labeled
|
|
155
|
+
`[FireForge]` line. Captures and the run log keep the **raw** traceback, and
|
|
156
|
+
the classifier reads the raw form — a real failure always outranks this
|
|
157
|
+
signature in diagnosis.
|
|
158
|
+
- **Builds** print it verbatim and add a note naming it. A build has no
|
|
159
|
+
`SUITE_END` — no boundary separating teardown from work still in progress —
|
|
160
|
+
so FireForge cannot distinguish cosmetic teardown noise from a real
|
|
161
|
+
build-time traceback there, and withholding the block would be the wrong
|
|
162
|
+
risk to take.
|
|
163
|
+
|
|
81
164
|
## Concurrency
|
|
82
165
|
|
|
83
166
|
A test run holds the engine-session lock and snapshots the engine git
|