Repository navigation
Tell the changelog editing agent what it may not delete - #116221
Conversation
The editing step of the `NightlyChangelog` job has been failing its own
verification every night since 2026-08-12, always the same way:
Entries disappeared in the edit without a matching revert (['103182', '109946'])
`verify_edit` requires that every raw entry of a strict-retention category
keeps its pull request link - an entry may be rewritten, merged or moved, but
not dropped, because the generation point has already moved past it and no
later run will offer it again. The prompt never said so, and the skill stated
the rule only implicitly, so the agent pruned entries it judged
insignificant: `#103182` (`Lightweight Updates v2`, a `Backward Incompatible
Change`) was deleted outright.
The second half of the same failure is the revert handling. `#109946` fixed
the propagation of settings in `accurateCastOrDefault`, `#114911` reverted
it, and `#114912` reverted that revert - all three in one range. The skill
covers this in section 2.5, but the agent reached the "landed and then
reverted, so delete both" rule first and lost a fix that ships.
So:
- The prompt now lists the strict-retention categories (from
`STRICT_RETENTION_CATEGORIES`, so the two cannot drift apart), says which
entries may be deleted and why deleting anything else is unrecoverable, and
states the revert-of-revert rule.
- The skill gets a retention rule ahead of the individual edits, and the
walk over `NO CL ENTRY` checks whether a revert is itself reverted before
it concludes that a change was reverted. The `accurateCastOrDefault` chain
is written out there as the worked example.
- A retry now tells the agent why the previous attempt was rejected. Without
it, all three attempts of a run reproduced the same edit and the same
rejection - visible in every run from 2026-08-12 on.
A hand edit that followed these rules passed `verify_edit` on the first try,
which is how the 26.8 backlog (759 raw entries) was cleared in
#111720.
Related: #111720
Related: #116138
|
Workflow [PR], commit [a6aa16d] Summary: ✅ AI ReviewSummaryThis PR hardens the Final VerdictStatus: ✅ Approve |
The `clickhouse_spelling` check failed on the 26.8 changelog pull request (`CHANGELOG.md:366: Clickhouse`) because an entry carried the misspelling straight out of the pull request body it was generated from. The editing skill lists the typos to fix, so list this one - it is now enforced by CI - along with `loose`/`lose` from the same sentence. Related: #111720
The skill spells out the misspellings (`Clickhouse`, `clickHouse`, `Click House`) that the check rejects, in the same way the check, the ignore list and the style guide do, so the line documenting them needs a line-scoped exception. Fixes the `Style check` failure: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=116221&sha=9f07be43f844d60794ffcc6ab3a9c9ad136e44d6&name_0=PR&name_1=Style%20check PR: #116221 Co-Authored-By: Claude Fable 5 <[email protected]>
Address review: `resolve_reverted_originals` granted deletion credit to every raw-block revert with a `Reverts owner/repo#N` marker, even when that revert was itself reverted later in the same range — so an edit dropping `#109946` (reverted by `#114911`, which `#114912` reverted in turn) still passed verification while the fix ships in the release. Now the resolved reverts are walked in descending PR-number order (a revert always has a higher number than its target): an uncancelled revert cancels the reverts it targets and only uncancelled reverts contribute deletion credit. Because a revert of a revert made through the web UI can lack the body marker (`#114912` has none), the target is also resolved from the nested title — `Revert "Revert "X""` binds to the earlier range revert titled `Revert "X"`. PR: #116221 Co-Authored-By: Claude Fable 5 <[email protected]>
`verify_edit` was only net-effect aware inside one raw block, while the job edits a release cycle in ~30 nightly increments and a revert chain routinely spans them: 1. run N integrates `#109946`; 2. run N+1 sees `#114911` and deletes `#109946`; 3. run N+2 sees only raw `#114912`. On run N+2 nothing disappears in the edit — `#109946` went away the previous day — so verification passed with a shipped fix missing from `CHANGELOG.md`, and the editing agent had no way to know the entry ever existed: it is gone from the file, and the intervening revert is gone from the raw blocks. The branch now carries that memory itself, in trailers on its own edit commits, the same way `Changelog-generated-up-to:` carries the generation point: Changelog-revert: <revert> <reverted> <title of the revert> Changelog-deleted-entry: <pull request> <its bullet as it was deleted> `analyze_reverts` resolves each run's reverts against that ledger and reduces the *cumulative* graph, so a chain spread over several runs behaves exactly like one arriving in a single raw block, at any depth: - the reduction is what decides deletion credit, so a cancelled revert licenses nothing; - an entry recorded as deleted whose revert is no longer uncancelled has to be back in `CHANGELOG.md` — `verify_edit` fails the run while it is not, and the prompt asks for it by name, quoting the bullet from the ledger; - the recorded titles also let a web-UI `Revert "Revert "X""` (which carries no `Reverts owner/repo#N` marker) bind to an earlier revert the job saw days ago. A branch whose edit commits predate the trailers has an empty ledger and keeps the previous behaviour. `ci/tests/test_changelog_nightly_revert_ledger.py` pins the timelines: the whole chain in one block, the revert alone, the revert of the revert arriving after the deletion, a revert of the re-apply, an empty ledger, and an unresolvable revert.
…ewest bullet Two defects in the ledger, both found by the AI review of the previous commit: - The nested-title fallback bound a `Revert "Revert "X""` to *every* earlier revert titled `Revert "X"`. Revert titles are not unique — the same change can be reverted twice in a cycle, and both reverts carry that title — so an ambiguous match would cancel unrelated reverts and hand out deletion credit for, or demand the restoration of, entries nobody reverted. Only an unambiguous match binds now; anything else stays unresolved, which grants no credit at all. - `read_revert_ledger` let the *oldest* `Changelog-deleted-entry:` record win, because `git log` walks newest first and the loop assigned unconditionally. An entry that is deleted, restored, and deleted again carries the link of the pull request that re-applied it the first time, and that text would have been dropped on the second restoration. `setdefault` keeps the newest record. Both are pinned by tests that fail without the fix: `test_ambiguous_nested_title_binds_to_nothing` and `test_restoring_uses_the_newest_recorded_bullet`.
|
🕵 Both fixed in cd0489b, each with a test that fails without the fix. Ambiguous nested titles. Agreed — revert titles are not unique, and two reverts of the same change both carry Oldest-wins replay. Also right:
|
…cord `Changelog-deleted-entry:` stored a flat pull request -> whole bullet snapshot, but a merge (skill section 7) puts several pull requests on one bullet — 74 of them in the current `CHANGELOG.md`. Two things went wrong with that: - When only one of a merged bullet's pull requests was reverted, the bullet stayed in the file carrying the others, and the recorded line was the whole merged one. The prompt asked for that line back, which duplicates the siblings, and `verify_edit` accepted it: `not_restored` only asks whether `/pull/109000)` appears somewhere. - When the whole merged bullet was deleted, every one of its pull requests was recorded against the same line, so the prompt listed the same bullet once per pull request. `group_restorations` now groups the entries to restore by the line they were recorded from — one bullet is restored once, however many pull requests it covers — and reports the `siblings` of that line which are still in the file. The prompt names them and asks for the missing link to be put back into the existing bullet instead of a copy of the recorded line. `duplicate_attributions` closes the verification gap: an edit that newly attributes a pull request twice in the in-progress section is rejected. Duplicates that predate the edit are left alone — the file has 20 of them across released sections, where the same pull request legitimately appears in a release and in a backport. `test_verify_edit_accepts_only_the_exact_merged_bullet_restoration` runs the whole path: leaving the reverted pull request out is rejected, pasting the recorded bullet next to the surviving one is rejected, merging the link back in passes. Without the duplicate check the paste is accepted, which is the reported defect.
|
🕵 Fixed in c74a94a. The finding is right, and it is not hypothetical — the current Two distinct failures came out of the flat
On the verification gap — you are right that On the test request —
I confirmed it fails for the right reason: with the duplicate check removed, the paste case returns |
… section Two more carriers were missing on the restore path. `resolve_revert_targets` handled the `Reverts owner/repo#N` body marker and the nested `Revert "Revert "X""` title, but not `Revert #NNNNN` — the other form the skill names, and the one that needs no matching at all because it states the target. A re-apply titled that way stayed unresolved, the stale `109946 → 114911` credit survived from the ledger, and the shipped fix stayed dropped. It is now parsed before the nested-title form, anchored on the whole title so that `Revert "Fix #12345"` — a quoted original title that mentions an issue — is not read as naming `#12345`. While there: every resolution form now requires the target to have the lower pull request number. A revert is always merged after what it reverts, and that is the invariant `revert_net_effect` settles whole chains with in one descending pass, so a relation that breaks it is not a revert relation and is dropped rather than trusted. `group_restorations` decided that a merged bullet was "still there" by looking for its other pull requests anywhere in the file, so a sibling that survives only in an already-released section — the same pull request in the previous release or in a backport, of which the file has 20 — made the prompt ask for a merge into a bullet that is not in the in-progress section. The sibling test is now scoped to that section. Whether an entry is missing at all is still asked of the whole file, on purpose: a link sitting in a released section was published there and has no business in this release. Four tests added, including the two the review asked for: the cross-run restore driven by a `Revert #NNNNN` title, and a recorded merged bullet whose sibling survives only below. Both fail without the corresponding fix.
|
🕵 Both fixed in e8b367d, each with a test that fails without its fix.
Two details worth flagging, since neither was in the finding:
Sibling scope. Also right, and it is the mirror of a distinction I had already drawn elsewhere and then failed to apply here. Whether an entry is missing is deliberately still asked of the whole file, matching 17 tests. |
Two restore-path gaps, both real. **Scope.** Whether a recorded entry is back was asked of the whole file, so a copy of the same pull request in an already-released section satisfied the check and the in-progress section could stay without the entry. My previous round defended that scope by pointing at `disappeared_entries`, which was the wrong analogy: `removed` there is already section-scoped and consults no released copy, so a `Changelog-deleted-entry:` record exists precisely for an entry that *was* in the in-progress section. That is where it has to come back, and all three restore questions - is it missing, is there a bullet to merge into, is it in the right place - are now asked of that section. The different question `disappeared_entries` asks of a raw entry that never made it in keeps its whole-file scope, with the reason spelled out next to both. **Category.** The ledger recorded the bullet but not the `#### <Category>` it sat under, and the category is not derivable from the pull request: the editing rules promote entries out of `NOT FOR CHANGELOG` (skill section 3) and move them between real categories (section 6), so it is a decision of the edit that first added the entry. The trailer is now `Changelog-deleted-entry: <pr> [<category>] <bullet>`, the prompt names the category instead of asking for it to be re-derived, and `verify_edit` rejects a restoration that lands elsewhere. Only this run's restorations are checked - the ledger keeps the record for the rest of the cycle, and a later edit may legitimately move the entry again. `entry_line` becomes `entry_placement`, returning the category with the bullet. Two tests added, the ones the review asked for: `test_a_released_copy_does_not_stand_in_for_the_restoration` and `test_a_promoted_entry_is_restored_under_the_category_it_was_moved_to`, both driving the real `verify_edit`. Each fails without its fix.
|
🕵 Both fixed in 65e034f, each with a test that fails without its fix. Scope. You are right, and my previous round defended the whole-file scope with the wrong analogy. I pointed at
Category. Also right, and worse than a cosmetic slip: the category is a decision of the edit that first added the entry, not a property of the pull request, so re-deriving it undid §3 promotions and §6 moves. The trailer is now One deliberate limit there: the category check applies only to this run's restorations, not to every entry in the ledger for the rest of the cycle. The ledger is append-only, so a permanent check would freeze that entry's category for the remaining ~30 runs and forbid a later legitimate §6 move.
Both rules are in the skill's §2 step 6 as well, for a human running it by hand. 19 tests. |
The restore path asked whether `/pull/<pr>)` appears anywhere in the in-progress section, which a bare link inside somebody else's bullet satisfies: a `This closes` reference, or a follow-up named in prose. The entry then never comes back as its own attribution and `verify_edit` accepts the edit. `entry_placement` had the same hole from the other side - it fell back to a merely mentioning bullet, so the category check read the category of an unrelated entry. This is not theoretical: the current `CHANGELOG.md` links 17 pull requests that way without ever attributing them, while exactly one of its 4165 bullets carries a link and no attribution at all. The attribution `[#N](.../pull/N) ([Author](...))` is what the generator emits for every entry and what a merge (skill section 7) appends per merged pull request, so requiring it costs nothing and is what "the entry is there" means. `is_attributed` is now the test for all three restore questions - is the entry missing, is a sibling's bullet still there to merge into, and (through an attribution-only `entry_placement`) which category it landed in. `test_an_inline_mention_does_not_stand_in_for_the_restoration` drives `verify_edit` with a section whose only occurrence of `#109946` is a mention inside a bullet attributed to `#120000`: rejected, and accepted once the real entry is there beside it. `test_a_sibling_only_mentioned_inline_is_not_a_bullet_to_merge_into` covers the sibling side. Both fail without the fix.
|
🕵 Fixed in d5c38de, with a test that fails without the fix. The blocker is real, and it had the same shape on both sides: I measured it against the real file rather than reasoning about it:
21 tests. |
**The retention path judged entries by any link, the restore path by attribution.** The previous commit fixed the restore side only, so a strict raw entry still counted as preserved when another bullet merely mentioned its pull request in prose — and `revert_licensed_deletions` then had no attributed bullet to snapshot, making the entry unrecoverable as well as gone. Both halves of `disappeared_entries` now use the attribution, which also removes a spurious failure in the other direction: rewording a bullet and dropping an inline reference to another pull request is not the loss of that pull request's entry. **A restoration did not have to record the pull request that re-applied the change.** Skill section 2.5 appends its link to the entry, and that link is the only trace of the re-apply left in the release, since its own revert bullet is deleted. Restoring a bare `#109946` without `#114912` passed. `verify_edit` now requires it, on the bullet the entry landed on rather than somewhere in the section, and only for this run's restorations — a later edit may reword the entry. **The duplicate guard compared sets of duplicated pull requests.** An entry already written twice could gain a third copy without changing the set. `duplicate_attributions` becomes `attribution_counts`, and the check is `count > max(1, count before the edit)`: no increase is allowed, while the count an edit inherits is left alone (removing an entry is what the retention rule forbids). Four tests added; each fails without its fix.
|
🕵 All three fixed in 21406b7, each with a test that fails without its fix. Retention path judged by any link. Right, and it was my own inconsistency: the previous commit made the restore path attribution-based and left the retention path on substring matching. Both halves of Fixing it also removed a spurious failure in the opposite direction, which the any-link check had: Re-apply link not enforced. Correct, and this one loses information permanently for a reason worth spelling out: the re-applying pull request's own revert bullet is deleted, so the link appended to the entry is its only trace in the release. Set-based duplicate guard. Correct. 25 tests. |
…survivor **`cancelling` was any-target, not every-target.** A revert that undoes something of this release *and* something that shipped earlier was exempt from strict retention on the strength of the first half alone, so its own entry could disappear with the entry it cancels - taking the user-visible half of it (skill section 2, case 5) out of the changelog. The exemption now needs every target to belong to this cycle; one target from an earlier release keeps the revert's entry protected. **The shared-bullet rule ignored the pull requests that never left.** The split check compared the bullets of the restored pull requests only, so with `#109000` and `#109006` off one bullet and only `#109000` restored, re-adding it as a second bullet with the same prose passed everything: no attribution repeats, the category matches, the re-apply link is there. The check now spans the group's `siblings` too, which is what "merge it back into the bullet that survived" means. The duplicate-attribution check moves ahead of the shared-bullet one: pasting the recorded merged bullet beside the survivor trips both, and "you wrote this entry twice" is the more specific diagnosis. Two tests added. Each fails without its fix, and the shared-bullet one asserts that no attribution repeats in its input, so it cannot pass as a restatement of the duplicate check.
The skill states the rules the job enforces, so a human running it by hand follows the same ones: a revert that spans two releases keeps its own entry, and a restoration merges into the bullet that survived rather than being added beside it.
|
🕵 Both fixed in cf845a6 (skill wording in d6189a6), each with a test that fails without its fix.
The shared-bullet rule ignored the pull requests that never left. Also right, and it is the sharper of the two: with One consequential reordering: the duplicate-attribution check now runs before the shared-bullet one. Pasting the recorded merged bullet beside the survivor trips both, and "you wrote this entry twice" is the more specific diagnosis to hand back to the agent; the shared-bullet check is then left with exactly the case no other check sees, the trimmed copy. 41 tests. |
`reapply_allowance` counted only the entries a re-applying pull request is appended to, so a pull request that re-applies something of this release *and* reverts something of an earlier one - one entry it brings back, plus its own visible entry for the older revert (skill section 2, case 5) - was rejected as `#116500 2 times`. That is the only correct changelog for that state, so the job would have wedged on it. The allowance now adds one for a re-applier that is not in `cancelling`. That set is exactly the discriminator: a revert whose targets all belong to this cycle leaves no trace of its own and is attributed once per entry it brings back, while one with a target from an earlier release keeps an entry too. The ordinary revert of a revert is in `cancelling`, so its allowance is unchanged. `test_a_mixed_target_reapply_keeps_its_own_entry_too` accepts the two attributions and still rejects a third. It also pins a limit rather than papering over it: with the link appended to the restored entry, dropping the pull request's own bullet leaves it attributed, and since the rules do allow an entry to be merged into another bullet (section 7), link presence cannot tell a legitimate merge from an entry reduced to an annotation. Enforcing an own bullet here would forbid a legitimate merge, so the check stays out and the test records why.
|
🕵 Fixed in 4cbf1d6, with a test that fails without the fix. The finding is right and it is a wedge, not a loss:
One thing I did not add, and want to flag rather than leave implied. My first draft of the test also asserted that dropping On the environment note: |
…is not an entry **Same-cycle detection now has a durable source.** `cycle_entries` was built from what the changelog still shows - the section, this run's raw entries, the recorded deletions, the revert graph - and an entry pruned as insignificant on an earlier run leaves none of those. A revert of it arriving weeks later therefore looked like a revert of an earlier release: deleting it was rejected, or keeping a visible bullet for a change with no net effect was accepted. `release_range_prs` answers the question from git instead: the pull requests merged into master since the cycle's `vX.Y.1.1-new` tag, from both subject shapes the repository uses. Git remembers the range whatever the changelog did with it. `--first-parent`, so the walk stays on master's own commits - a contributor branch can carry merges of pull requests of the contributor's *fork*, and there are five such numbers in the 26.8 range (`Merge pull request #4 from someone/...`), which mean nothing here. 2277 pull requests for that range, in 0.3s. **And the limitation from the previous round is closed rather than documented.** A re-applier that also reverted something of an earlier release has a change of its own; the link it contributes to the entry it brought back is an annotation on someone else's bullet and cannot stand in for that. It is checkable without forbidding a legitimate merge, by asking for *some other* bullet rather than for a bullet of its own: a section 7 merge into a third entry still passes, while collapsing the entry into the annotation does not. Two tests added. The pruned-entry one runs the same input with and without the range, so it shows both the old verdict and the new one; the annotation one also asserts that the legitimate merge is still accepted.
|
🕵 Both addressed in be76347 — including the one I had dismissed. You were right to re-raise it. Same-cycle detection now has a durable source. Two details from implementing it:
And I was wrong to close the second one as a limitation. It is checkable, and the distinction I thought blocked it is the thing that makes it work: ask for some other bullet rather than for a bullet of its own. A section 7 merge of The reasoning I gave for dismissing it ("link presence cannot tell a legitimate merge from an annotation") was true of link presence and false of the check that was available; I should have looked for that instead of documenting the gap. 43 tests. |
`cancelling` said a same-cycle revert's own bullet *may* go and left it at that, so an edit could delete the entry the revert cancelled and still publish the revert itself as an ordinary `Improvement`. The change and its undoing cancel out; the skill's rule is that the user sees no trace of either side, and half of it was unenforced. The same allowed-but-not-required asymmetry as `credits` two commits ago, in the sibling set. `verify_edit` now rejects an attribution of a `cancelling` pull request in the in-progress section - with one exception that had to be carved out carefully: the link of a revert of a revert on the entry it brought back. That pull request is in `cancelling` too (its target is a revert of this cycle), and skill section 2.5 *requires* its link there, so the check asks only for attributions on bullets other than the entries it re-applied. Without that carve-out the verifier would demand the link and then reject it. `test_a_revert_under_a_real_category_is_still_a_revert` gains the accepted-bad shape the review named, and `test_a_reapply_link_is_not_a_lingering_revert_entry` pins the carve-out from both sides.
|
🕵 Fixed in 8437a7d, with the accepted-bad shape you named as the regression. You are right, and it is the same allowed-but-not-required asymmetry as
One note on that second test: the "bullet of its own" case is caught by the duplicate guard rather than by this check, because 44 tests. |
…ot cancelled
**A re-apply link on a recorded line is not a pull request that shared the
bullet.** `group_restorations` took every other attribution on the line as a
surviving sibling, and a line restored once already carries the link of the
revert that re-applied it. When the same re-applier annotates more than one
entry, the shared-bullet rule then demanded that link be on this entry's bullet,
and which bullet `entry_placement` finds first decides the verdict - a correct
changelog rejected on shape and order. Siblings are now the attributions that
are not reverts.
**A change that already shipped is not cancelled out by a revert.** A pull
request merged into the last release branch after the cycle start is in this
range but its entry sits in a released section, so reverting it reverses
behaviour users already have: a change of its own (skill section 2, case 5), not
a cancelling out. `cycle_entries` now subtracts what the released sections
attribute, which is the same distinction `disappeared_entries` already draws for
its own leniency.
**And the third case is put to the agent rather than decided by the verifier.**
The generator files a revert with no `Changelog entry` under `NO CL ENTRY`, so a
mixed-target revert of an earlier release carries no signal that it is
user-visible, and `own_entry_required` - which keys off the strict categories -
does not cover it. Whether such a reversal deserves an entry is exactly the
judgement case 5 asks for ("meant to be visible to users"), so the prompt gets a
"Reverts of earlier releases" list naming the pull request and what it reverts,
and says not to treat it as a revert that leaves no trace. Requiring an entry
would have the verifier make a call the rules leave to the editor.
Three tests added, one per case; each fails without its fix.
|
🕵 All three addressed in dfd9f58, each with a test that fails without its fix. Annotations are not siblings. Right, and your diagnosis of why it breaks — order dependence — is exactly it: a line restored once already carries the re-applier's link, and when that re-applier annotates more than one entry, whichever bullet A published change is not cancelled out. Also right. The third one I have handled differently, deliberately. You are right that case 5 does not depend on the raw category and that So the prompt gets a "Reverts of earlier releases" list naming each such pull request and what it reverts, saying the change is not cancelled out by anything in this release and that the case 5 judgement applies. The agent decides; the verifier does not. This is the same offered-not-required split I used for the prunable restorations, and for the same reason. If you would rather the verifier require an entry for every revert with a target outside the cycle, that is a one-line change — but it makes the job fail on a legitimately pruned revert of an old release, so I have not made it. 47 tests. |
The previous commit fixed "a re-apply annotation is not a sibling" by subtracting every revert, which is too much. A revert of an earlier release is rewritten into a normal entry (skill section 2, case 5), so it can have been merged into a bullet like any other pull request - and dropping it from `siblings` reopened the hole the shared-bullet rule exists to close: with the surviving pull request on the recorded bullet being such a revert, restoring the deleted one as a second bullet was accepted again. What disqualifies an attribution is being an annotation on *this* entry, not being a revert. `group_restorations` now returns the line's other attributions as `others` and the caller, which has the revert chain, splits them: the group's own `reapplied_by` are the annotations, everything else shared the bullet. `test_a_visible_revert_can_be_a_merged_sibling` puts a case-5 revert on the recorded bullet as the survivor: `siblings == ['115400']`, the second bullet is rejected, merging into the survivor passes. It fails with the previous commit's filter, and the two sibling tests now pin the classification from both sides.
|
🕵 Fixed in 6e468ab, with the regression you asked for. You are right, and it is a fix of mine that overshot: I closed "a re-apply annotation is not a sibling" by subtracting every revert, which reopened the shared-bullet hole for exactly the case the previous rounds established — a revert of an earlier release is a normal entry (case 5) and can have been merged into a bullet like any other. What disqualifies an attribution is being an annotation on this entry, not being a revert.
48 tests. |
`required` was decided from the recorded category alone, so a `Build/Testing/Packaging Improvement` entry an earlier edit had accepted into the in-progress section became optional again once a revert of it was itself reverted, and the run passed without restoring it. That category is both a prunable raw category and a legitimate section header, so the category cannot tell the two apart. The ledger records which it was: `Changelog-deleted-entry:` gains a `[section]` or `[raw]` marker next to the category. `raw` is a bullet still sitting in a raw block when the revert cancelled it - the rules were free to prune it, so its restoration stays offered. `section` is one an edit had kept, which is that edit having made the section 3 and 4 judgement already, so it is required like a strict-category entry. Two tests, one per half: that the marker decides `required` and the verdict on an edit that leaves the entry out, and that the recording side sets it from whether the bullet was in the section.
|
🕵 Fixed in d3f082a, with a test for each half. You are right, and you named the missing bit precisely: the category cannot answer the question, because
This also tightens the offered/required split I argued for two rounds ago: "offered" now means "prunable and never accepted", which is the narrow case I actually wanted, rather than "prunable category". 50 tests. |
…ategory **`release_range_prs` read every `(#N)` in a subject.** A squashed revert quotes the original title, `Revert "Something (#90000)" (#115800)`, and the quoted number would put a pull request of an earlier release into this range - the very distinction the caller uses the range for, so a revert of it would look like something this release cancels out rather than a user-visible reversal. Both shapes are now anchored: the squash number ends the subject, the `Merge pull request #N` one starts it. That shape does not occur in the last 60000 commits of this repository, where reverts land as merge commits, so this is hardening rather than a live bug. The anchored form is the right parse either way, and the regression pins it along with a fork's own `Merge pull request #4` appearing mid-line. **A sibling moved between categories made the merge impossible.** The category check demanded the recorded header while the shared-bullet rule demanded a merge into the surviving bullet, so once an edit had moved that bullet the two contradicted each other and no edit could pass. The expected category is now the surviving bullet's current one when there is a sibling to merge into, and the recorded one otherwise: the check follows the bullet rather than a remembered header. The two rules then compose instead of fighting - moving the whole merged bullet elsewhere stays legal, while leaving the survivor and restoring the entry beside it under the old header is rejected, which the test asserts.
|
🕵 Both fixed in a6aa16d, each with a test that fails without its fix. The subject parse is anchored. Right in principle: the quoted number in One honest qualification: I went looking for that subject shape and it does not occur in the last 60000 commits of this repository, where reverts land as merge commits ( The category now follows the bullet. This one is a genuine contradiction between two of my own rules, and you are right that it made the correct edit impossible: the category check demanded the recorded header while the shared-bullet rule demanded a merge into the surviving bullet, so once an edit had moved that bullet nothing could pass. The expected category is the surviving bullet's current one when there is a sibling to merge into, and the recorded one otherwise. The two rules now compose. Writing the test showed the boundary is not where I first assumed: moving the whole merged bullet to another category stays legal, because that is a legitimate §6 move of that bullet — my first draft asserted it should fail, which was wrong. What is rejected is leaving the survivor where it is and restoring the entry beside it under the old header, and the test asserts that, noting that the category check catches it first and the shared-bullet rule would too. I also corrected the error message, which claimed a restoration "keeps the category the entry had when it was deleted" — now it says "or that of the bullet it merges back into". 52 tests. |
The editing step of the
NightlyChangelogjob failed its own verification every night from 2026-08-12, always the same way:verify_editrequires that every raw entry of a strict-retention category keeps its pull request link — an entry may be rewritten, merged into another bullet or moved to another category, but not dropped, because theChangelog-generated-up-to:point has already moved past it and no later run will offer it again. The prompt never said so, and the skill stated it only implicitly, so the agent pruned entries it judged insignificant:#103182(Lightweight Updates v2, aBackward Incompatible Change) was deleted outright.The other half of the same failure is revert handling.
#109946fixed the propagation of settings inaccurateCastOrDefault,#114911reverted it, and#114912reverted that revert — all three inside one range. The skill covers this in section 2.5, but the agent reached the "landed and then reverted, so delete both" rule first and lost a fix that ships in the release.Telling the agent the rules
STRICT_RETENTION_CATEGORIES, so the prompt and the verifier cannot drift apart), says exactly which entries may be deleted and why deleting anything else is unrecoverable, and states the revert-of-revert rule.NO CL ENTRYnow checks whether a revert is itself reverted before concluding that a change was reverted. TheaccurateCastOrDefaultchain is the worked example.ClickHousespelling, which theclickhouse_spellingcheck enforces: the 26.8 changelog pull request failed onCHANGELOG.md:366: Clickhouse, inherited verbatim from a pull request body.The revert bookkeeping is durable across runs
Telling the agent the rule is not enough, because the job is incremental: a cycle is edited in ~30 nightly runs and a revert chain routinely spans them. Run N integrates
#109946; run N+1 sees#114911and deletes it; run N+2 sees only#114912. On run N+2 nothing disappears in the edit and the intervening revert is gone from the raw blocks, so neither the agent nor the verifier could reconstruct the chain, and the shipped fix stayed out for good.The branch now carries that memory in trailers on its own edit commits — the same mechanism as
Changelog-generated-up-to:, so the state lives in the branch and the pull request diff stays clean:analyze_revertsresolves each run's reverts against that ledger and reduces the cumulative revert graph, so a chain spread over several runs behaves exactly like one arriving in a single raw block, at any depth. Around it:tests/ci/changelog.pyprints the author's ownChangelog entryunder the author's ownChangelog category, so a revert can arrive underImprovementreading "Disable the setting again". One batched GraphQL query covers a run's whole raw block, and a failed lookup fails the run rather than silently reading as "not a revert".vX.Y.1.1-new..origin/master, first-parent), the only source that survives an entry being pruned in an earlier run.Reverts owner/repo#Nbody marker, aRevert #NNNNNtitle, or a nestedRevert "Revert "X""title matched against titles the ledger remembers; an ambiguous or unresolvable revert grants nothing.What the verifier now enforces
Each of these is an invariant the job used to accept the violation of, in both directions — allowed and required:
[#N](...) ([Author](...)), not a mention of#Ninside someone else's bullet, and no pull request gains an attribution it did not have.Where the rules leave a judgement to the editor — a prunable bullet that was never accepted, a revert of an earlier release the generator filed without a category — the prompt asks for it instead of the verifier imposing an answer.
A branch whose edit commits predate the trailers has an empty ledger and keeps the previous behaviour.
Testing
ci/tests/test_changelog_nightly_revert_ledger.py— 52 tests, run by theCI Testsjob. Every one of the invariants above has a case that fails without the code that enforces it, most of them driving the realverify_edit; the timelines covered include the whole chain in one raw block, each stage of it arriving alone, chains five pull requests deep, merged bullets restored whole, split, or with a still-reverted sibling, category moves between runs, an empty ledger, and a failed pull request lookup.The prompt side was verified by hand: the rendered prompt names every category the verifier is strict about, quotes the previous rejection on a retry and not on a first attempt, and is stable across renders. Independently, a hand edit that followed these rules passed
verify_editon the first try — that is how the 759-entry backlog of the 26.8 changelog was cleared in #111720.Related: #111720
Related: #116138
Changelog category (leave one):
Version info
26.9.1.291(included in26.9and later)