Skip to content

Strip the bot's [WRONG BRANCH] prefix from release summaries and full changelogs #3895

Closed

Description

@parkjs101

Client or integration

Other (GitHub release notes generated by scripts/release-notes.ts)

Area

Installation or packaging

Summary

The v2.45.0 release includes the PR-enforcement bot's [WRONG BRANCH] title prefix in both a category bullet and the full changelog.

Two rendering paths preserve it at dev commit 76436a3ee221d577cc94d6c10544c03bb1f9d9db:

  • cleanPrTitle recognizes conventional prefixes only at the start of the title. The bot prefix prevents both cleanup and scope extraction.
  • Full changelog rendering uses pr.title.trim() directly. Fixing only cleanPrTitle therefore leaves the changelog occurrence intact.

Expected: remove the known leading bot prefix from both rendered paths. Category bullets should retain their existing conventional-prefix cleanup and sentence casing; the full changelog should retain the conventional title, PR number, and author.

The bot's title marker is defined in enforce-pr-target.yml. This report does not propose relaxing that enforcement workflow.

Reproduction

  1. Open the v2.45.0 release linked above and search for WRONG BRANCH. It appears in both sections.
  2. From the reviewed checkout, evaluate these pure helpers with Bun:
import { cleanPrTitle, renderReleaseNotes } from "./scripts/release-notes";

const title = "[WRONG BRANCH] chore(release): promote validated 2.45.0 to main";
console.log(cleanPrTitle(title, 3813));
console.log(renderReleaseNotes({
  npmMetadata: "",
  deltaPrNotes: [
    "## What's Changed",
    "### Chores",
    `* ${title} by @lidge-jun in https://github.com/lidge-jun/opencodex/pull/3813`,
  ].join("\n"),
}));

Current helper result:

{"scope":null,"text":"[WRONG BRANCH] chore(release): promote validated 2.45.0 to main"}

Expected helper result:

{"scope":"release","text":"Promote validated 2.45.0 to main"}

Expected category bullet:

- Promote validated 2.45.0 to main (#3813)

Expected full changelog entry:

- #3813 chore(release): promote validated 2.45.0 to main @lidge-jun

Add a regression that exercises the complete renderer and asserts both output paths. Also preserve ordinary unprefixed titles, meaningful bracketed text other than the known bot marker, PR references, and author attribution. A helper-only assertion is insufficient.

Version

Source reproduced at dev commit 76436a3; also verified in the published v2.45.0 release.

Operating system

Locally reproduced on Windows with Bun 1.4.0. The affected code is a pure release-note renderer.

Provider and model

The reproduction does not invoke a provider or model.

Logs or error output

Actual complete-renderer output:

## Chores

- [WRONG BRANCH] chore(release): promote validated 2.45.0 to main (#3813)

## Changelog

- #3813 [WRONG BRANCH] chore(release): promote validated 2.45.0 to main @lidge-jun

Screenshots and supporting files

The published release and pinned source links above provide the artifacts. All 71 existing tests in tests/ci-workflows/release-notes.test.ts passed during review; the prefixed-title case was reproduced separately.

No conclusion about why v2.46.0 rendered differently is needed for this reproduction. Workflow timing has not been established.

Redacted configuration

{}

The minimal reproduction uses the literal title and note body above; no user configuration or credentials are involved.

Checks

  • I searched existing issues and documentation.
  • I removed secrets, tokens, account details, request credentials, and personal data.

Activity

  1. lidge-jun commented on Sep 7, 2026

    @lidge-jun
    Owner

    리뷰 · 우선순위 44 / 80

    이 이슈는 릴리즈 노트 렌더러가 PR 강제 봇의 [WRONG BRANCH] 접두사를 그대로 남겨 v2.45.0 노트에 노출한 문제입니다. 지금 dev의 scripts/release-notes.ts에서 cleanPrTitle은 제목 맨 앞의 conventional prefix만 인식합니다. 앞에 [WRONG BRANCH]가 있으면 scope 추출도, 문장 정리도 실패합니다. 전체 changelog 경로는 pr.title.trim()을 그대로 쓰므로 cleanPrTitle만 고쳐도 changelog 쪽은 남습니다. 봇 마커 정의는 .github/workflows/enforce-pr-target.yml에 있고, 이 이슈는 그 강제 워크플로를 풀자는 제안이 아닙니다.

    재현이 순수 헬퍼라 좋습니다. 기대값도 카테고리 bullet / full changelog / 일반 제목·다른 대괄호 보존까지 적혀 있습니다. tests/ci-workflows/release-notes.test.ts에 렌더러 전체 회귀를 넣으라고 한 점도 맞습니다. 헬퍼만 단언하면 changelog 경로가 또 빠집니다.

    scripts/release-notes.ts (cleanPrTitle ~549행대) - 알려진 봇 접두사를 먼저 벗긴 뒤 기존 conventional 정리를 돌리면 됩니다.

    scripts/release-notes.ts (changelog 루프 ~686행대) - pr.title.trim() 직행을 cleanPrTitle 결과나 공통 strip 헬퍼로 바꿔야 두 경로가 같이 고쳐집니다.

    메인테이너의 판단이 필요한 지점

    • strip 대상을 [WRONG BRANCH] 한 개만 할지, 같은 워크플로의 다른 마커도 포함할지
    • 이미 올린 v2.45.0 노트를 수정 재발행할지, 다음 릴리즈부터만 적용할지

    너의 추천
    help wanted로 두고, cleanPrTitle+changelog 공통 strip + 전체 렌더러 회귀 테스트 PR을 받으면 됩니다. 강제 워크플로는 그대로 두세요.

    이 댓글은 grok-bot이 작성했습니다

  2. lidge-jun commented on Sep 7, 2026

    @lidge-jun
    Owner

    Fixed on dev by #3960 (9c8f66b). Both the active release changelog builder and standalone renderer now normalize the exact leading enforcement marker while retaining meaningful bracketed text, PR IDs and authors. Generated/associated builder regressions and original renderer regressions passed in final-head hosted CI. This is dev integration; no new release was published by this task.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinginstallInstallation or packaging

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions