Skip to content

ci: fail the scheduled run when a source is due for a recheck - #122

Merged
drevendev merged 1 commit into
masterfrom
beautifulrepo/review-date-freshness-20261023
Oct 23, 2026
Merged

drevendev merged 1 commit into
masterfrom
beautifulrepo/review-date-freshness-20261023

Conversation

@drevendev

Copy link
Copy Markdown
Owner

Reader problem and change

The maintenance guide promised that review-date drift "shows up without a push", but the daily freshness job printed WARN: lines and stayed green. The first two catalog entries go stale on 2026-11-03, and nobody would have been told (#99). Guide sources had "Reviewed" dates but no check at all (#64).

  • catalog.py --fail-on-warning: a due recheck exits 1.
  • New tools/review_dates.py:
    • finds Reviewed **YYYY-MM-DD**, reviewed YYYY-MM-DD, Checked: YYYY-MM-DD and rechecked …, including dates split by a line break;
    • searches the guides, checklists, CONTRIBUTING, SECURITY and the tools README, and ignores examples inside code;
    • warns after 180 days, or 30 for guides/programs.md, matching the catalog's program rule;
    • rejects future or impossible dates;
    • accepts --fail-on-warning and --today.
  • pins.yml runs both tools with --fail-on-warning, plus the existing self-audit, and every step runs even after one fails. A due recheck turns the scheduled run red, and GitHub notifies the owner. Pull-request CI is unchanged, so a PR can't go red because a date passed.
  • Docs: the maintenance workflow describes the routine (re-read, update the claim, then the date), CONTRIBUTING says a date changes only after a real re-read, and tools/README.md documents both flags.

Closes #99
Closes #64

Evidence

  • review_dates.py finds 19 review dates in BeautifulRepo, all current today. With --today 2026-11-03, only guides/programs.md warns (31 days). With --today 2027-06-01, all 19 warn.
  • catalog.py --fail-on-warning on a copy whose entries date from 2020 exits 1, and without the flag it exits 0.

Verification

  • The five local checks passed on Windows 11 with Python 3.14.7: catalog OK; docs links 199; HTML navigation 210; 301 tests OK, 7 skipped; repo audit 0 findings.
  • tests/test_review_dates.py covers:
    • every spelling, and examples in code that must not count;
    • thresholds;
    • future and impossible dates;
    • exit codes with and without the flag;
    • BeautifulRepo's own dates;
    • that only the scheduled workflow uses the flag;
    • the catalog flag.
  • The scheduled workflow is first exercised on its next daily run, or by hand from the Actions tab.

Limitations

  • The tool recognises the date phrasings the handbook uses today. A new phrasing, such as "verified on", isn't seen until it is added to the pattern.

🤖 Generated with Claude Code

The daily freshness job printed catalog warnings and stayed green, so nobody
was told when an entry went stale (the first two would have on 2026-11-03).
Guide sources had dates but no check at all.

- catalog.py gains --fail-on-warning.
- New tools/review_dates.py finds "Reviewed **YYYY-MM-DD**", "Checked:" and
  similar dates in the guides, checklists, CONTRIBUTING, SECURITY and the
  tools README, ignores examples in code, warns after 180 days (30 for the
  programs guide) and rejects future or impossible dates.
- pins.yml runs both with --fail-on-warning and every step even after one
  fails. Pull-request CI is unchanged and does not depend on the calendar.
- The maintenance workflow describes the recheck routine; CONTRIBUTING says a
  date changes only after the source was actually re-read.

Closes #99
Closes #64

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@drevendev
drevendev merged commit 51bbec5 into master Oct 23, 2026
5 checks passed
@drevendev
drevendev deleted the beautifulrepo/review-date-freshness-20261023 branch October 23, 2026 09:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Scheduled checks stay green when catalog sources go stale Self-check: give dated guide sources a recheck trigger

1 participant