fix(cache): read a date with an ordinal suffix as a date

Merged
21
20d ago
+21-2

What and why

  • October 26th and 3rd October matched neither date pattern in VOLATILE_TEXT, because there is no word boundary between the day digits and the suffix. Such a date was recorded as an end anchor and went stale the next day, and in an alert it did not read as a placeholder.
  • Both date patterns now accept an optional st, nd, rd or th after the day. No new date shape is added.

Issue

Fixes #1496

Verified

Ran it locally: yes

  • pnpm check passes, e2e unit tests pass (3249).
  • The two new tests fail on main and pass with the change.

Checklist

  • Changeset added (pnpm changeset) for any change to a published package, or the change is testbed, docs, or CI only.
  • Breaking change: not applicable.
  • Docs updated in the same PR: no change needed, docs/cache.mdx already says a date is skipped as volatile text.
  • Contract change: not applicable.
  • Engine contract change: not applicable.