Skip to content

fix(release): call the dev version bump instead of listening for an event that never fires - #3129

Merged
lidge-jun merged 1 commit into
devfrom
fix/dev-version-bump-never-fires
Sep 1, 2026
Merged

lidge-jun merged 1 commit into
devfrom
fix/dev-version-bump-never-fires

Conversation

@lidge-jun

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

Copy link
Copy Markdown
Owner

Summary

.github/workflows/dev-version-bump.yml has never run. Not once since it landed in #3013gh api .../workflows/346296606/runs returns total_count: 0, across v2.37.0, v2.38.0 and v2.39.0. Every one of those bumps was still opened by hand (#3045, #3076, #3127), which is exactly the chore the workflow was written to end.

The workflow was not broken. The event never existed.

Why the event never arrives

release.yml creates the GitHub release with GH_TOKEN: ${{ github.token }} (release.yml:350), and GitHub does not start new workflow runs from events raised by the default GITHUB_TOKEN. So a release: published listener can never observe a release this repository publishes itself — on any branch. The old header blamed the default-branch resolution trap, which is real but was not what stopped it: moving the file to main (which #3013 did) armed nothing.

The tag push does not rescue it either. release.yml pushes refs/tags/vX.Y.Z with the same token, and no workflow run exists for those tag pushes.

The fix

release.yml calls the bump workflow after a successful publish, so the run is a child of the release run rather than a reaction to an undelivered event:

bump-dev-version:
  needs: publish
  if: ${{ inputs.dry-run != true }}
  uses: ./.github/workflows/dev-version-bump.yml
  with:
    released-version: v${{ inputs.version }}

dev-version-bump.yml becomes on: workflow_call with a released-version input, replacing the two github.event.release.tag_name reads.

No new credential. No PAT, no app token, no contents: write added to the release job. The called workflow keeps its own contents: write / pull-requests: write scoped to its own job, and ruleset Protect dev still means a human merges the resulting PR. This changes how the job starts, nothing about what it may do.

Failure and dry-run behavior. needs: publish already skips the job unless the publish succeeded; the explicit condition only adds the dry-run case. A failed publish or a failed release creation opens nothing.

Both channels call it, and that is safe. bump-dev-version.ts compares against what dev already carries, verified against the current tree:

preview publish while dev=2.40.0 -> {"changed":false,"reason":"dev already carries 2.40.0, which is ahead of the published 2.40.0-preview.20260910"}
stable  publish while dev=2.40.0 -> {"changed":true,"version":"2.41.0"}

Every later step is gated on changed, so the preview call is a no-op in the usual train and the stable call opens the one PR. A preview publishing while dev is genuinely behind still bumps it.

One non-obvious detail

bump-dev-version is declared first in release.yml, ahead of the jobs it depends on. tests/ci-workflows.test.ts:735 splits the workflow on - name: and reads each run: block to the start of the next one, checking that dispatch inputs never interpolate into shell source. A job declared after the last step lands inside that window and reads as shell — the test failed on the first two placements I tried, correctly. Job order in YAML carries no execution meaning (needs does), so declaring it before its own dependency costs nothing and keeps the injection check honest rather than weakening it.

Verification

$ bun test tests/ci-workflows.test.ts tests/cleanup-orphaned-workflows.test.ts \
           tests/release-version-line.test.ts tests/bump-dev-version.test.ts
 155 pass
 0 fail

Both workflows re-parse as valid YAML with the expected job graph, and no github.event.release reference remains in the bump workflow.

What this cannot verify here

A workflow_call body resolves from the caller's ref, and release.yml only runs on main or preview. So this takes effect after an ordinary devmain promotion carries it there — the next release is the first real exercise. That is the same activation delay #3013 had, now for a different reason, and it is stated here rather than discovered later.

Checklist

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

Summary by CodeRabbit

  • Chores
    • Improved the release process to automatically update the development version after a successful production release.
    • Prevented development-version updates during dry-run releases.
    • Improved compatibility between release workflows and self-published releases.

@lidge-jun
lidge-jun requested a review from Ingwannu as a code owner September 1, 2026 03:28
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 1, 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-01T03:31:37.631220Z 55ce2c1 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.

@lidge-jun
lidge-jun merged commit 6f415ba into dev Sep 1, 2026
6 of 7 checks passed
@lidge-jun
lidge-jun deleted the fix/dev-version-bump-never-fires branch September 1, 2026 03:28
@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Deterministic PR hygiene checks passed.

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

coderabbitai Bot commented Sep 1, 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: 8a8c51bb-97a4-47f2-b7ad-e0fedec5f0e5

📥 Commits

Reviewing files that changed from the base of the PR and between 33d32b6 and 55ce2c1.

📒 Files selected for processing (2)
  • .github/workflows/dev-version-bump.yml
  • .github/workflows/release.yml

📝 Walkthrough

Walkthrough

Changes

The release workflow now directly invokes the development version bump workflow after a successful non-dry-run publish. The reusable workflow accepts the released version as an input and uses it in its version calculation and pull-request steps.

Development version bump flow

Layer / File(s) Summary
Reusable workflow input propagation
.github/workflows/dev-version-bump.yml
Lines 17–45 replace the release: published trigger with a required workflow_call input. Lines 89 and 108 use inputs.released-version for RELEASED_VERSION.
Release workflow integration
.github/workflows/release.yml
Lines 39–73 add a bump-dev-version job. The job waits for publish, skips dry runs, and passes v${{ inputs.version }} to the reusable workflow.

Estimated code review effort: 2 (Simple) | ~10 minutes

Sequence Diagram(s)

sequenceDiagram
  participant ReleaseWorkflow
  participant DevVersionBumpWorkflow
  participant VersionDecidingStep
  participant PullRequestOpeningStep
  ReleaseWorkflow->>DevVersionBumpWorkflow: Pass released-version
  DevVersionBumpWorkflow->>VersionDecidingStep: Set RELEASED_VERSION
  DevVersionBumpWorkflow->>PullRequestOpeningStep: Set RELEASED_VERSION
Loading

Suggested reviewers: ingwannu, wibias

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/dev-version-bump-never-fires

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.

@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: 55ce2c115e

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

bump-dev-version:
needs: publish
if: ${{ inputs.dry-run != true }}
uses: ./.github/workflows/dev-version-bump.yml

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Grant the reusable call its required write scopes

On every successful non-dry-run release, this call inherits the workflow-level permissions: {}, while GitHub only permits a called reusable workflow to maintain or reduce the caller's token permissions. The called job therefore cannot elevate itself to contents: write or pull-requests: write, so the push or PR creation will be rejected and the intended version-bump PR will not open. Grant those two scopes on this calling job; they will remain isolated from publish.

AGENTS.md reference: .github/AGENTS.md:L16-L16

Useful? React with 👍 / 👎.

on:
release:
types: [published]
workflow_call:

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Trigger checks for the bot-created pull request

After the caller's permissions are fixed, every bump that changes dev still pushes the branch and creates its PR with the default github.token. GitHub suppresses workflow runs for events generated by that token—the same behavior motivating this change—so neither the branch push nor PR creation starts ci.yml or enforce-pr-target.yml; the automated PR will consequently lack its required checks until a human retriggers an event. Create it with an approved non-default credential or explicitly arrange a non-suppressed trigger for the required PR workflows.

AGENTS.md reference: .github/AGENTS.md:L16-L18

Useful? React with 👍 / 👎.

lidge-jun added a commit that referenced this pull request Sep 2, 2026
…rkflow call (#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. #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>
lidge-jun added a commit that referenced this pull request Sep 2, 2026
* fix(release): pass the bump job's permissions through the reusable-workflow 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.

* devlog(windows): 070 outcome — v2.40.0 released, Windows shards repaired, follow-ups

* devlog(windows): 070 — correct the service-lifecycle trigger note

* devlog(windows): 070 — record the full 4/4 Windows-green dispatch on the released dev tip

* chore(devlog): wp5 release closeout marker

---------

Co-authored-by: jun <jun@lidge.dev>
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)
tarunravi pushed a commit to tarunravi/opencodex that referenced this pull request Sep 14, 2026
tarunravi pushed a commit to tarunravi/opencodex that referenced this pull request Sep 14, 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)
tarunravi pushed a commit to tarunravi/opencodex that referenced this pull request Sep 14, 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>
tarunravi pushed a commit to tarunravi/opencodex that referenced this pull request Sep 14, 2026
…n#3267)

