Repository navigation
Closed
Labels
P2hamsterwheelenhancementNew feature or requestrulespackages/rules — audit rule definitionssize: Mhamsterwheel
Description
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) pushespassas soon as any
signal exists, and returnsinfoonly when there are none.eeat/content-datesreports the coverage percentage ofdatePublished/dateModifiedacross
article pages.
squirrelscan.com's own site passed both while broken in two opposite ways:
/blog/*showed a visible 2025 date against schemadatePublished2026, and emitted no
document schema at all — so a post's only JSON-LD was the sitewideSoftwareApplication./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:
- A date belongs to the node that describes the DOCUMENT. A sitewide
SoftwareApplication/
Product/Organizationnode carries its owndatePublished(a release date). Taking the first
one in the document attributed a placeholderdatePublished: 2026-01-01to 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. - 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, 2024on 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-agreementunderpackages/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-Modifiedheader - 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
@typenodes; 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
Articlenode plus a sitewideSoftwareApplicationwhosedatePublisheddiffers — 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/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
Metadata
Metadata
Assignees
Labels
P2hamsterwheelenhancementNew feature or requestrulespackages/rules — audit rule definitionssize: Mhamsterwheel
Activity
nc9 commentedon Aug 19, 2026
🐹 hamsterwheel claimed this issue.
loop-mszy3m7z-108loop/108-rules-content-date-agreement-visible-bylnc9 commentedon Aug 20, 2026
🐹 hamsterwheel claimed this issue.
loop-mt0wejx6-108loop/108-rules-content-date-agreement-visible-bylnc9 commentedon Aug 20, 2026
🐹 PR opened: #120 — running the merge gate (CI · human rules · review · rubric).
feat(rules): add content/date-agreement (#108) (#120)
nc9 commentedon Aug 20, 2026
🐹 Merged #120 — CI green · no human rule fired · review clean · rubric passed.
feat(rules): add links/no-contextual-inbound (#109)
feat(rules): add links/no-contextual-inbound (#109) (#121)