Repository navigation
Conversation
|
Review of #1348 (canonical variant grouping). I read the diff only and did not run the tests.
The overall design is sound: report-time only, a no-op when there are no variants, and chain and loop handling is covered. |
#858 Signed-off-by: Nik Cubrilovic <[email protected]>
…ear chain resolution, canonical caveat #858 Signed-off-by: Nik Cubrilovic <[email protected]>
df620bf to
55abc22
Compare
|
Reviewed the canonical-variant grouping (
|
…r other items of a touched check #858 Signed-off-by: Nik Cubrilovic <[email protected]>
|
Reviewed the diff (the CLI reconstruct path,
Docs: updated. The CHANGELOG bullet is present. |
|
Landed in v0.0.144 as nik |
Closes #858
Decision recorded on the issue (maintainer): group in the report by declared canonical, crawler unchanged, scores unchanged.
What changes (fresh crawls; a smart audit's carried union is not folded):
canonicalVariantMap(audit-engine): a crawled page whoserel=canonicalresolves to a DIFFERENT crawled page of the same site and path (trailing slash and fragment tolerated; chains resolved, loops dropped) is a variant. No canonical, a self canonical, another path/host, or an uncrawled canonical = its own page.foldChecksToCanonical:pageUrl,pagesand itemsourcePages(and an item that is itself a page) are mapped to the canonical page and deduped, in place, once, inreconstruct.report.pages, the structure counts and the summary lists, sototalPages,meta, structure sections and affected-page counts are canonical groups. Their checks move onto the canonical page's checks and still feed the tallies and score, so nothing in the score moves.meta.canonicalVariants, a note on theScan:line (text, markdown, html),canonical-variantson<scan-scope>in the LLM output,scanScope.canonicalVariantspersisted sosquirrel reportrebuilds the same.scanScope.cappedstill counts every crawled page.Before / after on the e2e fixture (6 crawled URLs: /, /contact, /about, /blog, /blog?page=2 with its own canonical, /contact?subject=Billing canonical /contact): before totalPages 6 and the meta-description finding lists 6 affected pages; after totalPages 5, 5 affected pages,
canonicalVariants: 1, the paginated blog page stays separate, score identical. With no variants the map is empty and the report is byte-identical.Tests:
packages/audit-engine/tests/canonical-groups-858.test.ts(helpers, incl. controls and chains/loops) andapps/cli/tests/cli/audit-canonical-variants-858-e2e.test.ts(real CLI: json, text, llm agree). Known limits, in the docs: the entity map still lists every crawled URL; hosted/cloud reports are not folded yet (same helpers, separate wiring); smart-audit unions are not folded.Docs:
docs/cli/audit.mdx(new "Query-string variants"),docs/configuration/output.mdx, CHANGELOG under Unreleased. Skill: none (no CLI surface change).