Skip to content

chore: replace per-PR changelog edits with generated release notes - #4578

Merged
cragwolfe merged 3 commits into
mainfrom
codex/hl-drop-changelog-dance-drop-changel-private.complete-one-off
Oct 22, 2026
Merged

cragwolfe merged 3 commits into
mainfrom
codex/hl-drop-changelog-dance-drop-changel-private.complete-one-off

Conversation

@cragwolfe

@cragwolfe cragwolfe commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

TL;DR

Every code PR currently competes to edit the top of CHANGELOG.md and advance the development version. Those shared lines cause avoidable conflicts and rebases, especially for external contributors. This draft proposes using PR titles and GitHub generated release notes instead, while keeping the existing version format and human release process.

This PR adds no changelog entry and does not bump 0.27.34-dev3: it is the first PR under the proposed convention. The only changelog edit is a freeze notice; all history remains intact.

Proposed contributor convention

  • Ordinary PRs do not edit the changelog or bump the package version. Multiple commits on main may share one -devN version.
  • A PR title written for users as a conventional commit (for example, fix: … or feat: …) becomes the release-note entry. Apply enhancement, bug, or another appropriate existing category label. External contributors can ask a maintainer to label their PR.
  • An optional Release note section supplies detail for the releaser to paste into the release, particularly breaking-change impact and migration instructions.
  • .github/release.yml groups entries into Breaking changes, Enhancements, Fixes, and Other changes. It excludes the existing dependencies label; the releaser must restore significant security/dependency updates during curation.

The repository's labels were checked with gh label list. breaking-change does not exist, and this PR creates no labels. The release.yml file reserves that category for later use. Until then, breaking PRs use ! in the title, an existing category label, and manual placement during curation.

Release day, step by step

  1. Open a release PR that changes unstructured/__version__.py from -devN to the final version, for example 0.27.34-dev3 to 0.27.34. Leave the frozen changelog alone.
  2. Verify that no tag or existing release already represents that final version. Use packaging.version.Version to normalize versions when comparing: 0.27.34-dev3 and 0.27.34.dev3 are the same version. Skip tags that are not package versions, such as opencv-*. Squash and merge the release PR: only that commit may introduce the final version. Before merging the release PR, empty the merge queue. Queue no ordinary PRs until the next development bump lands.
  3. Create the GitHub Release and tag from that release commit using the existing process. Click Generate release notes and explicitly select the previous package release tag. Curate labels and categories, paste useful Release note sections, and add significant excluded security/dependency updates. For this first release, also carry forward relevant entries from the frozen development section.
  4. Publish using the existing process. No publication, PyPI, Docker, or release workflows change.
  5. A human immediately opens and merges the next development-version PR, for example 0.27.35-dev1. Resume ordinary merges only after that bump, so no later commit retains the released final version.

Removed enforcement and automatic edits

  • Removed the CI changelog job and changelog-enforcer action.
  • Removed check-version from make check, and removed the check-version and version-sync targets. They compared against the latest changelog heading, which no longer changes.
  • Retired the version-sync and Renovate security-bump script implementations. They now fail with a pointer to the new instructions; they cannot edit the changelog or version file. Removed Renovate's PR-time post-upgrade hook so dependency PRs follow the same convention. The shared security configuration remains inherited.
  • Added a PR template and updated the contributor checklist and release instructions.

Merge prerequisite: changelog is currently required by main branch protection (verified through the GitHub API). A repo admin must remove changelog from the required checks before this PR can merge, because this PR itself no longer produces that check. Do this when the proposal is accepted, just before merging; until then other PRs still run the existing job. The active rulesets were checked as well. This PR does not change repository settings.

The removed check-version command also blocked ordinary PRs while main held a final version. That guard becomes a manual step in this round: empty the merge queue before merging the release PR, then queue no ordinary PRs until the next development bump lands. A replacement CI guard is deferred.

The unchanged Docker workflow publishes a version tag on every push to main. Repeated development versions therefore make tags such as :0.27.34-dev3 move across commits. Consumers who need a fixed image should use the existing short-commit-SHA image tag. Renovate security PRs also stop preparing final versions automatically; a maintainer must decide when to prepare their release.

An organization code search for renovate-security-bump found no executable configuration outside this repository calling renovate-security-bump.sh. Shared configuration has no script hook; related documentation describes copying a local script. No cross-repository changes are included. Any unindexed consumer that downloads renovate-security-bump.sh from main must retire its hook or keep a pinned historical copy.

Deferred work and limits

The optional duplicate-final-version CI guard is deferred: it needs normalized comparisons across all tags and existing releases, plus a policy for releases created after a PR check runs. It would not by itself enforce merge ordering. The manual check and short release-only merge window above remain necessary in round 1.

Round 2 can automate the post-release development bump. Automated tagging/publishing and tag-derived versions are optional later proposals; this draft changes none of those mechanisms and does not introduce setuptools-scm or hatch-vcs.

Validation

