Skip to content

fix(release): harden nightly release automation - #5957

Merged
leaanthony merged 3 commits into
masterfrom
codex/release-management
Aug 12, 2026
Merged

leaanthony merged 3 commits into
masterfrom
codex/release-management

Conversation

@taliesin-ai

@taliesin-ai taliesin-ai commented Aug 12, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Make scheduled v3 releases depend only on actual unreleased changelog content.
  • Add an explicit release_version input for ad-hoc beta releases.
  • Add deterministic documentation links to AI-generated feature changelog entries from changed documentation paths.

Why

The nightly workflow previously treated arbitrary commits after the latest release tag as release evidence. That could create an unnecessary release after release bookkeeping or automation commits. Documentation links are now calculated from the checked-out docs source before deployment, including index routes, locale prefixes, and frontmatter slug overrides.

Validation

  • go test scripts/auto-changelog.go scripts/auto-changelog_test.go
  • go test ./internal/changelog ./tasks/release
  • git diff --check

Summary by CodeRabbit

  • New Features

    • Added optional manual version selection for nightly releases.
    • Changelog entries now include links to relevant documentation pages, including localized, index, and custom-slug pages.
  • Bug Fixes

    • Improved release detection by focusing on unreleased changelog content.
    • Documentation lookup failures no longer block changelog generation.
    • Release workflows now distinguish valid empty changelogs from read or parsing failures.
  • Tests

    • Added automated checks for documentation link generation and missing files.

@coderabbitai

coderabbitai Bot commented Aug 12, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 24e10a64-0daf-4aee-8517-dd31933573aa

📥 Commits

Reviewing files that changed from the base of the PR and between 2e02afb and 8f7374c.

📒 Files selected for processing (1)
  • .github/workflows/nightly-release-v3.yml
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/nightly-release-v3.yml

Walkthrough

The PR updates nightly release dispatch and eligibility logic. It adds documentation URL generation to automatic changelog entries, including PR file retrieval, slug handling, path normalization, deduplication, and tests.

Changes

Nightly release workflow

Layer / File(s) Summary
Release detection and execution
.github/workflows/nightly-release-v3.yml
The workflow accepts an optional release_version, distinguishes no-content results from failures, checks unreleased changelog content, and passes dry-run and version options to release steps.

Changelog documentation links

Layer / File(s) Summary
Documentation link generation
v3/scripts/auto-changelog.go
The script retrieves changed PR files, identifies documentation pages, derives normalized URLs from paths or frontmatter slugs, removes duplicates, and adds links to feature entries.
Documentation URL validation
v3/scripts/auto-changelog_test.go, .github/workflows/auto-changelog-v3.yml
The workflow runs Go tests before auto-fill. Tests cover regular, index, localized, slug-overridden, and missing documentation paths.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant GitHubPRFilesAPI
  participant fetchPR
  participant DocumentationURLCollector
  participant ChangelogEntry
  fetchPR->>GitHubPRFilesAPI: retrieve changed PR files
  GitHubPRFilesAPI-->>fetchPR: return filenames
  fetchPR->>DocumentationURLCollector: derive documentation URLs
  DocumentationURLCollector->>ChangelogEntry: append deduplicated links
Loading
sequenceDiagram
  participant GitHubActionsDispatch
  participant NightlyReleaseWorkflow
  participant ReleaseStep
  GitHubActionsDispatch->>NightlyReleaseWorkflow: provide release_version
  NightlyReleaseWorkflow->>NightlyReleaseWorkflow: check unreleased changelog content
  NightlyReleaseWorkflow->>ReleaseStep: pass dry-run and optional version
Loading

Possibly related PRs

Suggested labels: Bug, Documentation

Suggested reviewers: leaanthony

Poem

A rabbit maps each changed page,
And checks the release script’s stage.
A version flag joins the night,
While dry runs keep the launch precise.
Changelog links hop into place.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description explains the main changes and validation, but it omits the required issue reference, change type, test configuration, platform coverage, and checklist. Add the required issue reference, select the change type, document platform coverage and wails doctor output, and complete the checklist.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the hardening of nightly release automation, which is the primary change.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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 unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/release-management

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.

@github-actions github-actions Bot added the v3 label Aug 12, 2026
@leaanthony
leaanthony marked this pull request as ready for review August 12, 2026 07:53
Copilot AI lite review requested due to automatic review settings August 12, 2026 07:54

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

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/nightly-release-v3.yml:
- Around line 101-110: Update the changelog-check step and its conditional flow
around has_unreleased_content so an operational error from --check-only
propagates as a workflow failure instead of being treated as no unreleased
content. Preserve the existing successful false result and skip-release behavior
when the check completes successfully with empty content, while allowing only
that result to set has_changes=false and should_continue=false.

