Skip to content

Fix: Include failure summary attachments in extraction (issue #84)#26

Open
davidbean-hash wants to merge 1 commit into
masterfrom
devin/1779386080-fix-attachment-filter
Open

Fix: Include failure summary attachments in extraction (issue #84)#26
davidbean-hash wants to merge 1 commit into
masterfrom
devin/1779386080-fix-attachment-filter

Conversation

@davidbean-hash
Copy link
Copy Markdown
Owner

@davidbean-hash davidbean-hash commented May 21, 2026

Change Description:

Fixes ChargePoint/xcparse#84 — the xcparse attachments command was missing PNG screenshots and JSON data that were attached via XCTIssue.

Root cause: The extractAttachments method in XCPParser.swift only collected attachments from ActionTestActivitySummary objects (activity summaries). Attachments added through XCTIssue with XCTAttachment are stored on ActionTestFailureSummary objects (failure summaries), which were never iterated during extraction.

Changes:

  • Sources/xcparse/XCPParser.swift: Also collect attachments from testSummary.failureSummaries during extraction, applying the same attachmentFilter
  • Sources/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 to public.image and are accepted by the attachments command's default filter

This fix applies to both the attachments and screenshots commands since they share extractAttachments. The screenshots command's public.image UTI filter still correctly limits output to images; the attachments command's default accept-all filter now picks up every attachment regardless of where it's stored.

Test Plan/Testing Performed:

  • Reviewed the xcresult data model to confirm ActionTestFailureSummary.attachments is populated for XCTIssue-based attachments
  • Added unit test testAttachmentsCommandIncludesNonImageUTIs verifying UTI filter behavior for both commands
  • Verified existing tests (testAttachmentsHEIC, testDivideAttachmentsWithUTIFlags) are unaffected by the change
  • Note: Full integration tests require macOS with Xcode/xcresulttool

Link to Devin session: https://app.devin.ai/sessions/cb019655998643018b5729b16a10f5d2
Requested by: @davidbean-hash


Open in Devin Review

…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-integration
Copy link
Copy Markdown

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Copy link
Copy Markdown

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 3 additional findings.

Open in Devin Review

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.

[BUG] xcparse attachments does not include png/json attachments

1 participant