## Description
Merging release PR #4643 did not create `v0.43.0` because its body
contained repeated carriage returns (`CRCRLF`). Release Please removes
one CRLF layer and then looks for exact `---` delimiter lines; the
leftover CR prevents release detection. The merge-triggered
[run](https://github.com/headroomlabs-ai/headroom/actions/runs/42065983322)
succeeded while logging `Pull request body did not match` and `could not
parse pull request body as a release PR`, leaving #4643 labeled
`autorelease: pending` and opening #4661 from the old release baseline.
Normalize only the damaged envelope before Release Please reads pending
merged releases. Eligibility requires a merged bot PR, a main base, a
release-please main branch in this repository, the pending label, and
repeated-CR damage. Ordinary CRLF, open PRs, human PRs, forks and
unrelated historical bodies are untouched. The normalized body must
still have a valid release-note envelope. JSON is sent through stdin,
avoiding another Windows text-file conversion.
The malformed body came from Windows text-mode maintainer tooling, not
contributor runtime code. That local writer has separately been
corrected to preserve LF.
## Type of Change
- [x] Bug fix (release automation)
## Changes Made
- Add a narrow, default-read-only body normalizer and tests.
- Run it with the workflow's existing release credential before release
detection.
- Allowlist the checked-in helper in `.gitignore`.
## Testing
- `pytest scripts/tests/test_normalize_release_pr_bodies.py
tests/test_release_workflows.py -q`: **75 passed**.
- Ruff 0.17.3 check/format and `git diff --check`: pass.
- `actionlint .github/workflows/release-please.yml`: pass.
- Regression tests demonstrate the old exact-delimiter parser fails on
CRCRLF, then verify repaired delimiters, eligibility exclusions, dry-run
no writes, JSON-stdin transport and workflow ordering.
## Real Behavior Proof
- Environment: Windows, Python 3.12.13, gh CLI; current main
`8d3e9e5ca`.
- Exact command: `python scripts/normalize_release_pr_bodies.py --repo
headroomlabs-ai/headroom` (default read-only).
- Observed result: `Would normalize release PR #4643`, exit 0. Other
historical pending PR formats were not edited. Current GitHub has no
`v0.43.0` tag/release; the exact merge-triggered log identifies the
failed body parse above.
- Not tested: deliberately did not run `--apply`, repair the live body,
create a tag/release, dispatch a release workflow, or publish packages.
No hosted release recovery is claimed.
## Runtime Rollout Safety
- Rollout-managed feature(s): none; trusted main release automation
only.
- Stable/default behavior changed: on the next normal main push after
this fix merges, the workflow can normalize #4643's damaged body and let
Release Please create its pending release. This is the intended
recovery; review this effect before merging.
- Disable/rollback: revert the normalization step. The helper defaults
to read-only when invoked manually without `--apply`.
- No package versions, notes, labels, tags or releases are directly
changed by the helper; Release Please retains those responsibilities.
## Review Readiness
- [ ] This PR is ready for human merge review (draft pending independent
review/hosted checks).
## Additional Notes
Do not manually remove repeated generated entries from #4661. Once
0.43.0 is recovered, release notes should be regenerated from that
proper baseline. This PR does not perform that recovery or change
generated `CHANGELOG.md` itself.