chore(CI): JSDoc for headers modification date#3387
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
💤 Files with no reviewable changes (1)
📝 WalkthroughWalkthroughThe PR replaces git log timestamp-based freshness checks in the header generation tool with self-documenting ChangesHeader Generation Self-Timing via
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
No new issues found.
TL;DR — Replaces the git log-based mtime dedup in the headers-update tooling with a self-describing @since JSDoc tag inside the generated file, and drops the fetch-depth: 0 checkout that was only needed for the old approach.
Key changes
- Embed
@sincetag in generated headers file —tools/headers.tsnow reads the previous IANALast-Modifiedvalue out ofwell-known-headers.tsinstead of shelling out togit log. - Seed the tag in the generated file —
well-known-headers.tsgains/** @since 2026-03-06T22:01:19.000Z */so the first post-merge run is bootstrapped and does not silently regenerate. - Drop
fetch-depth: 0from the workflow —.github/workflows/headers.ymlno longer needs full git history now that the tool does not callgit log.
Summary | 3 files | 1 commit | base: master ← better-mod-headers-date
Self-describing dedup via @since
Before:
tools/headers.tsrangit log -1 --pretty="format:%ci" <dest>to get the last commit date of the generated file, then skipped regeneration if IANA'sLast-Modifiedwas older.
After: the tool parses@sinceout of the generated file with/@since\s+(\S+)/, compares the storedDateagainst IANA'sLast-Modified, and exits early whensince >= state.
The new comparison is actually tighter than the old one: it compares IANA's Last-Modified against the previously-stored IANA Last-Modified, instead of against an unrelated git commit timestamp. Round-tripping through state.toISOString() is lossless for HTTP-date second precision, so the equality boundary is correct. Failure modes (no @since match, unparseable date, non-ENOENT read errors) all fall through to regeneration, which is the safe default.
tools/headers.ts · express-zod-api/src/well-known-headers.ts · .github/workflows/headers.yml
Claude Opus | 𝕏

Summary by CodeRabbit