Targeted YAML/JSON5 parsing and preservation checks passed: changelog history is intact, the package version and publication workflows are unchanged, and retired hooks are absent. Shell syntax and ShellCheck passed for both retired commands. make -n check invokes only the existing Ruff checks; git diff --check passed. Exact-head CI will provide broader coverage; long-running jobs will not block this draft handoff.

Make check command selection

The normal check target no longer reads the frozen changelog.

$ make -n check
uv run --no-sync ruff check .
uv run --no-sync ruff format --check .

Retired command validation

Both former entry points have valid shell syntax and pass ShellCheck.

$ bash -n scripts/version-sync.sh scripts/renovate-security-bump.sh
$ shellcheck scripts/version-sync.sh scripts/renovate-security-bump.sh

Review

Independent Claude Opus code review at 3c36862bd199355ce75e930fca46e62cfda39881: APPROVED, no blocking findings.

The first round requested explicit merge-queue ordering, inspection of required checks and external script callers, and documentation of Docker-tag and security-release effects. Those findings were verified and addressed above and in the contributor instructions. The final round approved the source and suggested description clarifications; the merge prerequisite and normalization wording were clarified. Exact-spelling-only tag commands were not adopted because they miss normalized aliases. The optional README Docker-tag clarification is deferred; the operational effect is documented above. Opus 4.6 also reviewed the description for clear language, and valid suggestions were applied.

Exact-head CI at handoff: Python 3.11–3.13 lint, ShellCheck, shfmt, CodeQL, and Socket security checks passed. Broader test and Docker jobs were still running; no long-running CI wait was required.

(authored by codex)

@cragwolfe
cragwolfe marked this pull request as ready for review October 22, 2026 04:18

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 9 files

Shadow auto-approve: would not auto-approve. This PR does not meet the repository auto-approval settings.

View guided diff | Re-trigger cubic

