Skip to content

ci: prevent xcresulttool summary from exceeding GitHub check run byte limit#557

Draft
ab1470 wants to merge 4 commits intomasterfrom
ab/MAGE-531/fix-xcresulttool-summary-limit
Draft

ci: prevent xcresulttool summary from exceeding GitHub check run byte limit#557
ab1470 wants to merge 4 commits intomasterfrom
ab/MAGE-531/fix-xcresulttool-summary-limit

Conversation

@ab1470
Copy link
Copy Markdown
Contributor

@ab1470 ab1470 commented Apr 20, 2026

Summary

CI was failing with:

Error: Validation Failed: {"resource":"CheckRun","code":"custom","field":"summary","message":"summary exceeds a maximum bytesize of 65535"}

The slidoapp/xcresulttool@v3.1.0 action defaults to listing every passing test in its check run summary, which pushes the output past GitHub's 65535-byte limit for check run summaries.

This PR sets show-passed-tests: false on the action in both the library-macos-14 and library-macos-15 jobs. Failed tests remain visible — passed test listings add no CI signal.

Resolves MAGE-531.

Test plan

  • CI passes on this PR (the fix validates itself — the xcresulttool step must succeed where it previously exceeded the byte limit)
  • Confirm the check run summary still surfaces failed tests if any exist

🤖 Generated with Claude Code

The xcresulttool action was generating a GitHub check run summary
that exceeded the 65535-byte limit, causing CI to fail when posting
results. Listing every passing test inflates the output; failures
remain visible.

MAGE-531

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@ab1470 ab1470 requested a review from a team as a code owner April 20, 2026 15:45
@klaviyoit klaviyoit requested a review from dan-peluso April 20, 2026 15:45
@ab1470 ab1470 marked this pull request as draft April 20, 2026 15:53
v3.1.0 with show-passed-tests:false was still exceeding GitHub's
65535-byte check run limit due to code coverage data. Upgrade to
v3.1.1 and also set show-code-coverage:false to keep output within
the limit.

MAGE-531

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
#expect(formId == nil)
#expect(formName == nil)
#expect(buttonLabel == nil)
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test expects success but decoder will throw on missing data

Medium Severity

testDecodeOpenDeepLinkMissingDataKey expects decoding {"type": "openDeepLink"} to succeed with nil fields, but the openDeepLink case in init(from:) uses try container.decode(...) (not try?) for the data key. A missing "data" key will throw a DecodingError, making this test always fail. Unlike formWillAppear and formDisappeared, which use try? and gracefully handle missing data.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 762acfa. Configure here.

AppContextInfo.init computed `environment` via `#if DEBUG` when the
push environment was unknown (always the case in tests/CI). This caused
snapshot tests to produce "debug" in debug builds and "release" in
release builds, making EncodableTests fail on every release CI run.

Fix: add an optional `environment` parameter to AppContextInfo.init and
pin it to "debug" in both test fixtures (KlaviyoCoreTests, KlaviyoSwiftTests).
Regenerate the four affected snapshots against the pinned value.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@ab1470 ab1470 force-pushed the ab/MAGE-531/fix-xcresulttool-summary-limit branch from bc7871e to 24bcb18 Compare April 22, 2026 20:46
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

There are 2 total unresolved issues (including 1 from previous review).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 24bcb18. Configure here.

deviceModel: "jPhone 1,1",
deviceId: "fe-fi-fo-fum")
deviceId: "fe-fi-fo-fum",
environment: "debug")
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Third test fixture missing explicit environment parameter

Low Severity

Two of the three AppContextInfo.test fixtures were updated with environment: "debug", but the identical fixture in Tests/KlaviyoLocationTests/KlaviyoLocationTestUtils.swift (line 83) was not. That fixture still omits the environment parameter, so it falls through to UIDevice.current.pushEnvironment at runtime — the non-deterministic path the other two fixtures were explicitly changed to avoid.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 24bcb18. Configure here.

SnapshotTesting generates JSON without trailing newlines, but the
snapshot files had trailing newlines (from git/editor normalization),
causing all EncodableTests to fail in CI with a spurious one-line diff.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.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.

3 participants