Skip to content

fix: adjust GitHub check run char limit considering the MD terraform text wrapper#2615

Open
sav-valerio wants to merge 2 commits intodiggerhq:developfrom
sav-valerio:fix-github-output-char-limit-tf-wrapper
Open

fix: adjust GitHub check run char limit considering the MD terraform text wrapper#2615
sav-valerio wants to merge 2 commits intodiggerhq:developfrom
sav-valerio:fix-github-output-char-limit-tf-wrapper

Conversation

@sav-valerio
Copy link
Copy Markdown

The existing truncation logic in UpdateCheckRunForJob truncates TerraformOutput to 65,535 characters, but then wraps it in a markdown code block ("terraform\n ... \n") adding 17 characters.

This causes the final text sent to GitHub's Check Run API to be 65,552 characters, exceeding the 65,535 limit and resulting in a 422 error.

The fix subtracts the wrapper length from the truncation limit so the final text stays within bounds.
Test is also updated to assert on the final wrapped text rather than just the raw output.

Follows up on #2550
Relates to #2542

🧠 Ai UsageDetails (if applicable):

IMPORTANT: Please disclose any usage of ai tooling while making this change. If you did not use any AI write "NA" below

Code and docs generated by Claude Code; reviewed manually
GitHub Copilot for additional validation

@sav-valerio sav-valerio changed the title fix: adjust char limit in GitHub Check Run output considering the tf text wrapper fix: adjust GitHub char limit considering the terraform md text wrapper Mar 18, 2026
@sav-valerio sav-valerio changed the title fix: adjust GitHub char limit considering the terraform md text wrapper fix: adjust GitHub check run char limit considering the MD terraform text wrapper Mar 18, 2026
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.

2 participants