Skip to content

fix(rules): a 4xx/5xx page with no HTML document is out of the slug-convention and total-byte-weight counts on both engines #1359 - #1470

Closed
nc9 wants to merge 1 commit into
mainfrom
fix/streaming-error-page-count-1359
Closed

nc9 wants to merge 1 commit into
mainfrom
fix/streaming-error-page-count-1359

Conversation

@nc9

@nc9 nc9 commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

Closes #1359.

The resident (v1) engine counted a 4xx/5xx page with no HTML document (the EMPTY_PARSED_PAGE it appends) in the per-page denominators of url/slug-convention ("All 31 page(s)") and perf/total-byte-weight ("across 31 pages", the average), and the streaming engine did not. Decision: error pages with no HTML document are not pages of the site's own URLs and have no weight to average, so they are out of both counts, as the weight rule's docs already said ("Error pages ... are not scored"). A 4xx page that has an HTML body is unchanged (it is a document on both engines).

  • slug-convention legacy path skips a page with status 400 or more, no document and no page type (or unknown); total-byte-weight filters the same pages before building its records.
  • streaming-rules-golden.test.ts "edge crawl: injected 4xx": the digit-masking exemption for the two rules is removed, so message, value and expected are compared exactly for every rule. The test fails without the rule change and passes with it.
  • Docs: both rule pages state the counting, CHANGELOG under Unreleased / Fixed.

Local: golden (4), slug-convention (21), perf-total-byte-weight-per-page (28), total-byte-weight-lazy-1252 (4), rules tsgo, docs make validate. Skill: no change needed.

nik

… perf/total-byte-weight counts on both engines #1359

Signed-off-by: Nik Cubrilovic <[email protected]>
@nc9
nc9 force-pushed the fix/streaming-error-page-count-1359 branch from 1bd2460 to a94c7c4 Compare November 1, 2026 02:09
@nc9 nc9 changed the title fix(rules): bodiless 4xx pages are out of the slug-convention and total-byte-weight counts on both engines #1359 fix(rules): a 4xx/5xx page with no HTML document is out of the slug-convention and total-byte-weight counts on both engines #1359 Nov 1, 2026
@nc9 nc9 mentioned this pull request Nov 1, 2026
@nc9

nc9 commented Nov 1, 2026

Copy link
Copy Markdown
Contributor Author

@nc9 nc9 closed this Nov 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

v1 and streaming engines count a 4xx error page differently in per-page-rule messages (31 vs 30 pages)

1 participant