Skip to content

ci: maintain a rolling draft release PR - #753

Open
mldangelo-oai wants to merge 4 commits into
mainfrom
mdangelo/codex/rolling-release-pr
Open

ci: maintain a rolling draft release PR#753
mldangelo-oai wants to merge 4 commits into
mainfrom
mdangelo/codex/rolling-release-pr

Conversation

@mldangelo-oai

@mldangelo-oai mldangelo-oai commented Aug 30, 2026

Copy link
Copy Markdown
Collaborator

Summary

Release proposals are currently assembled by hand, so later merges can leave the proposed version and notes out of date. Maintain one draft release PR per cycle while preserving maintainer edits and the human release decision.

Changes

  • Recompute the proposal from the commit where the current package version first reached main. Before 1.0, ordinary changes, including features, bump the patch; explicitly marked breaking changes bump the minor. Release PRs use the repository's squash merge flow, and a new empty draft can open after the preceding version bump merges.
  • Append commits without force-pushing and retry concurrent branch changes. Pause successfully for another release PR on main; a closed, retargeted, or ready proposal; and unrelated file or package edits. Recheck before advancing the branch and before requesting review.
  • Preserve edited or deleted note sections and the PR description. Incorporate new main commits independently of proposal content, so unchanged release files do not trigger another Codex review. Still post new suggestions for human-owned notes, and recover missed review comments on a rerun.
  • Update only the top-level package version while preserving JSON formatting and nested values. Use a shared stable-version check, paginate using GitHub's next-page header, build the plan once, and reuse the pre-write PR snapshot when updating an existing proposal.
  • Keep the workflow read-only by default. An explicit manual write run uses a repository-scoped GitHub App; automatic writes after pushes require a separate opt-in. Document rollout, note ownership, and final-review controls.

Testing

  • Focused updater suite: 57 tests passed. Coverage includes temporary Git repositories, concurrent commits, note ownership, successful holds, duplicate prevention, ready/draft transitions, retargeting, orphan recovery, proposal review deduplication, comment recovery, workflow controls, serialized HTTP requests, and pagination.
  • SDK types and formatting checks, Node syntax, and whitespace checks passed.
  • Live read-only preview selected the expected next patch and paused for the existing manual release PR without changing it.
  • Full SDK suite on eef0e82c, seed 12345: 2,152 passed, 43 skipped, zero failures.
  • Codex code review on eef0e82c reported no major issues; the security review also completed.

Risk and rollout

This does not change the public CLI, enable automated writes, merge a release PR, or publish a package. Existing publication gates remain in place. Breaking-change detection uses commit/PR metadata, and generated notes still need maintainer review. Ready proposals are frozen; if main advances before merge, return the proposal to draft and rerun the updater. Before marking it ready again, check CI and request a final Codex review if the last review targets an older head.

Missing note-ownership metadata deliberately continues to preserve existing text. An explicit section reset resumes generation; absence of state does not authorize overwriting manual notes. If GitHub has not exposed an updated PR head, a manual rerun can post deferred feedback after the head catches up.

The GitHub App write path has been exercised with serialized API fixtures, but has not been run on a hosted workflow. After merging, configure the repository-scoped App, run a manual write pilot with automatic updates disabled, and verify its draft, CI, and Codex review before enabling push-triggered writes. The existing manual release PR is left untouched.

Public disclosure review

  • No customer, partner, prospect, or user identities, data, or identifying details are included.
  • No credentials, personal data, private source, scan findings, or nonpublic links or tickets are included.
  • I reviewed the branch name, title, description, commits, changes, comments, logs, screenshots, attachments, and links for public disclosure.

@mldangelo-oai

Copy link
Copy Markdown
Collaborator Author

@codex review the current head 982ece7. Please focus on release-cycle boundaries, preservation of human notes, concurrent GitHub updates, and workflow write controls.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Aug 30, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-08-30T14:57:37.373435Z eef0e82 Manual request
🔒 Security Review Completed 2026-08-30T14:59:06.620504Z eef0e82 New commits
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@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: 982ece706d

