Skip to content

fix(artifacts): Report error for unknown artifact types in distribution#567

Open
runningcode wants to merge 2 commits intomainfrom
no/eme-422-update-artifact-error-unknown-type
Open

fix(artifacts): Report error for unknown artifact types in distribution#567
runningcode wants to merge 2 commits intomainfrom
no/eme-422-update-artifact-error-unknown-type

Conversation

@runningcode
Copy link
Contributor

When _do_distribution() encounters an unknown artifact type, it only logged
an error but never reported the failure back to Sentry via
_update_artifact_error(). This left the artifact in an inconsistent state
where distribution was requested but silently failed.

Now calls _update_artifact_error() with ARTIFACT_PROCESSING_ERROR /
UNSUPPORTED_ARTIFACT_TYPE so the failure is surfaced to users.

Fixes EME-422

…on (EME-422)

Replace the TODO in _do_distribution() with a call to
_update_artifact_error() so that unsupported artifact types are properly
reported back to Sentry instead of silently failing.
@linear
Copy link

linear bot commented Feb 23, 2026

@runningcode runningcode requested a review from chromy February 23, 2026 09:34
@runningcode runningcode marked this pull request as ready for review February 23, 2026 09:34
When a ZippedXCArchive has an invalid code signature or is a simulator
build, _do_distribution now reports the specific error via
_update_artifact_error instead of silently doing nothing.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link

@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.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

artifact_id,
ProcessingErrorCode.ARTIFACT_PROCESSING_ERROR,
ProcessingErrorMessage.UNSUPPORTED_ARTIFACT_TYPE,
)
Copy link

Choose a reason for hiding this comment

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

Distribution sets global artifact error state

Medium Severity

_do_distribution() now calls _update_artifact_error() for simulator builds, invalid signatures, and unknown types, which updates the artifact’s global error_code/error_message. If other requested features (e.g. size analysis) succeeded, this can overwrite a successful artifact state with a distribution-only failure, potentially misreporting overall processing status.

Fix in Cursor Fix in Web

logger.info(f"BUILD_DISTRIBUTION for {artifact_id} (project: {project_id}, org: {organization_id})")
if isinstance(artifact, ZippedXCArchive):
apple_info = cast(AppleAppInfo, info)
if apple_info.is_code_signature_valid and not apple_info.is_simulator:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

cursorbot said that if a ZippedXCArchive has an invalid code signature or simulator build, it silently does nothing so this addresses that.

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.

1 participant