Repository navigation
Description
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-pagesflags pages below a raw incoming-link threshold.links/weak-internal-linksflags 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.pagespath and thesiteQueryaccumulator - 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-pagesandlinks/weak-internal-linksoutput is unchanged by this work - Rule page added to
docs/andmake validatepasses there -
packages/audit-engine/tests/streaming-rules-canonical-golden.test.tsupdated: bumpv1.findings.lengthandv1.perRuleTally.lengthby 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
nc9 commentedon Aug 20, 2026
🐹 hamsterwheel claimed this issue.
loop-mt0xj160-109loop/109-rules-links-pages-with-zero-contextual-inc9 commentedon Aug 20, 2026
🐹 PR opened: #121 — running the merge gate (CI · human rules · review · rubric).
nc9 commentedon Aug 20, 2026
🐹 Held at the merge gate → Blocked: ci-red — CI not green. PR: #121.
feat(rules): add links/no-contextual-inbound (#109)
fix(parser): correct the position expectation in the isChrome parity …
feat(rules): add links/no-contextual-inbound (#109) (#121)
fix(crawler): renumber the site-chrome migration to v22 after the #115 …
feat(rules): add social/asset-divergence, site chrome that disagrees …