* fix(release): pass the bump job's permissions through the reusable-workflow 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. 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.

* devlog(windows): 070 outcome — v2.40.0 released, Windows shards repaired, follow-ups

* devlog(windows): 070 — correct the service-lifecycle trigger note

* devlog(windows): 070 — record the full 4/4 Windows-green dispatch on the released dev tip

* chore(devlog): wp5 release closeout marker

---------

Co-authored-by: jun <jun@lidge.dev>
agentHits pushed a commit to agentHits/opencodex that referenced this pull request Sep 17, 2026
agentHits pushed a commit to agentHits/opencodex that referenced this pull request Sep 17, 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)
agentHits pushed a commit to agentHits/opencodex that referenced this pull request Sep 17, 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>
agentHits pushed a commit to agentHits/opencodex that referenced this pull request Sep 17, 2026
…n#3267)

* fix(release): pass the bump job's permissions through the reusable-workflow 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. 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.

* devlog(windows): 070 outcome — v2.40.0 released, Windows shards repaired, follow-ups

* devlog(windows): 070 — correct the service-lifecycle trigger note

* devlog(windows): 070 — record the full 4/4 Windows-green dispatch on the released dev tip

* chore(devlog): wp5 release closeout marker

---------

Co-authored-by: jun <jun@lidge.dev>
lidge-jun added a commit that referenced this pull request Sep 21, 2026
…imi-for-coding default (#5403)

* release: v2.33.0-preview.20260825

* release: v2.34.0-preview.20260827

* release: v2.36.0-preview.20260829

* fix(release): pass the bump job's permissions through the reusable-workflow call (#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. #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)

* release: set preview channel version 2.48.0-preview.20260908

* release: set main channel version 2.48.0

* chore(release): promote 2.55.0-preview.20260914 to preview

Promotes the dev product snapshot 62f0222 to the preview train.

The 2.55.0 line carries the #4546 cost-guard work: one send budget per logical request with a
shared final-recovery reserve, zero-is-zero refusals with a typed error rather than a synthetic
502, compact and the Kiro inner retries admitted against that budget, a finite send ceiling per
root workflow with an interactive reserve a fan-out cannot take, and a healthy detour promoted on
transient-hold expiry instead of released cold.

The previous preview tip 2.54.0-preview.20260914 is already tagged and published and is outranked
by v2.54.0, so it could not be re-released; this is a new candidate rather than a re-cut.

* chore(release): promote the verified 2.55.0 product tree to main

Same product tree as preview 7bdd1b2 / 2.55.0-preview.20260914, which published successfully with its registry smoke green. Only package.json version differs.

* fix(kimi): update Kimi coding registry for K2.8 (adjustable thinking, 1M context, current alias default)

- kimi-for-coding is the stable subscription alias Moonshot re-points at each
coding release; it now routes to K2.8 Preview. Live GET /coding/v1/models
lists only kimi-for-coding[-highspeed], k3, k3-256k; the k2.x ids are
retired from the subscription endpoint.
- K2.8 accepts the same adjustable low/high/max thinking ladder as k3
(verified live: 350K-token request accepted at max effort; upstream
rejects beyond 1,048,576 with 'model token limit: 1048576').
- Bump kimi-for-coding context window to the verified 1M ceiling and
advertise text+image input.
- Default kimi / kimi-code presets to kimi-for-coding instead of the
retired kimi-k2.7-code.
- Update provider-registry parity test to match the new verified shape.

* fix(kimi): retire k2.x ids from the coding picker and migrate saved configs to kimi-for-coding

Address review on #5403:

- MODEL_RENAMES gains kimi/kimi-code entries mapping the retired default
  kimi-k2.7-code to the live kimi-for-coding alias, so saved configs keep
  working after Moonshot removed the k2.x ids from the subscription endpoint.
- The kimi/kimi-code presets seed only ids the endpoint still serves (live
  /coding/v1/models: kimi-for-coding, k3). Every preset metadata list is
  live-id only: seeding a retired id there re-armed the rename migration on
  every boot (#5066 shape), because the residue guard cannot skip a list that
  holds the retired id without the live alias.
- KIMI_CODING_MODELS is replaced by KIMI_CODING_LIVE_MODELS built from
  KIMI_CODING_K3_MODELS + KIMI_CODING_K28_MODELS, so a future alias added to
  the K28 constant flows into the picker and every parallel record.
- Parity tests now assert defaultModel is kimi-for-coding for both presets
  (a registry rollback to the retired default would otherwise pass silently).

Verified: bun test on model-rename-migration, provider-registry-parity and
codex-catalog (432 pass), full tests/providers sweep (only pre-existing
proxy-environment timeouts fail, identical on the clean base), tsc clean.

* docs(kimi): document the K2.8 coding refresh in the providers guide

Address the CodeRabbit finding on #5403: the kimi row in the canonical
English providers guide (and the zh-cn translation) now documents the
kimi-for-coding default, the 1M context window, the adjustable
low/high/max ladder (default max), image input, and the automatic
kimi-k2.7-code migration on upgrade. Verified with the required
validation: cd docs-site && bun install --frozen-lockfile && bun run
build (497 pages, exit 0).

* fix(kimi): repair saved K2 coding metadata

* fix(kimi): drop the stale no-reasoning classification even when only the replacement id is present

Address the CodeRabbit finding on the maintainer's 608d7a2: a saved row can
carry kimi-for-coding in noReasoningModels while every retired id is already
gone from the row (the pre-K2.8 registry seeded the alias there). The early
return in dropRenamedIdsFromList required the retired id, so the stale
classification survived and kept the reasoning picker disabled for the live
alias. Proceed when the list contains either id and filter both.

Verified: model-rename-migration + provider-registry-parity 101 pass, tsc
clean; new regression test covers the replacement-id-only row.

* fix(kimi): preserve explicit reasoning overrides

---------

Co-authored-by: JUN <bitkyc08@gmail.com>
Co-authored-by: jun <jun@junui-MacBookPro.local>
Co-authored-by: jun <jun@lidge.dev>
Co-authored-by: lidge-jun <243035832+lidge-jun@users.noreply.github.com>
Co-authored-by: t <a@b.com>
Co-authored-by: JUN <jun@lidgeai.com>
Co-authored-by: panyuanyuan <panyuanyuan@hetao101.com>
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