Fix: Include failure summary attachments in extraction (issue #84)#26
Open
davidbean-hash wants to merge 1 commit into
Open
Fix: Include failure summary attachments in extraction (issue #84)#26davidbean-hash wants to merge 1 commit into
davidbean-hash wants to merge 1 commit into
Conversation
…hargePoint#84) The extractAttachments method only collected attachments from ActionTestActivitySummary objects (activity summaries). Attachments added via XCTIssue are stored on ActionTestFailureSummary objects (failure summaries) and were never extracted. This change also collects attachments from failure summaries, enabling extraction of PNG screenshots and JSON data attached via XCTIssue. Resolves ChargePoint#84 Co-Authored-By: david.bean <david.bean@cognition.ai>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Change Description:
Fixes ChargePoint/xcparse#84 — the
xcparse attachmentscommand was missing PNG screenshots and JSON data that were attached viaXCTIssue.Root cause: The
extractAttachmentsmethod inXCPParser.swiftonly collected attachments fromActionTestActivitySummaryobjects (activity summaries). Attachments added throughXCTIssuewithXCTAttachmentare stored onActionTestFailureSummaryobjects (failure summaries), which were never iterated during extraction.Changes:
Sources/xcparse/XCPParser.swift: Also collect attachments fromtestSummary.failureSummariesduring extraction, applying the sameattachmentFilterSources/XCParseCore/ActionTestFailureSummary.swift: Removed stale TODO comment (the gap is now addressed)Tests/xcparseTests/ScreenshotCommandUTITests.swift: Added test verifying non-image UTIs (JSON, plain-text, PDF, data) do not conform topublic.imageand are accepted by the attachments command's default filterThis fix applies to both the
attachmentsandscreenshotscommands since they shareextractAttachments. Thescreenshotscommand'spublic.imageUTI filter still correctly limits output to images; theattachmentscommand's default accept-all filter now picks up every attachment regardless of where it's stored.Test Plan/Testing Performed:
ActionTestFailureSummary.attachmentsis populated forXCTIssue-based attachmentstestAttachmentsCommandIncludesNonImageUTIsverifying UTI filter behavior for both commandstestAttachmentsHEIC,testDivideAttachmentsWithUTIFlags) are unaffected by the changeLink to Devin session: https://app.devin.ai/sessions/cb019655998643018b5729b16a10f5d2
Requested by: @davidbean-hash