Repository navigation
Conversation
This was referenced Oct 30, 2026
nc9
force-pushed
the
feat/rules-read-page-type-841
branch
from
October 30, 2026 08:39
bb02284 to
26b0214
Compare
nc9
force-pushed
the
feat/rules-read-page-type-841
branch
2 times, most recently
from
October 30, 2026 19:13
1c3ce9c to
6f85ce3
Compare
…sity skip contact and legal pages by model page type #841 Signed-off-by: Nik Cubrilovic <[email protected]>
…keyed by rule; classifier in rules fingerprint; fanout disqualifies skipOnPageType #841 Signed-off-by: Nik Cubrilovic <[email protected]>
…ages relabel when the classifier changes #841 Signed-off-by: Nik Cubrilovic <[email protected]>
…ion #841 Signed-off-by: Nik Cubrilovic <[email protected]>
Signed-off-by: Nik Cubrilovic <[email protected]>
…e precision, stamp cached pages by classifierVersion #841 Signed-off-by: Nik Cubrilovic <[email protected]>
…stamped labels stale when classifier is off, memoized main content #841 Signed-off-by: Nik Cubrilovic <[email protected]>
nc9
force-pushed
the
feat/rules-read-page-type-841
branch
from
October 30, 2026 20:24
6f85ce3 to
eaa1ade
Compare
Contributor
Author
|
Landed in v0.0.145 as nik |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #841
Finishes the page-type half of #841 (the noindex half shipped in #1021). Rules that judge a page the way a searcher meets it skip pages the classifier model reads as contact or legal, when the page body bears the label out.
Trust rule
A page type relaxes a verdict only when ALL hold: the label is the MODEL's (a rules-fallback label is read from the page's own schema), its confidence is at least 0.9 (the bar
schema/expected-typeuses), and the page body corroborates it.legalneeds at least three distinct policy phrases (English plus de, fr, es, it, pt, nl);contactneeds atel:/mailto:link, an email address, a phone number or a message box (a newsletter field or site search does not count). A page with no text is never skipped, so a client-rendered shell at/privacyis reported by word-count like any thin page. The model reads a page's path and heading as much as its text, which is why the body check exists.Change
skipOnPageTyperule meta + a runner gate (shared/page-type.ts). The gate emits a rule-wide skip,skipReason: "page-type",details: { foldKey: "page-type", pageType, skippedByType: 1 }, handled like the noindex gate (isRuleNotApplicableReasonin core-contracts, read bybuildResolutionSignal,merge-core,merge-promise): the page reads as evaluated and clean, so an earlier finding on it RESOLVES.content/word-count: skipscontact,legal.content/keyword-stuffing: skipslegal(spam injected into a legal page escapes this rule; accepted, documented; hidden-text, dev-leakage and security still run).core/meta-title,core/meta-description: the "too short" finding only, oncontact,legal, as a per-check skip named with the real check name (skipReason: "not-applicable").PageClassification.model= artifact sha12 : featurizer :CLASSIFIER_RULES_VERSION(2, the first stamped version). The crawler fetches a cached page again when its stored stamp differs from the running classifier's, including the classifier switched off or on, so a new model, a rules change or--no-classifiertakes effect on unchanged pages.skipOnPageType(fannableRules, tested).RULES_FINGERPRINT_SOURCESnow covers the classifier source, its model manifest andapps/cli/src/classifier.Evidence
Tests and gates
page-type-skip-841.test.ts(before/after, corroboration cases including a law-firm/solutions/legalpage, a marketing/contactpage, an empty shell, newsletter field, year range, other languages;buildResolutionSignalover real runner output),classifier-cache-stale-841.test.ts(two-pass crawl),template-fanout-gates-841.test.ts, merge tests forpage-typeincloud-mergeandnot-evaluated-carry-508. Rules suite 8,408 pass (one timing test flakes under load, passes alone), crawler cache tests, classifier tests,make validate. Not run: full cli and audit-engine suites (CI).Docs:
docs/rules/index.mdx("Pages short by nature"), word-count, keyword-stuffing, meta-title, meta-description. Skill: no change. Merge note: #1349'screateNotEvaluatedCollectorhunk inmerge-core.tsresolves as(status !== "skipped" && !inconclusive) || isRuleNotApplicableReason(skipReason) || CHECK_NOT_APPLICABLE || timedOut.Delta review round
<main>landmark (else the body) without header, nav, footer and aside, flattened with spaces between elements;mailto:/tel:links and a message box count only inside it. A footer that links "Privacy Policy | Terms of Service | Cookies" and carries a mailto:, a tel: and an email no longer corroborates (tests for both the law-firm and the marketing/contactpage WITH that footer keep their finding). A support page with a message box is still skipped, accepted and documented.+; an IP address, a list of years and a bare digit run are not phones. Legal phrases match whole words and the generic ones (cookies, third parties, warranty, disclaimer, haftung, informativa) are gone.classifierVersionon the parsed page (unique key, written whenever a classifier ran, even if it answered nothing), so a page the classifier could not label caches instead of being refetched every run, and a nested JSON-LD key cannot be mistaken for it (tests). Documented: the first crawl after upgrade fetches every cached page once, so does each future bump ofCLASSIFIER_RULES_VERSION(comment on the constant and CHANGELOG); toggling--no-classifierrefetches each time (accepted).