Skip to content

fix(ci): cap release.yml PR-body writes under GitHub's 65536-char limit - #830

Merged
c-vigo merged 1 commit into
release/0.4.0from
bugfix/810-release-yml-pr-body-cap
Jul 4, 2026
Merged

c-vigo merged 1 commit into
release/0.4.0from
bugfix/810-release-yml-pr-body-cap

Conversation

@c-vigo

@c-vigo c-vigo commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Summary

#812 capped the PR body only in prepare-release.yml. Two more sites in release.yml rebuild the release-PR body from the full changelog section uncapped:

  • Finalize path — Refresh release PR body from finalized changelog (blocking). The 0.4.0 section measures ~66.8k chars > GitHub's 65,536 limit, so the first finalize-release 0.4.0 run would have crashed mid-finalize on GraphQL: Body is too long and triggered rollback.
  • Rollback path — Restore release PR body from pre-finalization CHANGELOG (continue-on-error; overflow would leave the body unrestored).

Both steps now apply the same cap as #812: 65,000-char budget, truncation at a line boundary, and a note pointing to the full CHANGELOG.md on the release branch. Small releases inline the whole changelog unchanged.

Lands on release/0.4.0 (before the RC dispatch) so the candidate tests the exact tree that ships; reaches dev/main via the promote merge + sync-back. Changelog entry added to the open ## [0.4.0] - TBD section (the #810 entry, extended).

Follow-up candidate (not this PR): the cap logic now exists in three inline copies (prepare-release.yml + 2× release.yml) — worth extracting into a shared .github/scripts/ helper next cycle.

Verification

  • Standalone harness replicating the de-indented step script, run against the real 0.4.0 changelog section: 66,794-char section → 64,869-char body, truncated at a line boundary, ending with the truncation note; sub-threshold input passes through byte-identical.
  • YAML de-indentation of the new HEADER strings asserted via yaml.safe_load (no indent leak into the string literals).
  • just precommit (full suite, all files): green, exit 0.
  • uv run pytest -k release (10 passed) and tests/test_workflow_cachix.py (4 passed).

Refs: #810

The finalize-path "Refresh release PR body from finalized changelog"
step and the rollback-path "Restore release PR body" step rebuilt the
PR body from the full changelog section uncapped; #812 fixed only
prepare-release.yml. The 0.4.0 section measures ~66.8k chars > 65536,
so the first finalize-release run would have crashed mid-finalize on
"GraphQL: Body is too long" and triggered rollback. Port the same cap:
65000-char budget, line-boundary truncation, note pointing to the full
CHANGELOG.md on the release branch; small releases inline unchanged.

Inline-YAML shell is not unit-testable, so TDD is skipped; the capping
logic was verified with a standalone harness against the real 0.4.0
section (66794-char section -> 64869-char body ending in the truncation
note; sub-threshold input passes through byte-identical) and the YAML
de-indentation of the new HEADER strings was asserted via safe_load.

Refs: #810
@c-vigo
c-vigo merged commit c140fd6 into release/0.4.0 Jul 4, 2026
13 checks passed
@c-vigo
c-vigo deleted the bugfix/810-release-yml-pr-body-cap branch July 4, 2026 16:10
c-vigo added a commit that referenced this pull request Jul 4, 2026
…#858)

## Summary

Forward-fix for the rc3 smoke-test failure
([#857](#857), diagnosis
posted there). rc3 convergence signal: consumer CI green inside the rc3
image, **deploy PR merged** (validating #853 + #856), downstream release
cycle started — and died at `Create draft PR to main` with `GraphQL:
Body is too long`.

It's the #810 bug shipped to consumers: #812 capped only this repo's own
`prepare-release.yml`; the scaffolded copy
(`assets/workspace/.github/workflows/prepare-release.yml`) still
interpolated the full changelog section uncapped, and the smoke-test
repo's CHANGELOG is seeded from our ~67k-char 0.4.0 section. This ports
the identical cap (65,000-char budget, line-boundary truncation, pointer
to the release branch's full `CHANGELOG.md`). `release-core.yml`
(shipped) has no PR-body write, so this is the only consumer-side site.

The deploy sync carries the fixed workflow to the smoke-test repo on the
next candidate (rc4), which should complete the downstream cycle.

## Verification

- Identical cap logic harness-verified against the real 0.4.0 section in
#830 (66,794 → 64,869 chars, line-boundary truncation; sub-threshold
passthrough byte-identical).
- YAML de-indentation of the new `HEADER` asserted via `yaml.safe_load`
(no indent leak).
- `just precommit` (full suite, all files): green, exit 0.
- Changelog entry added to the open `## [0.4.0] - TBD` section.

Refs: #857
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