Skip to content

fix(release): pass the bump job's permissions through the reusable-workflow call - #3262

Merged
lidge-jun merged 1 commit into
devfrom
codex/release-workflow-permissions
Sep 2, 2026
Merged

fix(release): pass the bump job's permissions through the reusable-workflow call#3262
lidge-jun merged 1 commit into
devfrom
codex/release-workflow-permissions

Conversation

@lidge-jun

@lidge-jun lidge-jun commented Sep 2, 2026

Copy link
Copy Markdown
Owner

Summary

Verification

  • bun test tests/ci-workflows.test.ts 135 pass; YAML parse shows bump-dev-version.permissions == {contents: write, pull-requests: write}.
  • Security boundary: this is a GitHub Actions change. It grants the caller job the same two scopes the callee already declared under fix(release): call the dev version bump instead of listening for an event that never fires #3129's review; the bump branch is unprotected and Protect dev still requires a PR, so this token still cannot land on dev.
  • Will be cherry-picked to main and preview (release.yml runs from those refs) and the v2.40.0 dispatches re-run.

Checklist

  • Scope stays focused and avoids unrelated cleanup.
  • Docs or release notes were updated when needed (n/a).
  • Security-sensitive changes were reviewed for secrets, auth, and unsafe defaults.

Summary by CodeRabbit

  • Chores
    • Updated release automation permissions to support required repository and pull request operations.
    • No other release workflow behavior changed.

…rkflow call

Both v2.40.0 release dispatches (33615174183 preview, 33615177849 main) died
at startup_failure: a workflow_call cannot grant its callee more than the
calling job holds, and dev-version-bump.yml's job declares contents+pull-
requests write. #3129 wired the call but never dispatched a release, so this
is its first live run. The caller job now declares exactly the callee's two
permissions; no other job in release.yml gains anything.
@lidge-jun
lidge-jun requested a review from Ingwannu as a code owner September 2, 2026 09:43
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 2, 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-09-02T09:46:50.031297Z 4f87212 PR opened
ℹ️ 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.

@github-actions github-actions Bot added the bug Something isn't working label Sep 2, 2026
@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Deterministic PR hygiene checks passed.

@lidge-jun

Copy link
Copy Markdown
Owner Author

Owner admin merge, user-authorized. Workflow-only; first live run of #3129's call surfaced the missing caller-side permissions.

@lidge-jun
lidge-jun merged commit 7ce0ba5 into dev Sep 2, 2026
20 of 21 checks passed
@lidge-jun
lidge-jun deleted the codex/release-workflow-permissions branch September 2, 2026 09:43
@coderabbitai

coderabbitai Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Team

Run ID: b3761c23-f9b4-42bb-88fd-030d51c80655

📥 Commits

Reviewing files that changed from the base of the PR and between a6ee24f and 4f87212.

📒 Files selected for processing (1)
  • .github/workflows/release.yml

📝 Walkthrough

Walkthrough

The release workflow now grants contents: write and pull-requests: write at the reusable dev-version-bump.yml job level.

Changes

Release workflow permissions

Layer / File(s) Summary
Configure reusable workflow permissions
.github/workflows/release.yml:70-77
The bump-dev-version reusable-workflow call now grants contents: write and pull-requests: write permissions.

Estimated code review effort: 1 (Trivial) | ~5 minutes

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/release-workflow-permissions

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.

@lidge-jun

Copy link
Copy Markdown
Owner Author

리뷰 · 우선순위 72 / 80

이 PR은 제품 기능이 아니다. release.ymlbump-dev-version 잡이 reusable workflow dev-version-bump.yml 을 호출할 때, 호출 잡이 넘기는 권한이 피호출 잡이 선언한 contents: write + pull-requests: write 보다 작아서 GitHub이 런 전체를 startup_failure 로 거절하던 구멍을 막는다. 변경은 .github/workflows/release.yml 한 파일이고, 호출 잡에 위 두 권한을 명시하는 8줄 추가가 전부다.

배경. #3129dev 버전 범프를 이벤트 리스닝이 아니라 release 워크플로가 직접 호출하도록 바꿨다. 그 첫 실전 디스패치가 바로 v2.40.0 이었고, 런 33615174183 / 33615177849 가 잡 시작 전에 죽었다. reusable-workflow 호출은 호출 잡이 가진 권한만 넘길 수 있다. 피호출 쪽이 write를 선언했는데 호출 쪽이 안 넘기면 GitHub이 거절한다. 이 PR이 그 계약을 맞춘 것이다.

리뷰 시점의 현재 origin/dev272ff6b11 이고, 이 수정은 이미 HEAD ancestry에 있다(스냅샷 invariants releaseBumpPermissions). 같은 내용이 #3263 으로 main 에, #3264preview 에 cherry-pick 되어 v2.40.0 재디스패치가 돌아가게 했고, 태그·npm·이어진 #3265(dev → 2.41.0)까지 끝났다. 즉 이 리뷰는 사후 기록이다.

왜 중요한가. 승격 PR(#3260/#3261)이 초록이어도, 채널 쪽 release.yml 이 권한을 못 넘기면 퍼블리시·범프 기차가 한 줄도 실행되지 않는다. Windows CI·제품 화물과 별개로, 릴리즈 자동화의 시동 열쇠다. 파일 경로·심볼을 새로 발명하지 않았다. 로컬 체크아웃의 release.yml 67–80줄 부근에 같은 주석과 permissions 블록이 있다.

경로 .github/workflows/release.yml / bump-dev-version - 호출 잡 permissions에 contents: write · pull-requests: write 만 추가. 다른 잡에 write를 넓히지 않는다.
경로 피호출 dev-version-bump.yml - 잡이 이미 선언한 권한과 정확히 맞춘다. 과다 권한이 아니다.
경로 런 33615174183 / 33615177849 - 첫 실전 증거. 이론이 아니라 실제 startup_failure 다.
경로 #3263 · #3264 - release.yml 은 릴리즈 가지에서 돌아가므로 dev 만 고치면 부족하다. 채널 cherry-pick이 필수였고 이미 했다.
경로 현재 dev 272ff6b11 - 이미 흡수됨. 재베이스 불필요.

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

  • (사후) 다음 릴리즈 전에 preview/mainrelease.yml 권한이 dev 와 같은지 체크리스트에 넣을지
  • reusable workflow 호출 권한 상속을 tests/ci-workflows.test.ts 에 정적 검사로 고정할지
  • Actions create-PR 설정(#3265 수동 오픈 원인)을 같이 손볼지

너의 추천
이미 머지·채널 반영·v2.40.0 퍼블리시까지 끝났으니 추가 패치는 없다. 다음 승격 전에도 이 권한이 채널 release.yml 에 남아 있는지만 확인하면 된다. 라벨은 바꾸지 않는다.

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

yansigit pushed a commit to yansigit/opencodex that referenced this pull request Sep 2, 2026
…rkflow call (lidge-jun#3262)

Both v2.40.0 release dispatches (33615174183 preview, 33615177849 main) died
at startup_failure: a workflow_call cannot grant its callee more than the
calling job holds, and dev-version-bump.yml's job declares contents+pull-
requests write. lidge-jun#3129 wired the call but never dispatched a release, so this
is its first live run. The caller job now declares exactly the callee's two
permissions; no other job in release.yml gains anything.

Co-authored-by: jun <jun@lidge.dev>
(cherry picked from commit 7ce0ba5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant