Skip to content

rules(links): pages with zero CONTEXTUAL inbound links pass orphan-pages #109

Closed

Description

@nc9

Part of #103 (V-04).

A link from the footer of every page on the site is not link equity — but the two rules that measure
inbound support count it the same as a link from body copy.

  • links/orphan-pages flags pages below a raw incoming-link threshold.
  • links/weak-internal-links flags pages with exactly one dofollow incoming link.

Both take (url, incomingCount) pairs (collectOrphans, collectWeakPages) with no container
distinction
. So a page reachable only through a paginated index, or linked only from sitewide
chrome, has a healthy count and passes both while receiving no contextual equity at all.

Evidence: on one 45-page production blog, 28 of 45 pages have zero contextual inbound links.
Every post is reachable only through the paginated blog index. Both existing rules pass them.

This is the one item in the epic that needs new plumbing: the link graph must record whether each link
sat inside site chrome (an ancestor nav, header, footer or aside), and the resulting per-page
contextual-inbound count has to be produced identically by the legacy site.pages path and the
siteQuery accumulator.

Acceptance Criteria

  • The link graph records, per link, whether it sat inside site chrome (ancestor nav/header/footer/aside)
  • A bounded per-page scalar for contextual (non-chrome) inbound link count is available to rules from both the legacy site.pages path and the siteQuery accumulator
  • Both paths produce identical counts for the same crawl, covered by a test
  • New site-scope rule links/no-contextual-inbound, registered in the rules catalog
  • Warns on pages whose contextual inbound count is 0 while their raw inbound count is above the orphan threshold — i.e. the case the existing rules cannot see
  • Excludes the homepage and honours the same exclude patterns as links/orphan-pages
  • Fixture: a page linked from the sitewide footer only — warns, and is NOT reported by links/orphan-pages
  • Fixture: a page linked once from body copy — no warning
  • Existing links/orphan-pages and links/weak-internal-links output is unchanged by this work
  • Rule page added to docs/ and make validate passes there
  • packages/audit-engine/tests/streaming-rules-canonical-golden.test.ts updated: bump v1.findings.length and v1.perRuleTally.length by exactly one each, and add a comment line naming this rule as the cause, matching the convention already used for the six rules above it

Activity

  1. added
    enhancement
    P3
    size: M
    rules
    on Aug 19, 2026
  2. nc9 commented on Aug 20, 2026

    @nc9
    ContributorAuthor

    🐹 hamsterwheel claimed this issue.

    • run: loop-mt0xj160-109
    • branch: loop/109-rules-links-pages-with-zero-contextual-i
    • started: 2026-08-20T02:56:55.923Z
  3. nc9 commented on Aug 20, 2026

    @nc9
    ContributorAuthor

    🐹 PR opened: #121 — running the merge gate (CI · human rules · review · rubric).

  4. nc9 commented on Aug 20, 2026

    @nc9
    ContributorAuthor

    🐹 Held at the merge gate → Blocked: ci-red — CI not green. PR: #121.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3enhancementrulessize: M

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions