Skip to content

rules(content): date agreement — visible byline vs schema vs URL vs Last-Modified #108

Closed

Description

@nc9

Part of #103 (V-03).

A page carries up to five date signals: the visible byline, schema datePublished/dateModified, a
date in the URL or title, the sitemap lastmod, and the Last-Modified header. Disagreement
between them is the defect
, and no rule looks for it.

Both existing date rules are presence checks:

  • content/freshness (packages/rules/src/content/freshness.ts) pushes pass as soon as any
    signal exists, and returns info only when there are none.
  • eeat/content-dates reports the coverage percentage of datePublished / dateModified across
    article pages.

squirrelscan.com's own site passed both while broken in two opposite ways:

  • /blog/* showed a visible 2025 date against schema datePublished 2026, and emitted no
    document schema at all — so a post's only JSON-LD was the sitewide SoftwareApplication.
  • /learn/* emitted Article JSON-LD with dates and showed the reader no date at all.

Must-not-fire — these cost two full re-runs to find

An internal audit pass's first version of this check produced 14 findings, of which 1 was real.
Both causes must be fixtures here:

  1. A date belongs to the node that describes the DOCUMENT. A sitewide SoftwareApplication /
    Product / Organization node carries its own datePublished (a release date). Taking the first
    one in the document attributed a placeholder datePublished: 2026-01-01 to every blog post.
    Dates must come from document-describing types (Article, BlogPosting, NewsArticle, WebPage,
    FAQPage, ...); a fallback to any other node must be marked as such and discounted.
  2. A byline is a position, not a date-shaped string. Scanning body text reads running prose and
    citations as bylines — INP replaced FID on March 12, 2024 on a 2026 page, and
    <a>March 12, 2024</a> linking to web.dev. Only short lines near the top of main content count,
    and never an anchor's own text.

Acceptance Criteria

  • New page-scope rule content/date-agreement under packages/rules/src/content/, registered in the rules catalog
  • Extracts up to four page-side signals: visible byline date, schema document date, URL/title date, Last-Modified header
  • Warns when the visible byline date and the schema document date disagree by more than 1 day, naming both values
  • Warns when a page emits schema document dates but shows the reader no visible date
  • Warns when a URL or title contains a year that disagrees with the schema document date
  • Schema dates are read ONLY from document-describing @type nodes; a date taken from any other node is reported with its source noted and never used to raise a disagreement warning on its own
  • Fixture: page with an Article node plus a sitewide SoftwareApplication whose datePublished differs — no warning
  • Fixture: page whose body prose contains a date unrelated to publication (INP replaced FID on March 12, 2024) — no warning
  • Fixture: page whose only date-shaped string is inside an outbound citation link — no warning
  • Fixture: visible 2025 byline against schema 2026 — warns
  • Passes on a page whose visible, schema, and header dates agree
  • 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
    P2
    size: M
    rules
    on Aug 19, 2026
  2. nc9 commented on Aug 19, 2026

    @nc9
    ContributorAuthor

    🐹 hamsterwheel claimed this issue.

    • run: loop-mszy3m7z-108
    • branch: loop/108-rules-content-date-agreement-visible-byl
    • started: 2026-08-19T10:25:09.736Z
  3. nc9 commented on Aug 20, 2026

    @nc9
    ContributorAuthor

    🐹 hamsterwheel claimed this issue.

    • run: loop-mt0wejx6-108
    • branch: loop/108-rules-content-date-agreement-visible-byl
    • started: 2026-08-20T02:25:27.011Z
  4. nc9 commented on Aug 20, 2026

    @nc9
    ContributorAuthor

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

  5. nc9 commented on Aug 20, 2026

    @nc9
    ContributorAuthor

    🐹 Merged #120 — CI green · no human rule fired · review clean · rubric passed.

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

    P2enhancementrulessize: M

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions