Repeat the comment and inline-body removal until nothing changes, so the
pieces around a removed comment cannot assemble into a tag that a single
pass would then count (CodeQL: incomplete multi-character sanitization).
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Strip HTML comments and the bodies of inline script/style elements before
scanning index.html, so a commented-out tag or a tag-like string literal
is neither counted nor reported as a missing file. Document the silent
pnpm invocation for the JSON output and state that the counter is
Angular's "Initial total" plus index.html and app-config.js rather than
an exact match of that rounded figure.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Deduplicate initial resources by request URL rather than by file, so a
file referenced twice with different query strings is counted twice, as
the browser fetches it; fragments are still ignored. Each resource now
carries both its file path and its request URL.
Describe the CI ratchet as the goal of the loop rather than as existing
enforcement until the baseline and job PRs merge.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Add tools/performance/measure-initial-bytes.mjs, which reads the built
dist/apps/web/index.html and sums index.html plus every same-origin
script, stylesheet and modulepreload chunk it references. The value is
the J1 ("launch to usable") counter renderer.initialBytes and matches
the "Initial total" line of the Angular build output. Missing referenced
files fail the measurement instead of counting as zero bytes.
The script has node --test coverage over synthetic build output, its own
Nx project (performance-tools, Tier B in the coverage policy), root
scripts perf:initial-bytes / perf:tools:test, and a new
docs/architecture/performance-journeys.md contract linked from the
validation map, the context map and the README.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>