In `@v3/scripts/auto-changelog_test.go`:
- Line 1: Update the CI workflow to explicitly run the ignored tests in
auto-changelog_test.go from the v3 directory using a file-list go test command,
while preserving the existing auto-changelog.go execution. Alternatively, move
the tests into a discoverable package so go test ./... includes them.

In `@v3/scripts/auto-changelog.go`:
- Around line 171-178: Update the changed-file response struct and iteration in
the relevant changelog function to unmarshal each file’s status, then skip
entries whose status is "removed" before appending filenames or reading
frontmatter. Preserve processing for all non-removed files so documentation URLs
continue to be collected.
- Around line 164-165: Update fetchPRFiles to retrieve up to 30 pages, or
continue by following GitHub API pagination links, so all pull-request files are
considered. In documentationURLForFile, skip changed documentation files that
are missing from the checkout while continuing to generate links for other
available files.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 1a985a1a-46f2-4456-9e73-0ac4bafdc92a

📥 Commits

Reviewing files that changed from the base of the PR and between aa3e48f and bad5cc8.

📒 Files selected for processing (3)
  • .github/workflows/nightly-release-v3.yml
  • v3/scripts/auto-changelog.go
  • v3/scripts/auto-changelog_test.go

Comment thread .github/workflows/nightly-release-v3.yml
Comment thread v3/scripts/auto-changelog_test.go
Comment thread v3/scripts/auto-changelog.go Outdated
Comment thread v3/scripts/auto-changelog.go

Copilot AI 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.

Pull request overview

This PR hardens the v3 nightly release automation by basing release decisions strictly on unreleased changelog content, adding an explicit version input for ad-hoc releases, and enriching AI-generated changelog entries with deterministic documentation links derived from docs source paths.

Changes:

  • Generate deterministic documentation URLs from changed docs files (including index routes and optional frontmatter slug) and append them to relevant changelog entries.
  • Extend the nightly release workflow to (a) gate releases solely on unreleased changelog content and (b) support an explicit release_version for ad-hoc beta releases.
  • Add unit tests for the documentation URL path/slug mapping logic.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
v3/scripts/auto-changelog.go Adds doc URL derivation and PR “changed files” fetching to append deterministic documentation links to generated changelog entries.
v3/scripts/auto-changelog_test.go Adds tests covering docs path → URL mapping, including index handling, locale prefixes, and slug overrides.
.github/workflows/nightly-release-v3.yml Gates scheduled releases on unreleased changelog content and adds an optional release_version input forwarded to the release task.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +194 to +197
docURL, err := documentationURLForFile(file)
if err != nil {
return nil, err
}
Comment thread v3/scripts/auto-changelog.go Outdated
Comment on lines +82 to +85
// Documentation is still being built when this job runs, so the public URL
// must be derived from the source path rather than checked against the live
// site. Only Added entries get the link; the generated prose remains model
// controlled, while the URL is deterministic and cannot be hallucinated.

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.github/workflows/nightly-release-v3.yml (1)

18-22: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Allow release_version to bypass the changelog gate.

When release_version is set without force_release=true, the workflow exits before passing --version to release.go. Include the explicit-version input in the continuation conditions, or document that callers must also set force_release=true.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/nightly-release-v3.yml around lines 18 - 22, Update the
workflow’s release continuation conditions to allow a non-empty release_version
to proceed without requiring force_release=true, ensuring the explicit version
reaches release.go via --version while preserving existing behavior for other
release paths.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In @.github/workflows/nightly-release-v3.yml:
- Around line 18-22: Update the workflow’s release continuation conditions to
allow a non-empty release_version to proceed without requiring
force_release=true, ensuring the explicit version reaches release.go via
--version while preserving existing behavior for other release paths.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: ab445010-a292-4c01-a7a5-983ceaf9e146

📥 Commits

Reviewing files that changed from the base of the PR and between bad5cc8 and 2e02afb.

📒 Files selected for processing (4)
  • .github/workflows/auto-changelog-v3.yml
  • .github/workflows/nightly-release-v3.yml
  • v3/scripts/auto-changelog.go
  • v3/scripts/auto-changelog_test.go
🚧 Files skipped from review as they are similar to previous changes (1)
  • v3/scripts/auto-changelog.go

@leaanthony
leaanthony merged commit ffeb113 into master Aug 12, 2026
23 of 24 checks passed
@leaanthony
leaanthony deleted the codex/release-management branch August 12, 2026 08:17
leaanthony pushed a commit that referenced this pull request Aug 12, 2026
timlinde pushed a commit to Topborn/wails that referenced this pull request Aug 22, 2026
* fix(release): gate nightly releases on changelog content

* fix(release): address review feedback

* fix(release): allow explicit versions through workflow gate
timlinde pushed a commit to Topborn/wails that referenced this pull request Aug 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants