Skip to content

Extend release-notes cut to valkey-search, valkey-json, valkey-bloom - #80

Open
sarthakaggarwal97 wants to merge 1 commit into
valkey-io:mainfrom
sarthakaggarwal97:feat/release-notes-module-repos
Open

Extend release-notes cut to valkey-search, valkey-json, valkey-bloom#80
sarthakaggarwal97 wants to merge 1 commit into
valkey-io:mainfrom
sarthakaggarwal97:feat/release-notes-module-repos

Conversation

@sarthakaggarwal97

Copy link
Copy Markdown
Collaborator

Extend the release-notes workflow beyond Valkey core to support automated release cuts for:

  • valkey-search
  • valkey-json
  • valkey-bloom

Repository-specific behavior now lives in a ProjectProfile registry instead of being hard-coded for Valkey. Each repository can define its own version source, release-stage handling, changelog identity, note categories, and generation prompts.

What changed

  • Add target-repository selection to the standard and advanced release workflows.
  • Support each repository’s native version format:
    • valkey: src/version.h using VALKEY_* macros
    • valkey-search: src/version.h using kModuleVersion and MODULE_RELEASE_STAGE
    • valkey-json: CMakeLists.txt project version
    • valkey-bloom: Cargo.toml package version
  • Parameterize release-note generation, rendering, RC sequencing, validation, and PR metadata through the selected project profile.
  • Preserve existing module changelog history when prepending a release.
  • Migrate legacy contributor sections into the cumulative contributor footer and deduplicate contributor identities.
  • Keep tag validation authoritative for repositories that do not record release stage in their version file.
  • Prevent duplicate GA and RC cuts during the merge-to-tag window.
  • Scope workflow concurrency and GitHub App credentials to the selected repository.
  • Allow personal-token authentication only for read-only dry runs; publishing continues to require the GitHub App identity.
  • Add documentation and regression coverage for module-specific versioning, rendering, workflow dispatch, and release safety checks.

Per-repo release conventions live in a ProjectProfile registry
(scripts/release_notes/projects.py), keyed by repo name so personal
forks resolve the upstream conventions:

- valkey:        src/version.h VALKEY_* macros (unchanged behavior)
- valkey-search: src/version.h kModuleVersion + MODULE_RELEASE_STAGE
- valkey-json:   CMakeLists.txt project(... VERSION M.m.p)
- valkey-bloom:  Cargo.toml [package] version

The changelog renderer, prior-section splitter, rc-sequence reader,
commit titles, and AI prompts are parameterized by the profile. With
the previous fixed "Valkey M.m.p" splitter, a module heading such as
"Valkey Search 1.2.1" never matched and a cut would have silently
dropped the repo's entire prior changelog.

Repos whose version file records no stage compare M.m.p only in the
version-file gate; tag validation stays authoritative, and a
changelog-heading gate refuses a duplicate GA or an rc dispatched in
the merge-to-tag window. Legacy hand-written contributor blocks are
absorbed into the cumulative footer on the first cut (fail-closed
parsing); name-only co-author identities merge with their handle.
profile is a required argument through the internal plumbing so a
dropped pass-through fails loudly. The dispatch gains a repo choice,
the App token is minted for the selected repo after an allowlist gate,
and concurrency is per-repo.

Signed-off-by: Sarthak Aggarwal <sarthagg@amazon.com>
@sarthakaggarwal97

sarthakaggarwal97 commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator Author

@KarthikSubbarao @Aksha1812 would you guys want to review this?

Tested with a dry run against the real valkey-search 1.2 branch: run

Valkey Search 1.2 release notes
===============================

Upgrade urgency levels:

| Level    | Meaning                                                             |
|----------|---------------------------------------------------------------------|
| LOW      | No need to upgrade unless there are new features you want to use.   |
| MODERATE | Program an upgrade of the server, but it's not urgent.              |
| HIGH     | There is a critical bug that may affect a subset of users. Upgrade! |
| CRITICAL | There is a critical bug affecting MOST USERS. Upgrade ASAP.         |
| SECURITY | There are security fixes in the release.                            |