ℹ️ 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".

Comment thread sdk/typescript/scripts/release-pr.mjs
Comment thread sdk/typescript/scripts/release-pr.mjs
Comment thread sdk/typescript/scripts/release-pr.mjs
@mldangelo-oai

Copy link
Copy Markdown
Collaborator Author

@codex review the current head 7475203. The follow-up freezes ready proposals, rechecks competing releases before the branch write, and documents the existing squash-only release flow. The focused suite now has 44 passing tests.

@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: 7475203b03

ℹ️ 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".

Comment thread sdk/typescript/scripts/release-pr.mjs Outdated
@mldangelo-oai

Copy link
Copy Markdown
Collaborator Author

@codex review the current head 2a69e60. The latest fix preserves retargeted proposals across workflow runs and orphan-branch recovery, with 48 focused tests passing.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Bravo.

Reviewed commit: 2a69e60a4f

ℹ️ 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".

@mldangelo-oai

Copy link
Copy Markdown
Collaborator Author

Final validation for 2a69e60a4fae536a03e839eaef08137759d679ba: both full SDK runs passed with 2,143 tests and 43 skips each (seeds 12345 and 29381448). The 48 focused updater tests also pass. Current CI is green, and Codex reported no major issues.

@mldangelo-oai
mldangelo-oai marked this pull request as ready for review August 30, 2026 13:55

@mldangelo mldangelo 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.

Reviewed the full diff, ran the suite (48 pass), prettier and actionlint clean, and probed runtime behavior with this PR's own test harness.

The harness is unusually strong — real temporary git repos plus a fake GitHub that actually rejects non-fast-forwards and asserts force: false, so the append-only claim is genuinely tested. markdownText holds up against a hostile PR title, the RELEASE_PR_DRY_RUN expression is correct in all four event/var combinations and fails safe, and comparing branch package.json against the merge base minus the version key is a clean way to detect human edits.

Two things I'd want resolved before setting RELEASE_PR_ENABLED: the branch-edit guard turns node-release-pr permanently red on main for a documented maintainer action, and every push to main triggers a fresh @codex review even when the proposal is byte-identical. The rest are simplifications and small hardening notes. Details inline.

Comment thread sdk/typescript/scripts/release-pr.mjs Outdated
Comment thread RELEASING.md Outdated
Comment thread sdk/typescript/tests-ts/release-pr.test.ts
Comment thread sdk/typescript/scripts/release-pr.mjs Outdated
Comment thread sdk/typescript/scripts/release-pr.mjs Outdated
Comment thread sdk/typescript/scripts/release-pr.mjs Outdated
const block = notes === null ? null : findSection(notes, id);
const humanOwned =
previous?.reset !== true &&
(previous?.humanOwned !== false ||

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.

previous?.humanOwned !== false treats absent the same as human-owned — and then writes that back — so a section id missing from a saved state is locked human-owned forever. Verified it survives reruns.

Only bites if sectionIds gains an entry mid-cycle, in which case the new section would never be generated on any existing branch. previous === undefined probably wants to fall through to the generate path rather than join the sticky one.

Comment thread sdk/typescript/scripts/release-pr.mjs
Comment thread sdk/typescript/scripts/release-pr.mjs
Comment thread sdk/typescript/scripts/release-pr.mjs
@chatgpt-codex-connector

Copy link
Copy Markdown

Note

To use Codex here, create an environment for this repo.

@mldangelo-oai

Copy link
Copy Markdown
Collaborator Author

@codex review the current head eef0e82. Please focus on successful release holds, review deduplication, preservation of human notes, GitHub pagination, and top-level package version updates. Missing ownership metadata deliberately continues to preserve existing text until an explicit reset.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Chef's kiss.

Reviewed commit: eef0e82cfd

ℹ️ 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".

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.

2 participants