Skip to content

Accept package-generated release headings in analyzer provenance - #1198

Merged
unbraind merged 1 commit into
mainfrom
fix/release-changelog-heading-provenance
Sep 5, 2026
Merged

Accept package-generated release headings in analyzer provenance#1198
unbraind merged 1 commit into
mainfrom
fix/release-changelog-heading-provenance

Conversation

@unbraind

@unbraind unbraind commented Sep 5, 2026

Copy link
Copy Markdown
Owner

The automatic v2026.9.5 release generated ## 2026.9.5, but the analyzer provenance checker required a dated heading. The resulting release commit failed main's analyzer-readiness check even though all manifests contained the exact version substitution and the reviewed parent had zero analyzer findings.

Accept the two package-supported heading forms: the exact calendar version alone, or that version with its matching date. Require an exact Unreleased heading line and retain byte-for-byte comparison of the remaining changelog, complete manifest inventory, immutable tag, canonical commit identity, and reviewed-parent analyzer evidence. This also fixes an existing false acceptance of partial headings such as Unreleased notes.

Canonical implementation, recurrence, history and linked verification: pm-u1baah — Releases from the default branch are supported with analyzer evidence. This corrects the repository's consumer contract; pm-changelog intentionally keeps explicit versions undated when no date is supplied.

Validation:

  • Reproduced two failures before the fix: the valid undated release was refused and a partial heading was accepted.
  • All 149 analyzer/workflow regressions pass, including incorrect versions, dates and modified content.
  • Canonical linked full coverage: 8,427 tests, 608 files, exact 100/100/100/100.
  • The corrected checker accepts immutable release 69092a748283ee69e69fb9aa2453db0f2d91addc only as deterministic_release_transform, with reviewed head f7293276add7a10f0fec41e9275c4be5c047bee7, zero CodeFactor annotations, zero new DeepScan issues and strict protection.
  • Complete static quality, type checking, docs/skills and package-generated changelog checks pass.

The immutable release tag and package contents remain unchanged. Hosted checks and reviews on this correction must pass before merge.

CHANGELOG.md is regenerated by pm-changelog 2026.9.2: the recurrent canonical item's entry moves to Unreleased and the now-tagged release gains its tag-derived date. Its earlier delivery evidence remains in append-only PM history. The managed-extension manifest timestamp is also produced by the package command.

Summary by Sourcery

Support both package-generated release heading formats while preserving strict analyzer provenance and changelog validation.

Bug Fixes:

  • Allow analyzer provenance validation for package-generated releases using either an exact undated version heading or its matching dated form.
  • Reject partial or malformed changelog headings while preserving exact changelog content validation.

Enhancements:

  • Document the supported release heading formats and update release history and changelog metadata.

Documentation:

  • Update release documentation to describe accepted package-generated changelog headings.

Tests:

  • Add coverage for undated and dated release headings, incorrect versions and dates, changelog mutations, and partial headings.

Summary by cubic

Fixes the release analyzer provenance check so package-generated changelog headings no longer block valid release commits.

Bug Fixes

  • The checker previously required a dated ## <version> - <date> heading; pm-changelog emits an undated ## <version> heading, so the valid v2026.9.5 release was refused.
  • Accepts both the exact undated version heading and the matching dated form, with the date matching the calendar version.
  • Requires an exact ## Unreleased heading line, which also closes a false acceptance of partial headings like Unreleased notes.
  • All other changelog bytes, manifest substitutions, tag identity, and reviewed-parent analyzer evidence remain byte-for-byte requirements.
  • Regenerates CHANGELOG.md via pm-changelog and documents the accepted heading forms in docs/RELEASING.md.

Written for commit 6559bee. Summary will update on new commits.

Review in cubic

Accept the exact undated calendar-version heading emitted by pm-changelog,
alongside the historical matching-date form, when proving a deterministic
automatic release transformation. Preserve immutable tag identity, complete
manifest substitution, reviewed-parent evidence and byte-exact changelog
content outside the heading.

Require a complete Unreleased heading line so partial headings cannot inherit
analyzer provenance. Add red/green controls for both valid formats, incorrect
versions and dates, altered content and the partial-heading false acceptance.
Document the contract and record recurrence, linked verification and closure
through the existing pm-u1baah lineage and package-generated changelog.

Validation: 149 focused regressions; 8427 tests across 608 files at exact
100/100/100/100; complete static quality, type checking, docs/skills and live
immutable v2026.9.5 provenance verification.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Sorry @unbraind, you've used your own review budget of 250,000 diff characters for the last 7 days.

You can request another review in 10 hours and 45 minutes by commenting @sourcery-ai review. Upgrade to get a review now.

@coderabbitai

coderabbitai Bot commented Sep 5, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: ASSERTIVE

Plan: Team

Run ID: 12833e37-d1a2-47ee-84a6-a3c5079bc7e8

📥 Commits

Reviewing files that changed from the base of the PR and between 69092a7 and 6559bee.

