Repository navigation
Enforce the changelog entry length cap - #163
Merged
Merged
Conversation
The changelog style caps entries at one or two sentences (300 rendered characters, issue references and link targets excluded), but nothing checked the cap, so it stayed remembered rather than enforced. The new lint measures each '[Unreleased]' entry as rendered text: soft-wrapped lines join, emphasis and code markers strip, and inline link targets plus issue references drop. Released sections stay unmeasured because they are immutable history. The check fails closed on a missing or duplicated '[Unreleased]' heading, so a renamed heading cannot silence the cap, and passes on the empty section a release rotation leaves. Wiring: package.json (lint:changelog-length, lint:llm:full), the pre-commit hook, the .llm/context.md validation ladder, and a step in llm-lint.yml on both OSes. The self-test pins the rendered lengths of every exclusion shape by hand count, the 300/301 cap boundary, the released-section exemption, and the fail-closed section guards. Validation: fixtures pass and fail as designed, run-all.ps1 24/24 test files, Prettier and .llm lints clean, npm pack succeeds. No C# changed, so the Unity suites carry over from 73b8beb (EditMode 357/357, PlayMode 15/15). Refs #159.
Markdown starts entries with -, *, +, 1., or 1); the lint read only -, so an entry behind any other marker sat outside the cap instead of failing it - the vacuous-pass direction. Entries now start at every marker shape, and the failure report slices each marker at its own width. Ordered non-1 markers cannot interrupt a paragraph in Markdown, so the only loss is a contrived unindented continuation, which the previous reading also joined, not split. Two self-test cases pin the shape: three markers yield three measured entries, and an ordered entry as the only content fails the cap instead of passing ignored. Validation: the changelog-length suite passes 18/18 cases and run-all.ps1 passes 24/24 files; the repository lint stays clean. Refs #159.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
DISCLOSURE: LLM-GENERATED TEXT
Why: The 300-rendered-character entry cap was guidance only, so nothing failed when an entry drifted past it.
What:
[Unreleased]entries as rendered text.[Unreleased]section.llm-lintCI.Fixes #159
Type of Change
Checklist
Note
Low Risk
Adds CI/pre-commit tooling and tests only; no runtime or release artifact behavior changes beyond blocking over-long changelog drafts.
Overview
Turns the existing 300 rendered-character cap for
CHANGELOG.md[Unreleased]entries from documentation into an enforced check via newscripts/lint-changelog-length.js.The linter measures rendered text (joined wraps, stripped emphasis/code markers) and does not count issue references (
#123,(#123)) or inline link URLs; it only scans[Unreleased], and fails closed if that section is missing or duplicated. It is hooked into pre-commit (onCHANGELOG.md),llm-lintCI,npm run lint:changelog-length, andlint:llm:full, with PowerShell self-tests covering boundary cases and exclusions. Agent docs (ship-changes,.llm/context.md) now point contributors atnpm run lint:changelog-length.Reviewed by Cursor Bugbot for commit 5f3e450. Bugbot is set up for automated code reviews on this repo. Configure here.