You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
parser: html-parse notice is missing in parsePageRecord, has the wrong solution text, and an empty-audited page reports false findings #1570
Found in the independent review of #1558 (the fix for the class-attribute parse crash, #1557). The fix keeps the audit alive, but the notice it raises is easy to miss and the fallback page produces false findings.
Before the fix the audit failed with Maximum call stack size exceeded. and no report. After it the audit completes and the page gets an html-parse warn under crawl/html-size.
A page that throws twice (a 640,000-token class separated by NBSP) is audited as an EMPTY document: 6 failures (missing title, H1, meta description, lang, viewport and a second title check) plus thin-content and no-main warnings. Those findings are false: the page was not read.
apps/cli/src/audit/adapter.tsparsePageRecord (used by getParsedPages, buildSiteContext when no stored parse exists and reports/reconstruct.ts) does not set the notice; the other producers (parser/html.tsparsePage and audit-engine/adapter.tsparseHtmlForRules) do. Pages with a stored crawl-time parse keep it.
The finding carries the Googlebot "solution" text of the size check, which is misleading for a parse notice.
docs/rules/crawl/html-size.mdx still says the rule emits "a single check named html-size".
A cut class loses class-based rule matches past token 20,000 (measured: integrity/fake-auth-overlay.cover hit at token 20,000, none at 20,001; legal/cookie-consent and mobile/interstitials change); the docs do not say so.
Acceptance Criteria
parsePageRecord sets the parse notice, with a test that a page audited through that path shows the html-parse warn.
The html-parse finding has its own solution text (what happened and what was skipped), not the size-check text.
A page audited as an empty document does not report missing title, H1, meta description, lang, viewport, thin content or no-main as findings; the rules that need the DOM report not-evaluated for it, with a test through the real audit path.
docs/rules/crawl/html-size.mdx lists both checks it emits and says that a class cut to 20,000 tokens loses class-based matches past the cut.
The CLI end-to-end case above (a 640,000-token class page and a normal page) has a test that the audit exits 0 and writes a report.
parsePageRecord sets the parse notice, with a test of the html-parse warn through that path
PASS
apps/cli/src/audit/adapter.ts spreads parseNotices; apps/cli/tests/audit/parsed-page-producer-parity.test.ts "all three producers carry the notice, and crawl/html-size warns on each" runs parsePage, parseHtmlForRules and parsePageRecord (10 pass).
2
The html-parse finding has its own solution text, not the size-check text
FAIL (gap)
crawl/html-size.ts keeps one meta.solution: the Googlebot 2 MB advice with an "If the html-parse check warns instead..." sentence appended. In a real CLI report the html-parse finding still opens with the size-check text. The check message itself is better ("The page's markup could not be read in full: ...").
3
A page audited as an empty document does not report missing title, H1, meta description, lang, viewport, thin content or no-main; the DOM rules report not-evaluated, with a test through the real audit path
FAIL (gap)
The empty-document fallback in dom.ts only sets parseNotices; the only reader of it in the rules is crawl/html-size.ts (searched packages/*/src and apps/cli/src). No rule is told "not evaluated" and no test covers it. The changelog says the empty page "reports the elements it never saw as missing", which is the behaviour the criterion wanted removed.
4
docs/rules/crawl/html-size.mdx lists both checks and says a class cut to 20,000 tokens loses class-based matches past the cut
PASS
The doc now says "emits a check named html-size, plus a second one, html-parse" and "rules that match on class names (an overlay, a cookie banner, an interstitial) do not see the tokens past the 20,000th on a cut attribute".
5
A test of the CLI end-to-end case: a 640,000-token class page and a normal page, the audit exits 0 and writes a report
FAIL (gap)
Behaviour holds: I ran the CLI from the v0.0.162 tree against a local site with a 700,000-token class page and two normal pages (audit --offline --passive --no-publish --http -f json): exit 0, report written, html-parse warn on the big page. But no test in apps/cli/tests does this; the engine-level huge-class-parse-1557.test.ts runs runStreamingRules and does not touch the CLI exit code or report file.
Merged on main in 4f3f163, f1e2c1d and 5b07e60: a page the parser could not read at all is audited as an empty document, and the markup rules are skipped with the reason unread-page (the response-only rules keep running, a prior finding on that page carries instead of resolving). The CLI end-to-end case (a 640,000-token class page plus a normal page, exit 0, report written) is now a test, so that box is ticked.
Still open, so the issue stays open:
The html-parse finding has no solution text of its own. Solution text is rule-level and flows through grouping and every renderer, so a per-check text needs a report contract change or splitting html-parse into its own rule. Needs a maintainer decision.
The real-path test for the gate: no input we found reaches the empty-document path today (deep nesting, NBSP classes, oversized classes and many attributes all parse), so the gate is defensive and its test injects the parse notice. I propose amending that box to say so, or leaving it open until an input reaches it.
Accepting #1570 against main (origin/main at the time of writing), criterion by criterion. The three that were still unticked here were already shipped.
html-parse finding has its own solution text.packages/rules/src/crawl/html-size.ts carries it in the rule's solution: it says that when the html-parse check warns the markup could not be read in full, that a class attribute over 20,000 tokens was cut to its first 20,000 (class-based matches past the cut were not seen) or the page was audited empty, and what to do about it. Test: packages/rules/tests/html-size-parse-notice-1557.test.ts (passes).
An empty-audited page does not report missing title, H1, meta description, lang, viewport, thin content or no-main. The unread-page gate in packages/rules/src/runner.ts ("Unread-page gate (parser: html-parse notice is missing in parsePageRecord, has the wrong solution text, and an empty-audited page reports false findings #1570)") skips every page rule that reads the markup on a page the parser audited empty, with a skip reason and the message "Not evaluated: the page's markup could not be parsed ...", while crawl/html-size still warns html-parse and the response-only rules (RUNS_ON_UNREAD_PAGE) still run. Shipped in 4f3f163, f1e2c1d and 5b07e60, first in v0.0.173. Tests: packages/rules/tests/unread-page-gate-1570.test.ts (passes) and, through the real audit path, apps/cli/tests/cli/huge-class-audit-1570-e2e.test.ts (passes).
The first, fourth and fifth criteria were already ticked: the parse notice on every path and the docs and end-to-end case landed with the class-overflow fix in b576fa9 and b7ea286, first in v0.0.161.
Each commit above is an ancestor of origin/main, and git tag --contains gives the release named. I ran the cited test files just now. Closing.
Activity
fix(parser,rules): cut an oversized class by the tokenizer's own read…
nc9 commentedon Nov 4, 2026
Acceptance check against v0.0.162 (7c31d5b). The fixes shipped in v0.0.161: b576fa9.
parsePageRecordsets the parse notice, with a test of thehtml-parsewarn through that pathapps/cli/src/audit/adapter.tsspreadsparseNotices;apps/cli/tests/audit/parsed-page-producer-parity.test.ts"all three producers carry the notice, and crawl/html-size warns on each" runsparsePage,parseHtmlForRulesandparsePageRecord(10 pass).html-parsefinding has its own solution text, not the size-check textcrawl/html-size.tskeeps onemeta.solution: the Googlebot 2 MB advice with an "If the html-parse check warns instead..." sentence appended. In a real CLI report thehtml-parsefinding still opens with the size-check text. The check message itself is better ("The page's markup could not be read in full: ...").lang, viewport, thin content or no-main; the DOM rules report not-evaluated, with a test through the real audit pathdom.tsonly setsparseNotices; the only reader of it in the rules iscrawl/html-size.ts(searchedpackages/*/srcandapps/cli/src). No rule is told "not evaluated" and no test covers it. The changelog says the empty page "reports the elements it never saw as missing", which is the behaviour the criterion wanted removed.docs/rules/crawl/html-size.mdxlists both checks and says a class cut to 20,000 tokens loses class-based matches past the cuthtml-size, plus a second one,html-parse" and "rules that match on class names (an overlay, a cookie banner, an interstitial) do not see the tokens past the 20,000th on a cut attribute".audit --offline --passive --no-publish --http -f json): exit 0, report written,html-parsewarn on the big page. But no test inapps/cli/testsdoes this; the engine-levelhuge-class-parse-1557.test.tsrunsrunStreamingRulesand does not touch the CLI exit code or report file.Ticked 1 and 4. Left open for 2, 3 and 5.
nik
fix(rules): classify every page rule for an unread page, carry its pr…
fix(rules): unread page skips cloud rules and payloads, leaves site-l…
fix(rules): skip markup rules on a page audited as an empty document #…
fix(rules): classify every page rule for an unread page, carry its pr…
fix(rules): unread page skips cloud rules and payloads, leaves site-l…
fix(rules): skip markup rules on a page audited as an empty document #…
fix(rules): classify every page rule for an unread page, carry its pr…
fix(rules): unread page skips cloud rules and payloads, leaves site-l…
nc9 commentedon Nov 7, 2026
Merged on main in 4f3f163, f1e2c1d and 5b07e60: a page the parser could not read at all is audited as an empty document, and the markup rules are skipped with the reason
unread-page(the response-only rules keep running, a prior finding on that page carries instead of resolving). The CLI end-to-end case (a 640,000-token class page plus a normal page, exit 0, report written) is now a test, so that box is ticked.Still open, so the issue stays open:
html-parsefinding has no solution text of its own. Solution text is rule-level and flows through grouping and every renderer, so a per-check text needs a report contract change or splittinghtml-parseinto its own rule. Needs a maintainer decision.nik
nc9 commentedon Nov 11, 2026
Accepting #1570 against main (origin/main at the time of writing), criterion by criterion. The three that were still unticked here were already shipped.
html-parsefinding has its own solution text.packages/rules/src/crawl/html-size.tscarries it in the rule'ssolution: it says that when thehtml-parsecheck warns the markup could not be read in full, that a class attribute over 20,000 tokens was cut to its first 20,000 (class-based matches past the cut were not seen) or the page was audited empty, and what to do about it. Test:packages/rules/tests/html-size-parse-notice-1557.test.ts(passes).lang, viewport, thin content or no-main. The unread-page gate inpackages/rules/src/runner.ts("Unread-page gate (parser: html-parse notice is missing in parsePageRecord, has the wrong solution text, and an empty-audited page reports false findings #1570)") skips every page rule that reads the markup on a page the parser audited empty, with a skip reason and the message "Not evaluated: the page's markup could not be parsed ...", whilecrawl/html-sizestill warnshtml-parseand the response-only rules (RUNS_ON_UNREAD_PAGE) still run. Shipped in 4f3f163, f1e2c1d and 5b07e60, first in v0.0.173. Tests:packages/rules/tests/unread-page-gate-1570.test.ts(passes) and, through the real audit path,apps/cli/tests/cli/huge-class-audit-1570-e2e.test.ts(passes).Each commit above is an ancestor of origin/main, and
git tag --containsgives the release named. I ran the cited test files just now. Closing.nik