Skip to content

ci: fix fromJson('') crash that fails release job on non-release pushes (LAB-865) - #58

Merged
27Bslash6 merged 1 commit into
mainfrom
lab-865-release-fromjson-fix
Jul 26, 2026
Merged

ci: fix fromJson('') crash that fails release job on non-release pushes (LAB-865)#58
27Bslash6 merged 1 commit into
mainfrom
lab-865-release-fromjson-fix

Conversation

@27Bslash6

Copy link
Copy Markdown
Contributor

LAB-865: fix fromJson('') crash in release workflow assign step

The bug

GitHub Actions evaluates a step's env: templates when materializing the step, before the if: guard is consulted. On any push to main where release-please creates/updates no release PR, steps.release.outputs.pr is empty, so fromJson('') throws Error reading JToken from JsonReader and fails the whole release-please job — which skips publish (needs: release-please).

Evidence: runs 30205236363 (merge of #57), 29831146861, 29831120533, 29558428840 — all dead at this step. Last green: 29454532970 (v0.3.0, before the assign step existed).

Worst case: the push that merges a release PR also has an empty pr output, so release_created=true would be computed but the job dies first → tag/GitHub release and crates.io silently diverge. This would bite the LAB-764 v0.4.0 release with certainty.

The fix

Remove fromJson from the template position that can see an empty string. The step now selects the release PR by release-please's deterministic head branch:

release-please--branches--main--components--cachekit-core

Note: this is not the release-please--branches--main form — release-please v4 in manifest mode appends the component name. Verified against the actual release PRs #38 and #49, both on exactly this branch.

Both live paths survive

  • Push with no release PR (outputs.pr empty): no template in the step parses JSON, so materialization succeeds; if: is falsy → step skipped → job green → publish gated only by release_created as designed.
  • Push that creates/updates a release PR (outputs.pr set): if: truthy → gh pr edit <head-branch> resolves the open release PR (release-please maintains exactly one open PR on that branch) and adds the assignee; re-runs are idempotent (adding a present assignee is a no-op).

Scope

  • Only the assign step changed (5 insertions, 2 deletions). Publish job, permissions, concurrency, triggers untouched.
  • This is release-infra repair, not a check-gating change: this workflow publishes releases and is not a required PR status check.
  • The LAB-791 Release-As: 0.3.1 footer was separately ineffective (buried mid-body by squash-merge; test: is a non-releasing type). Per the amended LAB-764 rollout, v0.3.1 is not being resurrected — the readers-first release is collapsed into v0.4.0. This PR fixes the pipeline only.

Docs gate

No docs surface: internal CI repair, no user-facing or documented behavior changed.

Closes LAB-865

…non-release pushes

Step env: templates are evaluated when the step is materialized, regardless
of the if: guard. On any push to main where release-please creates/updates
no release PR, steps.release.outputs.pr is empty and fromJson('') throws a
template error that fails the release-please job — which skips the publish
job (needs: release-please). Since the push that merges a release PR also
has an empty pr output, the next real release would tag on GitHub but never
publish to crates.io.

Select the release PR by release-please's deterministic head branch
(release-please--branches--main--components--cachekit-core, verified against
release PRs #38 and #49) instead of parsing the PR number in a template
position that can see an empty string.

Closes LAB-865
@coderabbitai

coderabbitai Bot commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 44 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 5405053b-4d9e-4123-8c39-39234f900bd0

📥 Commits

Reviewing files that changed from the base of the PR and between 49a7017 and 4776d22.

📒 Files selected for processing (1)
  • .github/workflows/release.yml
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch lab-865-release-fromjson-fix

Comment @coderabbitai help to get the list of available commands.

@kodus-27b

kodus-27b Bot commented Jul 26, 2026

Copy link
Copy Markdown

Kody Review Complete

Great news! 🎉
No issues were found that match your current review configurations.

Keep up the excellent work! 🚀

Kody Guide: Usage and Configuration
Interacting with Kody
  • Request a Review: Ask Kody to review your PR manually by adding a comment with the @kody start-review command at the root of your PR.

  • Validate Business Logic: Ask Kody to validate your code against business rules by adding a comment with the @kody -v business-logic command.

  • Provide Feedback: Help Kody learn and improve by reacting to its comments with a 👍 for helpful suggestions or a 👎 if improvements are needed.

Current Kody Configuration
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug
Performance
Security
Business Logic

Access your configuration settings here.

@27Bslash6
27Bslash6 enabled auto-merge (squash) July 26, 2026 14:19
@27Bslash6
27Bslash6 merged commit 88c7c7e into main Jul 26, 2026
32 checks passed
@27Bslash6
27Bslash6 deleted the lab-865-release-fromjson-fix branch July 26, 2026 14:26
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.

1 participant