Repository navigation
feat(rules): add content/date-agreement (#108) - #120
Merged
Merged
Conversation
Both existing date rules are presence checks: content/freshness passes on any one signal, eeat/content-dates reports coverage. A page whose signals contradict each other passes both — squirrelscan.com's own /blog/* showed a 2025 byline against a 2026 schema date, /learn/* emitted Article dates the reader never saw. New page rule compares four page-side signals: visible byline date, schema document date, URL/title year, Last-Modified. Warns on byline vs schema disagreement beyond tolerance_days, on schema dates a reader cannot see, and on a URL/title year that contradicts the schema. False-positive guards (the two traps that cost an audit pass two re-runs): - schema dates come ONLY from document-describing @type nodes; a date on a sitewide SoftwareApplication/Product/Organization node is reported with its node type noted and never raises a disagreement - a byline is a position: candidates must sit near the top of main content and be byline-shaped; anchor text never counts, so prose and outbound citations are not read as publication dates - "no visible date" only when main content prints no date at all - a page-level node plus several visible dates is a listing, not a defect Last-Modified is reported but never warns on its own (deploy stamps). Golden canonical pin: perRuleTally 275 -> 276; findings unmoved (the fixture emits no JSON-LD, so the rule stays silent on every page). Signed-off-by: Nik Cubrilovic <[email protected]>
13 tasks
nc9
added a commit
that referenced
this pull request
Aug 20, 2026
The public README carries the count TWICE — a features bullet ("N Rules, N
Categories") and the table total — and the earlier pass updated only the total.
The Crawlability card in the docs rules index states its own per-category count
and was still at 18 against a live 20.
Both are checked by the #483/#1156 guards in the private repo, which is what
found them: the gitlink bump for v0.0.86 failed on exactly these two.
Rebasing onto main pulled in content/date-agreement (#120), so the live total is
276, not the 275 this branch was written for, and content is 18 not 17. Rather
than patch the surfaces CI names, every count is now swept against
loadAllRules(): the README table row by row, prose totals in README,
docs/index.mdx and docs/rules/index.mdx, and each per-category card. That found
four more stale numbers in docs/index.mdx that neither guard covers.
Signed-off-by: Nik Cubrilovic <[email protected]>
nc9
added a commit
that referenced
this pull request
Aug 20, 2026
…119) The public README carries the count TWICE — a features bullet ("N Rules, N Categories") and the table total — and the earlier pass updated only the total. The Crawlability card in the docs rules index states its own per-category count and was still at 18 against a live 20. Both are checked by the #483/#1156 guards in the private repo, which is what found them: the gitlink bump for v0.0.86 failed on exactly these two. Rebasing onto main pulled in content/date-agreement (#120), so the live total is 276, not the 275 this branch was written for, and content is 18 not 17. Rather than patch the surfaces CI names, every count is now swept against loadAllRules(): the README table row by row, prose totals in README, docs/index.mdx and docs/rules/index.mdx, and each per-category card. That found four more stale numbers in docs/index.mdx that neither guard covers. Signed-off-by: Nik Cubrilovic <[email protected]>
7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #108
New page-scope rule
content/date-agreement: the disagreement BETWEEN a page's date signals is thedefect, and no rule looked for it.
content/freshnesspasses as soon as any one signal exists andeeat/content-datesreports coverage, so squirrelscan.com's own site passed both while broken intwo opposite directions (
/blog/*2025 byline vs 2026 schema;/learn/*Article dates the readernever saw).
Four page-side signals are extracted and reported on every finding: visible byline date, schema
document date, URL/title year,
Last-Modified.Last-Modifiednever raises a warning on its own —origins stamp it at deploy time far more often than at content-change time.
Checks
byline-vs-schema-datetolerance_days(default 1) apart — both values namedvisible-date-missingurl-title-yearschema-date-sourceFalse-positive guards (both #108 traps are fixtures)
@types; an Article node wins over thegeneric
WebPagebeside it, and a date on a sitewideSoftwareApplication/Product/Organizationis reported with its node type noted and can never raise a disagreement.be byline-shaped — a
<time>, byline/entry-meta markup, or a short line saying nothing but thedate. An anchor's own text never counts, so prose and outbound citations are not bylines.
visible-date-missingonly when main content prints no date-shaped string anywhere.Acceptance criteria
content/date-agreementunderpackages/rules/src/content/, registered in the rules catalogLast-Modifiedheader@typenodes; a date taken from any other node is reported with its source noted (schema-date-source, info) and never used to raise a disagreement warning on its ownArticlenode plus a sitewideSoftwareApplicationwhosedatePublisheddiffers — no warningINP replaced FID on March 12, 2024) — no warningdocs/(docs/rules/content/date-agreement.mdx, listed indocs.jsonand the Content index)streaming-rules-canonical-golden.test.tsupdated with a comment line naming this rule as the cause, matching the convention used for the rules above itOne deviation, called out
The golden pin moves
perRuleTally.length275 -> 276 but leavesfindings.lengthat 98218, not98219. The canonical fixture emits no JSON-LD at all, and this rule speaks only when a page
carries a date on a document-describing schema node — so, exactly like
schema/rating-scopeaboveit, it contributes a tally key without a single finding. Writing 98219 would have pinned a number
the fixture cannot produce. The comment in the test says so.
Verification
Local
bun/nodeexecution was blocked by this session's command policy, so tests and typecheckwere NOT run locally — CI (
bun test, root typecheck,docs:check) is the gate.bun testat therepo root picks up
packages/rules/tests/content-date-agreement.test.ts(23 cases) and thecanonical golden pin.