fix(cache): read a date with an ordinal suffix as a date
Merged
21
20d ago+21+21+01234567890123456789-2-2-0123456789
What and why
October 26thand3rd Octobermatched neither date pattern inVOLATILE_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,rdorthafter the day. No new date shape is added.
Issue
Fixes #1496
Verified
Ran it locally: yes
pnpm checkpasses, 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.mdxalready says a date is skipped as volatile text. - Contract change: not applicable.
- Engine contract change: not applicable.