You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Partial and offset dates elsewhere: cloaking-probe recency, page-side dates in lastmod drift, local-time fallback, churn's UTC day #772
Follow-ups from the review of #771 (#758), which made the sitemap lastmod rules read 2024 and 2024-09 as the whole year or month. The same kind of date reading remains elsewhere:
Cloaking probe recency (packages/audit-engine/src/cloaking-probe.ts, the recent-lastmod selection): Date.parse("2026") is 1 January, so a lastmod stamped with the current year is never "recent" (287 days against the default 14), while 2026-10 is.
Page-side dates in crawl/sitemap-lastmod-drift: the page's own date still goes through new Date, so a schema dateModified: "2024" against lastmod 2024-09-10 warns 253 days ahead.
The instant fallback accepts non-W3C shapes at local time: 2024-9, 2024-09-1 and 2024/09 fall through w3cDatePeriod to new Date, which reads them at host-local midnight, so the result depends on the machine's timezone.
crawl/sitemap-lastmod-churn reports the UTC day of an offset datetime: 2024-09-10T23:30:00-05:00 counts as 2024-09-11, a day the sitemap never wrote.
Date-only vs month consistency: against a page date of 2025-01-08T12:00Z, 2024-12-31 reports 8 days behind (warn) while 2024-12 reports 7 (pass). Treating a date-only lastmod as the whole day would make them agree.
Acceptance Criteria
The cloaking probe reads a year or year-month lastmod as its period, and measures recency from its end (capped at now).
crawl/sitemap-lastmod-drift gives the page date a period too, and measures the gap between the two periods.
A lastmod that is not a W3C Datetime is read the same way on every machine (in UTC, or rejected).
crawl/sitemap-lastmod-churn counts the day the sitemap wrote, not its UTC conversion.
Activity
fix(rules): churn counts a news sitemap's coarse lastmods as news; co…
fix(rules): churn counts a news sitemap's coarse lastmods as news; co…
fix(utils): one datePeriod for every caller; restore TZ in tests #772
fix(rules): read sitemap and page dates as periods, the same on every…
fix(utils): one datePeriod for every caller; restore TZ in tests #772
fix(utils): linear comment strip, length cap, and refuse dates Date r…
fix(utils): refuse a zone next to any punctuation; no lookbehind in t…
fix(rules): read sitemap and page dates as periods, the same on every…
fix(utils): one datePeriod for every caller; restore TZ in tests #772
fix(utils): linear comment strip, length cap, and refuse dates Date r…
fix(utils): refuse a zone next to any punctuation; no lookbehind in t…
fix(rules): read sitemap and page dates as periods, the same on every…