Repository navigation
Fix webhook integer overflow in 32-bit release builds - #70775
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
🧠 Matt Pocock Skills Reviewer is reviewing this pull request using Matt Pocock's engineering skills... |
|
🔍 Design Decision Gate 🏗️ is checking for design decision records on this pull request... |
|
🔬 Test Quality Sentinel is analyzing test quality on this pull request... |
|
🔎 PR Code Quality Reviewer is reviewing code quality for this pull request... |
|
✂️ Ponytail Reviewer has started processing this pull request |
There was a problem hiding this comment.
🟢 Approval recommended
The lossless conversion fixes 32-bit compilation while preserving validation behavior, with no blocking issues identified.
No open issues 🎉
What changed in this PR
Fixes webhook integer validation so gh-aw release builds compile on 32-bit architectures without changing accepted values.
Changes:
- Converts native integers to
int64before JSON-safe range comparisons. - Adds tests for native integer limits and JSON-safe boundaries.
| File | Description |
|---|---|
pkg/workflow/webhook.go |
Prevents comparison constants from overflowing on 32-bit targets. |
pkg/workflow/webhook_test.go |
Adds architecture-aware limits and boundary cases. |
Review effort: Max
|
🎉 This pull request is included in a new release. Release: |
The v0.92.7 release build failed on FreeBSD/386 because webhook integer validation compared an
intagainst JSON-safe integer bounds that overflow on 32-bit architectures.Widen the native integer to
int64before comparing, preserving the accepted range on all architectures. Add regression coverage for native integer limits and the JSON-safe boundaries.Validation: native build, targeted webhook tests, FreeBSD/386 and Linux/386 release builds, and changed-line lint passed. The full validation gate remains blocked by unrelated lint findings in unchanged files; the separate workflow-drift check reports an existing mismatch in
daily-caveman-optimizer.lock.yml. Compiling the full workflow test package for 386 also encounters an unrelated overflowing constant incache_optional_int_test.go.