Observability latest.json → mfdoctor runtime
Module Federation Observability writes runtime reports such as
.mf/observability/latest.json. MFDoctor consumes that file through the
offline CLI — not by injecting a doctor agent into the browser.
Example
After Observability has written a report (Node/SSR fileOutput, browser export,
collector, or onReport handoff), correlate it with local MFDoctor project
facts:
Minimal form when project facts already live under .mf/doctor/**/project.json:
Or set runtimeTrace in mfdoctor.config and omit the path on the command
line. Supported report formats are terminal, JSON, and SARIF only —
there is no HTML report or --ui dashboard.
Expected inputs
mfdoctor runtime accepts:
- one Observability report object;
- an array of reports;
- a
{"report": ...}or{"reports": [...]}envelope.
Current upstream Observability 2.5.3 reports and the legacy MFDoctor v1 shape
are supported. Partial reports import as partial evidence; missing fields never
count as a pass. Unknown future shapes and Observability build reports
(.mf/observability/build-report.json / build-info.json) are rejected — those
are build telemetry, not runtime traces.
Prefer latest.json for the latest complete runtime report. Use
events.jsonl only when you need event ordering or multiple traces; it is not
the default mfdoctor runtime input.
Not an in-browser agent
Analysis stays post-build / CLI:
- Do not inject MFDoctor into the page or client bundle.
- Do not look for an HTML doctor UI or
--uiflag. - MFDoctor never fetches URLs found in a report, never opens a browser, and never executes report contents.
- An in-browser MFDoctor runtime agent is not planned (#33).
For live loading failures, use the official
Observability Plugin
(or its export/collector path), then run mfdoctor runtime on the saved JSON.
Optional CI step
In CI, after a job that produces both Observability output and MFDoctor
project.json files:
Exit codes match the rest of the CLI: 0 pass, 1 policy fail, 2 analysis
incomplete. Invalid or missing opt-in traces do not break ordinary
mfdoctor check; they simply omit runtime correlation.
Related
- CLI: correlate a runtime trace
- Runtime and manifests
- External runtime capture contract — validated capture envelopes and adapters
- Limitations — no client injection, no in-browser agent