jbaruch / jbaruch/coding-policy

fix(release): check-changelog-placement's docstring describes the retired count rule, and its allowlist loses multiplicity

Open
#457 0 comments 0 reactions 0 assignees View on GitHub

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:

  1. 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 at skills/release/tests/test_check_changelog_placement.py:164 carries the same stale rationale.

  2. set() drops multiplicity. newly_parked builds known = 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, --help text 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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.