ci: prevent xcresulttool summary from exceeding GitHub check run byte limit#557
ci: prevent xcresulttool summary from exceeding GitHub check run byte limit#557
Conversation
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>
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) | ||
| } |
There was a problem hiding this comment.
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.
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>
bc7871e to
24bcb18
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
There are 2 total unresolved issues (including 1 from previous review).
❌ 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") |
There was a problem hiding this comment.
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)
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>


Summary
CI was failing with:
The
slidoapp/xcresulttool@v3.1.0action 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: falseon the action in both thelibrary-macos-14andlibrary-macos-15jobs. Failed tests remain visible — passed test listings add no CI signal.Resolves MAGE-531.
Test plan
🤖 Generated with Claude Code