Skip to content

Fix update_api workflow failing on non-JSON AI changelog response - #596

Merged
dblock merged 1 commit into
masterfrom
dblock/fix-update-api-changelog-entries
Aug 25, 2026
Merged

Fix update_api workflow failing on non-JSON AI changelog response#596
dblock merged 1 commit into
masterfrom
dblock/fix-update-api-changelog-entries

Conversation

@dblock

@dblock dblock commented Aug 25, 2026

Copy link
Copy Markdown
Collaborator

Problem

The scheduled Update API workflow run 32789898905 failed at the "Build changelog entries" step with exit code 5.

The step runs under bash -e (GitHub Actions default). When the AI-generated changelog response isn't valid JSON, jq exits with status 5, which aborts the whole step instead of falling back to the default Update API from slack-api-ref@... entry.

Fix

  • Guards the jq invocation so a non-zero exit doesn't kill the step; falls back to the default entry as originally intended.
  • Always logs the raw AI response for easier debugging of future generation issues.

The 'Build changelog entries' step ran under bash -e. When the AI
response wasn't valid JSON, jq exited with status 5, which killed the
whole step instead of falling back to the default changelog entry.
Also always logs the raw AI response for easier debugging.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown

Danger Report

No issues found.

View run

@dblock
dblock merged commit efb6221 into master Aug 25, 2026
19 checks passed
@dblock
dblock deleted the dblock/fix-update-api-changelog-entries branch August 25, 2026 02:26
@github-actions

Copy link
Copy Markdown

Coverage Report for CI Build 32801311633

Coverage remained the same at 90.971%

Details

  • Coverage remained the same as the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 5859
Covered Lines: 5330
Line Coverage: 90.97%
Coverage Strength: 99.99 hits per line

💛 - Coveralls

dblock added a commit that referenced this pull request Aug 25, 2026
…y when missing

Copilot CLI's response file can include narration/thinking lines before
its final JSON answer (observed in run 32801440182), so the previous
fix (#596) silently discarded a perfectly good AI-generated changelog
because the whole file wasn't valid JSON.

Instead, extract the last line that looks like a JSON object and parse
just that. If no JSON object is found at all, fail the workflow
visibly with ::error:: instead of silently falling back to the generic
changelog entry.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
dblock added a commit that referenced this pull request Aug 25, 2026
…y when missing

Copilot CLI's response file can include narration/thinking lines before
its final JSON answer (observed in run 32801440182), so the previous
fix (#596) silently discarded a perfectly good AI-generated changelog
because the whole file wasn't valid JSON.

Instead, extract the last line that looks like a JSON object and parse
just that. If no JSON object is found at all, fail the workflow
visibly with ::error:: instead of silently falling back to the generic
changelog entry.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.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.

1 participant