Valkey Search 1.2.2  -  Released Fri 07 August 2026
---------------------------------------------------

Upgrade urgency LOW: No need to upgrade unless there are new features you want to use.

### Bug Fixes
* Fix a crash when queries on single-slot indexes target replicas during cluster query fanout by @baswanth09 (#1258)

@sarthakaggarwal97

Copy link
Copy Markdown
Collaborator Author

@BChan-0 thoughts on this?

@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The release-notes system now supports Valkey, Valkey Search, Valkey JSON, and Valkey Bloom. Repository profiles control version files, release stages, prompts, categories, rendering, changelog handling, and publishing workflow behavior.

Changes

Repository-aware workflow

Layer / File(s) Summary
Repository selection and credential handling
.github/workflows/release-notes-cut*.yml, tests/test_release_notes_workflow.py, README.md
Workflows accept a repository choice, validate it before token creation, scope concurrency by repository and version, and enforce token rules for dry runs and publishing.

Profile-driven release pipeline

Layer / File(s) Summary
Project profiles and version validation
scripts/release_notes/projects.py, scripts/release_notes/main.py, tests/test_release_notes_projects.py, tests/test_release_notes_main.py, README.md, docs/architecture.md
Profiles define repository names, version files, bumpers, stages, categories, and prompt guidance. The entry point resolves profiles before cloning and validates repository versions with the selected bumper.
Profile-driven triage, generation, and rendering
scripts/release_notes/triage.py, scripts/release_notes/generate.py, scripts/release_notes/pipeline.py, scripts/release_notes/render.py, scripts/release_notes/release_format.py, tests/test_release_notes_pipeline.py, tests/test_release_notes_release_format.py
Prompts use profile descriptions and guidance. Category ordering, display names, dated sections, and legacy contributor migration are configurable per profile.
Profile-aware release cutting
scripts/release_notes/release_cut.py, tests/test_release_notes_release_cut.py, tests/test_release_notes_rerun.py
Release cutting uses profile-specific files, headings, bumpers, rendering, commit metadata, and PR bodies. Stage-less releases receive duplicate-stage checks and history-loss warnings.

Possibly related PRs

Suggested reviewers: bchan-0

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 21.05% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description check ✅ Passed The description directly explains the workflow, profile, versioning, safety, and test changes described in the pull request.
Title check ✅ Passed The title clearly summarizes extending release-notes cuts to the three supported Valkey module repositories.
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.

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.

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
scripts/release_notes/release_cut.py (1)

647-675: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Consider running the duplicate-stage gate before the AI run.

_refuse_already_cut_stage runs only inside cut, after regenerate_unreleased completes. For a stage-less version file a duplicate GA or a post-GA rc therefore consumes a full triage and generation run before the cut aborts. main._validate_release_target already clones the release line and reads the version file, so it can read the changelog and apply the same gate first.

This does not change correctness; it only fails fast.

🤖 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 `@scripts/release_notes/release_cut.py` around lines 647 - 675, Apply
_refuse_already_cut_stage during main._validate_release_target, after cloning
the release line and reading its version/changelog, so duplicate-stage and
post-GA checks happen before regenerate_unreleased or any AI work. Preserve the
existing gate in cut as needed for correctness, using the same version, stage,
profile, and changelog inputs.
🤖 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/release-notes-cut.yml:
- Line 142: Update the HAS_APP_CREDS expression in the release workflow to be
true only when both VALKEYRIE_BOT_APP_ID and VALKEYRIE_BOT_PRIVATE_KEY are
non-empty, so the token action is skipped and the dry-run PAT fallback remains
available when either credential is missing.

---

Nitpick comments:
In `@scripts/release_notes/release_cut.py`:
- Around line 647-675: Apply _refuse_already_cut_stage during
main._validate_release_target, after cloning the release line and reading its
version/changelog, so duplicate-stage and post-GA checks happen before
regenerate_unreleased or any AI work. Preserve the existing gate in cut as
needed for correctness, using the same version, stage, profile, and changelog
inputs.
🪄 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: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 03a3a4e4-f41f-4b50-a05b-38125dad054b

📥 Commits

Reviewing files that changed from the base of the PR and between cab64ac and 808e937.

📒 Files selected for processing (19)
  • .github/workflows/release-notes-cut-advanced.yml
  • .github/workflows/release-notes-cut.yml
  • README.md
  • docs/architecture.md
  • scripts/release_notes/generate.py
  • scripts/release_notes/main.py
  • scripts/release_notes/pipeline.py
  • scripts/release_notes/projects.py
  • scripts/release_notes/release_cut.py
  • scripts/release_notes/release_format.py
  • scripts/release_notes/render.py
  • scripts/release_notes/triage.py
  • tests/test_release_notes_main.py
  • tests/test_release_notes_pipeline.py
  • tests/test_release_notes_projects.py
  • tests/test_release_notes_release_cut.py
  • tests/test_release_notes_release_format.py
  • tests/test_release_notes_rerun.py
  • tests/test_release_notes_workflow.py

CLAUDE_CODE_USE_BEDROCK: "1"
# secrets.* is not readable in step `if:` expressions; surface presence
# here so the token steps can be skipped on a fork without App creds.
HAS_APP_CREDS: ${{ secrets.VALKEYRIE_BOT_APP_ID != '' }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win

Require both App credential secrets.

Line 142 treats an App ID alone as usable credentials. If VALKEYRIE_BOT_PRIVATE_KEY is empty, a token action runs and fails before the permitted dry-run PAT fallback can execute. Require both secrets.

Proposed fix
-      HAS_APP_CREDS: ${{ secrets.VALKEYRIE_BOT_APP_ID != '' }}
+      HAS_APP_CREDS: ${{ secrets.VALKEYRIE_BOT_APP_ID != '' && secrets.VALKEYRIE_BOT_PRIVATE_KEY != '' }}
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
HAS_APP_CREDS: ${{ secrets.VALKEYRIE_BOT_APP_ID != '' }}
HAS_APP_CREDS: ${{ secrets.VALKEYRIE_BOT_APP_ID != '' && secrets.VALKEYRIE_BOT_PRIVATE_KEY != '' }}
🤖 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/release-notes-cut.yml at line 142, Update the
HAS_APP_CREDS expression in the release workflow to be true only when both
VALKEYRIE_BOT_APP_ID and VALKEYRIE_BOT_PRIVATE_KEY are non-empty, so the token
action is skipped and the dry-run PAT fallback remains available when either
credential is missing.

@BChan-0

BChan-0 commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

@BChan-0 thoughts on this?

This looks like a good implementation; Might require testing against other cases (looks like you tested a cut for a patch release, but I'd try logic for major and minor releases too, especially major since the regex might not parse as cleanly with the different repositories' different formatting on the unstable files). I think legacy contributor dedup might also be flaky with different formatting in -bloom and -json(?) but that can either be solved manually or passing new format allowances. I think more dry runs may be helpful to dig up other cases. Otherwise, it should at least be nondestructive to run since it's same discovery logic and is independent of the core valkey notes anyways.

sarthakaggarwal97 added a commit to sarthakaggarwal97/valkey-ci-agent that referenced this pull request Aug 8, 2026
release-start (authorize, derive, open tracker, chain the cut),
release-reconcile (hourly recompute + guarded progress actions, with a
valkey token deliberately lacking contents:write and a separate
downstream write token excluding valkey), release-adopt (record an
authorized owner's acknowledgement of branch movement), and
release-publish (validate renders the approval evidence; the publish
job runs behind the protected release environment, which the code
verifies is actually protected - required reviewers, no self-review,
no admin bypass - before any path runs).

The notes cut becomes fork-safe: its target repo is owner-scoped
instead of hardcoded upstream, App-token steps tolerate missing
secrets, and VALKEY_GITHUB_TOKEN is accepted as the fork fallback.
Every PAT fallback is structurally impossible when the owner is
valkey-io. Rebase point with PR valkey-io#80 (repo input on the cut) is marked
in release-start.

Signed-off-by: Sarthak Aggarwal <sarthagg@amazon.com>
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