📒 Files selected for processing (7)
  • .agents/pm/extensions/.managed-extensions.json
  • .agents/pm/history/pm-u1baah.jsonl
  • .agents/pm/issues/pm-u1baah.toon
  • CHANGELOG.md
  • docs/RELEASING.md
  • scripts/release/hosted-analysis-gate.mjs
  • tests/unit/scripts/release/hosted-analysis-gate.spec.ts

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Summary

Summary by CodeRabbit

  • Bug Fixes

    • Release validation now accepts both dated and undated version headings generated by the release process.
    • Validation continues to reject incorrect versions, dates, partial headings, and unrelated changelog changes.
    • Releases from the default branch are now supported when the required release evidence is available.
  • Documentation

    • Updated release guidance to clarify accepted changelog heading formats and exact content requirements.

Walkthrough

The release gate now accepts undated and matching-date release changelog headings. Tests cover valid and invalid heading transformations. Documentation, changelog content, and incident records were updated to reflect the correction.

Changes

Release provenance validation

Layer / File(s) Summary
Release heading validation and regression coverage
scripts/release/hosted-analysis-gate.mjs, tests/unit/scripts/release/hosted-analysis-gate.spec.ts, docs/RELEASING.md
The gate accepts undated or matching-date version headings and requires exact heading and unchanged-content matching. Tests cover both valid formats and rejection cases.
Changelog release artifacts
CHANGELOG.md
The changelog adds an Unreleased fix entry and records the dated 2026.9.5 release heading.
Incident verification records
.agents/pm/issues/pm-u1baah.toon, .agents/pm/history/pm-u1baah.jsonl, .agents/pm/extensions/.managed-extensions.json
The records document the recurrence, correction, verification runs, closure state, and manifest timestamp update.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Merge Risk: ⚪ Minimal · up to 6559b

The release provenance check now supports package-generated dated and undated release headings while retaining strict changelog integrity validation. The documented valid and invalid cases are covered, with no current merge-blocking risk identified.

Sequence Diagram(s)

sequenceDiagram
  participant ReleaseCandidate
  participant HostedAnalysisGate
  participant ReviewedParent
  ReleaseCandidate->>HostedAnalysisGate: provide generated changelog
  HostedAnalysisGate->>ReviewedParent: compare heading and unchanged bytes
  ReviewedParent-->>HostedAnalysisGate: return parent evidence
  HostedAnalysisGate-->>ReleaseCandidate: accept or reject provenance
