jbaruch / jbaruch/coding-policy
fix(release): check-changelog-placement's docstring describes the retired count rule, and its allowlist loses multiplicity
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1
- Forks
- 2
- Avg merge
- 9h 22m
- Merged PRs (30d)
- 81
Description
Summary
Follow-up to #454 (deferred advisories from that PR's review round; the guard itself ships working).
Two loose ends in skills/release/check-changelog-placement.py:
-
Stale contract prose. The module docstring (lines ~15-27) and the final remediation diagnostic (~line 146) still describe the retired NET COUNT rule — "a branch must not increase the number of entry blocks parked", "Exit 0 when the count did not rise", "does not raise the count". The implemented rule is block-content identity (
newly_parked), which never computes a count. A reader scripting against the documented contract gets the wrong predicate. The test comment atskills/release/tests/test_check_changelog_placement.py:164carries the same stale rationale. -
set()drops multiplicity.newly_parkedbuildsknown = set(blocks(original)), so a branch that adds a SECOND identical entry block under a published heading passes — both parked copies are members of the one-element set. Compare occurrences as a multiset (consume each base occurrence before classifying the parked remainder), which keeps the archive-repair case passing while catching a genuinely added duplicate.
Test plan
- Docstring,
--helptext and the failure diagnostic all describe the identity predicate - Regression: base has one parked block, branch has two identical copies of it -> exit 1
- Existing archive-repair case (move an entry between headings) still exits 0
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with skills/release/check-changelog-placement.py, its module docstring, --help text, and final diagnostic, then review the related cases in skills/release/tests/test_check_changelog_placement.py around line 164. Run the focused tests and add coverage for a duplicated parked block while preserving the existing archive-repair behavior; done means all documented messages describe the identity predicate and the test plan passes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 78/100