alunduil / alunduil/blog.alunduil.com
CI validates post scheduling: unique pubDatetime and content-appropriate weekday
- 主要言語
- Astro
- スター
- 1
- フォーク
- 1
- 平均マージ
- 6時間 34分
- マージ済み PR(30日)
- 118
説明
## Summary
Add an automated check (pre-commit local hook + CI) that validates the scheduling convention on author-written posts: no two posts share a `pubDatetime`, and each post publishes on a content-appropriate weekday.
## Motivation
The Scheduling convention now lives in `CLAUDE.md` (§ Posting convention → Scheduling): `pubDatetime` is 08:00 local, the weekday carries content type (Tuesday for tech/methodology, Sunday for personal/reflective, skipping Monday/Friday), and no two posts share a `pubDatetime`. It's currently enforced only by hand — a same-day collision between `off-the-desk` and `under-the-instruments` on 2026-07-26 slipped through and was caught only on a manual sweep. A computational sensor should catch both classes of error before merge.
## Scope
- Add a check over `src/data/blog/**/*.md` frontmatter `pubDatetime`, wired into both `.pre-commit-config.yaml` and CI (mirroring the existing pre-commit + `pre-commit.yml` pattern).
- Fail when two in-scope posts share an identical `pubDatetime`.
- Fail (or flag) when an in-scope post's weekday is Monday or Friday, i.e. not Tuesday or Sunday.
- Exempt archival republishes under `src/data/blog/_/` and upstream AstroPaper files (tutorial/example/release posts) — the convention applies to current-era author posts only.
## Acceptance criteria
- [ ] Duplicate `pubDatetime` across in-scope posts fails the check
- [ ] Monday/Friday `pubDatetime` on an in-scope post fails or is flagged
- [ ] Archival (`_/`) and upstream theme files are exempt
- [ ] Runs in pre-commit and in CI, consistent with existing hook wiring
- [ ] `CLAUDE.md` Scheduling convention is the cited source of truth
## Open question
Content-type correctness — Tuesday=tech vs Sunday=personal — can't be derived automatically: content type isn't a frontmatter field. A script can only enforce weekday in {Tuesday, Sunday} and reject Monday/Friday, not verify that a Tuesday post is actually tech and a Sunday post actually personal. Either accept the weaker weekday-only check, or add a category/type field to frontmatter to enable the stricter one. Decide before implementing.
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
評価
この issue はまだ評価されていません。