Loading
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: accepting package-generated release headings during analyzer provenance validation.
Description check ✅ Passed The description directly explains the release-heading validation change, preserved requirements, tests, documentation updates, and verification results.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 2 files. (5 skipped: 5 …
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@sourcery-ai

sourcery-ai Bot commented Sep 5, 2026

Copy link
Copy Markdown

Reviewer's Guide

Updates the hosted analyzer readiness gate to recognize both undated and matching-date package-generated release headings, while retaining strict changelog, manifest, tag, commit, and analyzer-evidence validation; adds focused regressions and regenerates associated release metadata.

Flow diagram for release changelog validation

flowchart TD
    A[Read parent and candidate CHANGELOG.md] --> B{Exact Unreleased heading in parent?}
    B -->|No| R[Reject release]
    B -->|Yes| C{Candidate matches exact version heading?}
    C -->|Yes| D[Compare all remaining changelog bytes]
    C -->|No| E{Candidate matches version plus matching date?}
    E -->|No| R
    E -->|Yes| D
    D -->|Different content| R
    D -->|Byte-for-byte unchanged| P[Continue release readiness checks]
Loading

File-Level Changes

Change Details Files
Broaden release changelog validation to accept both package-generated heading formats while enforcing exact replacement semantics.
  • Accept undated ## <version> and dated ## <version> - <matching date> headings.
  • Require a complete, exact ## Unreleased line and preserve all other changelog bytes byte-for-byte.
  • Document the supported package-generated heading contract.
scripts/release/hosted-analysis-gate.mjs
docs/RELEASING.md
Add regression coverage for valid heading variants and previously accepted or invalid changelog mutations.
  • Test analyzer-evidence reuse for both supported release headings.
  • Reject changed content, incorrect versions or dates, and partial Unreleased headings.
tests/unit/scripts/release/hosted-analysis-gate.spec.ts
Regenerate release and project-management metadata to move the delivered item into Unreleased and record append-only delivery evidence.
  • Update the changelog with the corrected Unreleased entry and dated tagged release heading.
  • Update managed-extension metadata and PM issue/history records.
CHANGELOG.md
.agents/pm/extensions/.managed-extensions.json
.agents/pm/history/pm-u1baah.jsonl
.agents/pm/issues/pm-u1baah.toon

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@unbraind

unbraind commented Sep 5, 2026

Copy link
Copy Markdown
Owner Author

@greptileai please review the exact release-heading provenance correction and its positive and negative controls.

@unbraind

unbraind commented Sep 5, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai full review

@unbraind

unbraind commented Sep 5, 2026

Copy link
Copy Markdown
Owner Author

@sourcery-ai review

@sourcery-ai

sourcery-ai Bot commented Sep 5, 2026

Copy link
Copy Markdown

Sorry @unbraind, you've used your own review budget of 250,000 diff characters for the last 7 days.

You can request another review in 10 hours and 43 minutes by commenting @sourcery-ai review. Upgrade to get a review now.

@coderabbitai

coderabbitai Bot commented Sep 5, 2026

Copy link
Copy Markdown
⚠️ Action not completed

Review rate limited.


Your included review limit is currently reached under our Fair Usage Limits Policy. This review may still proceed through usage-based billing if eligible. Your next included review will be available in 1 minute.

@codspeed-hq

codspeed-hq Bot commented Sep 5, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 11 untouched benchmarks


Comparing fix/release-changelog-heading-provenance (6559bee) with main (69092a7)

Open in CodSpeed

@codecov

codecov Bot commented Sep 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@unbraind

unbraind commented Sep 5, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai full review

@unbraind

unbraind commented Sep 5, 2026

Copy link
Copy Markdown
Owner Author

Read the edited full-review card for exact head 6559bee: no actionable findings and minimal merge risk across all seven changed files. All checks and the stricter zero-annotation analyzer proof passed. The repository separately enforces exact 100% docstring and code coverage; this card's generic 80% threshold is not the project gate. Canonical scope and evidence are linked in the PR through pm-u1baah.

@unbraind

unbraind commented Sep 5, 2026

Copy link
Copy Markdown
Owner Author

This guide accurately describes both supported heading forms and the unchanged-byte, immutable-tag and reviewed-parent requirements. The partial-heading negative control failed before the fix; all 149 focused contracts and full 8427-test coverage now pass.

@unbraind

unbraind commented Sep 5, 2026

Copy link
Copy Markdown
Owner Author

Recorded the seven-day Sourcery budget limitation. This is provider availability evidence, not a completed code review or approval; no paid upgrade is being used. The full CodeRabbit round remains required.

@unbraind

unbraind commented Sep 5, 2026

Copy link
Copy Markdown
Owner Author

This command did not complete because the included review was still rate-limited. The reset window has now elapsed and the unchanged exact head has received a new full-review request.

@coderabbitai

coderabbitai Bot commented Sep 5, 2026

Copy link
Copy Markdown
✅ Action performed

Full review finished.

@unbraind

unbraind commented Sep 5, 2026

Copy link
Copy Markdown
Owner Author

Accepted the exact-head benchmark receipt: all 11 benchmarks are unchanged. This correction affects release provenance validation and preserves the published SDK and CLI runtime behavior.

@unbraind

unbraind commented Sep 5, 2026

Copy link
Copy Markdown
Owner Author

Confirmed against the canonical local and hosted coverage gates: 8427 tests pass and coverage remains exact 100/100/100/100. The new undated-heading and partial-heading controls were red before the implementation change.

@unbraind

unbraind commented Sep 5, 2026

Copy link
Copy Markdown
Owner Author

Recorded this review as quota-limited, without code-review approval. The canonical pm-u1baah evidence and executable positive/negative controls remain available, and the CodeRabbit full review is being awaited.

@unbraind

unbraind commented Sep 5, 2026

Copy link
Copy Markdown
Owner Author

Confirmed the full review finished on unchanged head 6559bee with no actionable findings. The complete hosted check watch and zero-annotation analyzer proof passed; final reaction, reply and thread inventory will precede merge.

@unbraind
unbraind merged commit 6ae739a into main Sep 5, 2026
33 checks passed
@unbraind
unbraind deleted the fix/release-changelog-heading-provenance branch September 5, 2026 08:41
@unbraind

unbraind commented Sep 5, 2026

Copy link
Copy Markdown
Owner Author

Merged and independently verified on main 6ae739a4cd3b95cb4a9476d8813854a24b9688bb. All six workflows completed successfully: CI, CodeQL, Security and Script Quality, Docs, CodSpeed and Scorecard. The separate analyzer proof resolves the exact reviewed head 6559bee5520610bf066500fda75120b964e513e3 through identical-tree squash provenance, with zero CodeFactor annotations, zero new DeepScan issues and strict branch protection.

CodeRabbit's full review of all seven files found no actionable issues. Every bot comment/review was read, rated and answered, including edited cards; the final inventory across #1195, #1196 and #1198 found no new or edited unread feedback, unrated artifacts, or unresolved threads. Provider quota receipts are recorded as limitations rather than approvals.

Canonical recurrence, implementation and test evidence: pm-u1baah. The checkout is clean on main. Public v2026.9.5 remains immutable and independently verified through npm, npx, bunx and fresh npm/Bun agent sessions. The repository-side provenance correction is merged; it does not replace today's published artifact.

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.

1 participant