Skip to content

Require reviewed notes and latest main for releases - #2507

Merged
ejsmith merged 1 commit into
mainfrom
feature/mandatory-release-gates
Aug 22, 2026
Merged

ejsmith merged 1 commit into
mainfrom
feature/mandatory-release-gates

Conversation

@ejsmith

@ejsmith ejsmith commented Aug 22, 2026

Copy link
Copy Markdown
Member

Summary

  • require release notes to be displayed in full and approved in a subsequent user message
  • require fresh origin fetches before drafting and immediately before publication
  • invalidate approval when the version, notes, or origin/main target changes
  • require releases to target and verify the exact freshly fetched origin/main SHA

Why

Prevents an initial release request from being treated as approval of unseen notes and prevents releases from targeting stale local main state.

Verification

  • skill-creator quick validation passed
  • git diff --check passed

Breaking changes

None.

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f74aa83eeb

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".


These gates apply even when the user initially asks to create or publish a release and supplies the version.

1. **Start from freshly fetched main.** Before choosing the release range, generating notes, or selecting a target SHA, run `git fetch origin --prune --tags`. Stop if the fetch fails. Resolve the release endpoint from `refs/remotes/origin/main`; never use the current checkout, local `main`, `HEAD`, a previously cached `origin/main`, or an older commit merely because it is already available locally.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Fetch main with an explicit refspec

In clones whose remote.origin.fetch is restricted to another branch, git fetch origin --prune --tags can succeed without updating refs/remotes/origin/main, because Git uses the configured fetch refspec when none is supplied; if an older origin/main ref is present, both gates silently accept that cached SHA and can publish a stale release. Fetch refs/heads/main:refs/remotes/origin/main explicitly before resolving the endpoint.

Useful? React with 👍 / 👎.

2. **Show the exact notes and stop.** Present the complete release notes to the user in a markdown code block, then end the turn without creating a tag, draft release, or published release. The initial release request, a supplied version, or approval of the production-deployment side effect does not approve unseen release notes. Only a subsequent user message approving the displayed notes authorizes publication.
3. **Re-fetch immediately before publication.** After the notes are approved and immediately before creating the tag or GitHub release, run `git fetch origin --prune --tags` again and resolve `refs/remotes/origin/main` again. Stop if the fetch fails.
4. **Invalidate approval when main moves.** Compare the freshly fetched `origin/main` SHA with the SHA used for the approved release range. If they differ, do not publish. Inspect the new commits, regenerate the notes, show the revised notes, and wait for a new subsequent approval.
5. **Target and verify latest main.** Create the release with the exact SHA from the final successful fetch, for example `gh release create <tag> --target <sha> --notes-file <file>`. After creation, verify that the release tag resolves to that SHA. Do not claim success if the target verification fails.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Verify the tag target before publishing the release

When the requested tag already exists remotely but has no release and points to a different commit, this command publishes the release against that existing tag before the post-creation verification detects the mismatch. gh release create --help states that --target controls automatic tag creation when a matching tag does not yet exist, so it does not retarget an existing tag; verify the remote tag first, or create and push the exact tag and use --verify-tag, to avoid publishing a release for the wrong commit.

Useful? React with 👍 / 👎.

@ejsmith
ejsmith merged commit 9f86569 into main Aug 22, 2026
8 checks passed
@ejsmith
ejsmith deleted the feature/mandatory-release-gates branch August 22, 2026 21:07
@github-actions

Copy link
Copy Markdown

Code Coverage

Package Line Rate Branch Rate Complexity Health
Exceptionless.Insulation 37% 35% 286 ❌
Exceptionless.Core 75% 67% 10184 ✔
Exceptionless.Web 85% 69% 7903 ✔
Exceptionless.AppHost 38% 41% 147 ❌
Summary 78% (25159 / 32154) 67% (11812 / 17554) 18520 ✔

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

⌂ 换网址