@cragwolfe
cragwolfe merged commit d1535fe into main Oct 22, 2026
54 checks passed
@cragwolfe
cragwolfe deleted the codex/hl-drop-changelog-dance-drop-changel-private.complete-one-off branch October 22, 2026 19:48
cragwolfe pushed a commit to SashaMIT/unstructured that referenced this pull request Oct 24, 2026
… items (Unstructured-IO#4580)

## Summary

A bulleted list that starts on the line right after its lead-in, with no
blank line between them, loses its list items in `partition_text()`:

| text | `main` | this PR |
| --- | --- | --- |
| `Shopping list:` / `• milk` / `• bread` | `Title("Shopping list:")`,
`Title("milk")`, `Title("bread")` | `Title("Shopping list:")`,
`ListItem("milk")`, `ListItem("bread")` |
| `Shopping list:` / `• fresh milk and cheese from the farm market` / `•
bread` | one `NarrativeText("Shopping list: • fresh milk and cheese from
the farm market • bread")` | `Title`, `ListItem`, `ListItem` |

`group_broken_paragraphs()` sends a paragraph to
`group_bullet_paragraph()` only when the paragraph itself starts with a
bullet. A lead-in line followed by bullets is one paragraph that does
not, so it takes the other path:

- When all lines are short, it splits the paragraph with
`PARAGRAPH_PATTERN_RE`. That pattern splits at unambiguous bullets as
well as at line breaks, and it captures the separator, so each `•`
becomes a piece of its own. `group_broken_paragraphs("Shopping list:\n•
milk\n• bread")` returns `'Shopping list:\n\n\n•\n\n milk\n\n\n•\n\n
bread'`, `partition_text()` drops the lone bullets as empty bullets, and
the items are classified as titles.
- When a line is long, it joins all lines into one paragraph, so the
list becomes part of the lead-in text.

## Change

`group_broken_paragraphs()` first passes each paragraph to a new
`_split_off_bullet_lists()`. It splits off the lists whose items start
with `•` (U+2022), `●` (U+25CF) or `○` (U+25CB) and the lines around
them. The existing code then groups each part unchanged, as if a blank
line separated it from the next one, so a split-off list goes through
`group_bullet_paragraph()`:

- A list starts at a line that begins with one of these glyphs, right
after a line that ends with `:`.
- After an item, only another item or the lead-in of the next list may
follow, such as `Vegetables:` in `Fruits:` / `• apple` / `Vegetables:` /
`• carrot`.

These glyphs only mark list items, while `-`, `*` and `·` can also be a
sign, Markdown emphasis or a thematic break, or an operator. As agreed
in review, lists with those markers are left to a follow-up with agreed
recognition rules. These paragraphs stay whole and are grouped exactly
as before:

- A paragraph with a line that starts with any other bullet glyph (`-`,
`*`, `·`, `–`, …) or with `e `, which can be an OCR bullet, and a
paragraph with an item line that the bullet matcher downstream
(`UNICODE_BULLETS_RE`) does not read as a bullet, such as `•- 5 °C`,
where another glyph follows the bullet directly.
- A paragraph with a bullet glyph inside a line, after the line's
leading marker: the bullet splitters downstream cut at any glyph of
`UNAMBIGUOUS_BULLETS_PATTERN`, so `10 N·m`, `*really*`, `Required
*production* settings:`, `3 · 4` and inline lists (`• milk • eggs`)
would lose characters.
- A paragraph that starts with a bullet, or whose bullet line does not
follow a `:` line.
- A paragraph with any other line after an item, such as a wrapped item
or prose after the list, because that line can continue the item.
- Every paragraph, when the caller passes its own `line_split`.

## Testing

-
`test_group_broken_paragraphs_keeps_a_bulleted_list_after_its_lead_in_line`
covers short and long items with each of the three glyphs, a glyph
without a following space, successive lead-ins and indented bullets. All
cases fail on `main`.
-
`test_group_broken_paragraphs_keeps_a_lead_in_list_with_an_inline_bullet_glyph_as_before`
checks, with LF and CRLF, that the helper keeps `N·m`, `*really*` in an
item, `*production*` in a lead-in, `3 · 4`, `3 ∙ 4` and a late rejection
after a supported list whole, and that `group_broken_paragraphs()`
returns `main`'s text for them. These cases fail on d95b0f9.
`test_group_broken_paragraphs_keeps_a_lead_in_list_with_a_glyph_after_its_bullet_as_before`
does the same for `•- 5 °C`, `•– 5 °C` and a rejection after a supported
list; it fails on 08d4f79. A spaced `• - 5 °C` still splits off and
keeps its sign.
- `test_split_off_bullet_lists_keeps_an_ambiguous_paragraph_whole`
covers dash, star and middle-dot lists, a list that mixes `•` and `-`,
emphasis, inline bullets, an OCR `e` line, a bullet without a lead-in,
and prose or a wrapped line after an item.
`test_split_off_bullet_lists_keeps_a_long_wrapped_list_item_whole`
checks an item with 20,000 wrapped lines.
-
`test_partition_text_reads_a_bulleted_list_that_follows_its_lead_in_line`
runs the lists through default `partition_text()`, also with prose
before the lead-in and with two lists in a row, plus ambiguous
paragraphs (`N·m`, `*really*` with CRLF, a late rejection, prose after
an item) that stay one `NarrativeText` as on `main`. The custom
`line_split` tests keep a configured paragraph grouper's own split.
- Compared with `main`: 16,000 random ambiguous paragraphs (LF and CRLF,
each with another bullet glyph at the start of a line, a glyph inside a
line such as `N·m` or `*x*`, a line after an item or a bullet without a
lead-in) come out of `group_broken_paragraphs()` exactly as on `main`
(1,676 differed before the inline-glyph fallback, and 1,540 before the
bullet-matcher check, with `•- 5 °C`-style lines added), and in 3,000
random supported lists every item becomes a `ListItem`.
- `test_unstructured/cleaners` (without `test_translate.py`, which needs
`transformers`), `test_unstructured/nlp`, `partition/html`,
`partition/test_text.py`, `test_email.py`, `test_md.py` and
`test_text_type.py`: 976 passed, 1 skipped.
- `ruff check` and `ruff format --check` (0.15.10) pass. Since Unstructured-IO#4578 a
PR no longer edits the version or the CHANGELOG, so this one leaves both
alone.
sinnercode228 added a commit to sinnercode228/unstructured that referenced this pull request Oct 24, 2026
Resolve the conflicts in CHANGELOG.md and unstructured/__version__.py by
taking main: CHANGELOG.md is frozen and ordinary PRs no longer bump the
version (Unstructured-IO#4578), so this PR drops its changelog entry and version bump.
cragwolfe added a commit that referenced this pull request Oct 24, 2026
## Summary

`CHANGELOG.md` was frozen in #4578, but nothing enforces the freeze: PRs
written under the old convention still edit it. This makes the existing
required `check-version` job fail when a PR changes `CHANGELOG.md`, with
a message pointing to the PR title and the "Release note" section.

The check lives in `scripts/check-new-release-version.sh`, with
regression tests in `scripts/test-check-new-release-version.sh`. No
workflow, settings or branch-protection changes are needed, because
`check-version` is already a required check.

## How it decides

The check compares `CHANGELOG.md` between the base that `check-version`
already uses and the commit under test:

- **Pull requests:** the base is the first parent of the merge ref, the
`main` snapshot the merge result was built on. Only the PR's own changes
count, so a stale PR that never touched the changelog still passes.
- **Merge queue:** the base is the queue entry ahead, which the job
already fetches. Each PR is judged only on its own change.

The check runs before the version rules, so it applies whatever the
version does, release PRs included.

## Validation

- `shellcheck` and `shfmt -i 2 -d` are clean.
`scripts/test-check-new-release-version.sh` passes 27 cases, including
two new ones that edit `CHANGELOG.md` in a temporary repo: one as a
merge-group entry and one as a `pull_request` merge result. Both new
cases fail without this PR's script change.
- Simulated locally against current `main`:
  - this branch, no changelog edit (queue-style base): **PASS**
- PR editing `CHANGELOG.md` (queue-style base): **FAIL** with the freeze
message
- PR editing `CHANGELOG.md` (`pull_request` merge ref, `HEAD^1` base):
**FAIL**
  - PR without a changelog edit (`pull_request` merge ref): **PASS**

## Release note

None (CI-only).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants