Repository navigation
feat(rules): crawl/single-page-site, an unscored note for one-page sites #1209 - #1219
Conversation
…tes; editor summary carries coverage.singlePageSite #1209 Signed-off-by: Nik Cubrilovic <[email protected]>
4538d6a to
d002c3a
Compare
|
Review of crawl/single-page-site. The design is sound: it only fires on a complete crawl, stays unscored, and has tests for both anchor paths and for scoring neutrality. The findings below are minor.
|
…test, order the changelog blocks #1209 Signed-off-by: Nik Cubrilovic <[email protected]>
|
Triage: changelog blocks reordered (Added first, then Docs; one Added heading). Section dedupe now uses a Set (selfFragments is already capped at 256 by the anchor record). The editor-summary gating note is accepted as is: the report side also checks the scan scope. Scoring test import order and formatting fixed. The more-than-one-sitemap-URL case is already covered ("a sitemap with a second in-scope URL does") on both engines. |
|
Review of crawl/single-page-site: I read the diff and found nothing that should block the merge. I did not run the tests.
Positives:
|
…e max_pages edge #1209 Signed-off-by: Nik Cubrilovic <[email protected]>
|
Review of #1219 ( The design holds up. The rule is informational, only fires on a complete crawl, and returns no checks otherwise, so scoring is untouched. It reuses
|
…1209 Signed-off-by: Nik Cubrilovic <[email protected]>
|
Reviewed the rule, the adapter and report changes, and the contract type. I did not run the tests.
No correctness, security or scoring problems found. The new rule is site scope, returns no checks when it does not fire, and the |
Signed-off-by: Nik Cubrilovic <[email protected]>
Signed-off-by: Nik Cubrilovic <[email protected]>
|
Review of #1219 (
I found no correctness or security problems. The rule scopes are bounded, the output is capped at 10 ids, and it returns no checks when it doesn't fire, so scoring is unchanged. The docs, the golden pin and the CHANGELOG are updated. |
Closes #1209
What
crawl/single-page-site(severity info, site scope). It fires only when the crawl ran to the end (not capped, links followed, no queued URL left unfetched), exactly one HTML page answered 2xx, the sitemap lists at most one in-scope URL, the page links to no other same-site path (a 404 path still counts), and it has 3 or more links to ids that exist on the page. The finding lists up to 10 section ids. When it does not fire the rule returns no checks, so it is left out of scoring.infochecks and empty runs are excluded fromcalculateRuleScore.packages/audit-engine/tests/single-page-site-scoring.test.tsasserts identical health and category scores with and without the finding.buildEditorSummaryRequestaddscoverage.singlePageSite: trueandcoverage.sectionCountonly when the finding fired and the crawl was not capped, time-stopped or left URLs unfetched. Existing request tests are unchanged. The contract typeEditorSummaryCoverageInputgains the two optional fields.SiteData.unfetchedPages(new, optional) is filled from the crawl frontier in both engine paths, so the rule can tell a complete crawl from a stopped one.links/broken-anchors(anchorLookupis now exported), so the v1 DOM and the streaming collector give the same answer; the rule test runs both.docs/rules/crawl/single-page-site.mdx(+ nav, hub table), rule counts (Crawlability 20 to 21 indocs/rules/index.mdxanddocs/rules/seo/index.mdx), and the canonical goldenperRuleTallypin 312 to 313. The findings pin is unchanged. The new rule is site scope, so no verdictScope or measurement fixture entry is needed.Verification
scripts/test-suites.ts --run rules(8026 pass),--run rest,--run report(970 pass),audit-enginesuite, per-packagetsgotypecheck (rules, audit-engine, report, core-contracts, cli), cli lint and format:check,make validateindocs/.Notes
coverage.singlePageSite) is tracked internally. Older servers ignore the new fields.