NEC-116: changelog cut strips only a trailing (#N), so a two-PR entry publishes one #181

Merged
nectenda-agent merged 2 commits from worktree-nec-116-changelog-cut-strips-only-a-trailing-n-s into main 2026-09-26 07:57:48 +01:00
Collaborator

Task: NEC-116 — https://projectron.nerchure.com/tasks/116

Changelog cut stripped only a trailing (#N), so an entry crediting two pull requests published the first number into the mirror's CHANGELOG.md, the GitHub release body and the site. cut now strips every (#N) and (#N, #M) anywhere on a line, keeping indentation and spacing, and drops a continuation line that held only a PR number. scanPublicText now refuses a parenthesised (#N) in anything published, so cut and the mirror both reject one the stripper misses; draft previews the ledger as cut will leave it so Unreleased's by-design numbers do not warn. The new rule found one already in the mirror: a comment in content-sync.ts citing a private issue, reworded. Tests in scripts/changelog.test.mjs; every rule mutation-checked.

Spec: docs/changes/NEC-116-changelog-pr-references/spec.md

Changelog

NONE

Task: NEC-116 — https://projectron.nerchure.com/tasks/116 Changelog cut stripped only a trailing (#N), so an entry crediting two pull requests published the first number into the mirror's CHANGELOG.md, the GitHub release body and the site. cut now strips every (#N) and (#N, #M) anywhere on a line, keeping indentation and spacing, and drops a continuation line that held only a PR number. scanPublicText now refuses a parenthesised (#N) in anything published, so cut and the mirror both reject one the stripper misses; draft previews the ledger as cut will leave it so Unreleased's by-design numbers do not warn. The new rule found one already in the mirror: a comment in content-sync.ts citing a private issue, reworded. Tests in scripts/changelog.test.mjs; every rule mutation-checked. Spec: `docs/changes/NEC-116-changelog-pr-references/spec.md` ## Changelog NONE
cutUnreleased removed a PR number only at the end of a line, so an entry
crediting two pull requests — "(#166) (#175)" — published the first. The
match now runs anywhere on the line, including "(#1, #2)", and leaves the
line spaced as if the number had never been written.

scanPublicText now reports a parenthesised "(#N)", so cut and the mirror
refuse one the stripper missed instead of publishing it as though it were a
deliberate citation. Parenthesised because a bare #333 is a colour. draft
previews the ledger as cut will leave it, so the number every Unreleased
entry carries by design is not a warning.

The new rule found one already in the mirror: a comment in content-sync.ts
citing a private issue. Reworded.

Task: NEC-116

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hq2ZoBQaUJZbSCBfTgqyAb
Tighten PR-number stripping and the scan rule after review
All checks were successful
Release note / release-note (pull_request) Successful in 13s
CI / build (pull_request) Successful in 4m37s
CI / e2e (pull_request) Successful in 5m13s
CI / promote (pull_request) Has been skipped
eee6ee7868
Review found three edges, none reachable from what draft writes but all
reachable by a hand edit in the review window:

- "(#1) Start" kept a leading space and "a (#1)(#2)" a trailing one. The
  stripper now keeps a line's indentation, drops the gap after a leading
  reference, and trims what a trailing one leaves.
- A wrapped entry whose last line held only "(#166)" became a blank line
  inside the list. cut now drops a line that held nothing but PR numbers.
- The scan rule refused "(#12-steps)", a Markdown link to a heading. The
  number must now end at a bracket, comma or space. A bracketed all-digit
  colour such as "(#333)" still cannot be told from a PR number and is
  refused; the spec says so rather than claiming otherwise.

Task: NEC-116

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hq2ZoBQaUJZbSCBfTgqyAb
cruelacid force-pushed worktree-nec-116-changelog-cut-strips-only-a-trailing-n-s from eee6ee7868
All checks were successful
Release note / release-note (pull_request) Successful in 13s
CI / build (pull_request) Successful in 4m37s
CI / e2e (pull_request) Successful in 5m13s
CI / promote (pull_request) Has been skipped
to 8f31add08a
All checks were successful
Release note / release-note (pull_request) Successful in 16s
e2e / multi (push) Successful in 4m37s
CI / build (pull_request) Successful in 4m47s
CI / e2e (pull_request) Successful in 5m26s
CI / promote (pull_request) Has been skipped
Deploy site / deploy (push) Successful in 48s
CI / build (push) Successful in 4m53s
CI / e2e (push) Successful in 5m16s
CI / promote (push) Successful in 31s
2026-09-26 07:51:48 +01:00
Compare
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Nectenda/nectenda!181
No description provided.