Repository navigation
fix: complete alt-text job as skipped when attachment was deleted before it ran - #3639
Merged
Merged
Conversation
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.
Summary
AltTextTask now distinguishes a deleted/trashed attachment from a genuinely non-image attachment at execution time. A missing, non-attachment, or trashed post completes the child job as skipped with reason 'attachment_deleted' instead of failing, which SystemTaskStep already propagates as success so the parent Alt Text Generation job no longer fails with packet_failure. A real non-image attachment (e.g. explicitly targeted via force or a manual ability call) still fails clearly. Covered by new PHPUnit tests for the skip path, the trash path, the genuine-failure path, and parent-step status on both skipped and failed children.
What changed
How to test
homeboy review test data-machine; expect passes as recorded by Cook's deterministic gate.Compatibility
Backward compatible. No schema, API, or settings changes. The only behavioral change is that jobs for attachments deleted between queue time and execution now complete as skipped (reason 'attachment_deleted') instead of failing; genuine non-image targets keep the existing failure message. SystemTaskStep's existing skipped-child handling is reused unchanged. CHANGELOG and versions untouched (release-owned).
Evidence
homeboy review test data-machine: status=succeeded; candidate commit399c1903d20c4d8fa571370e1cf1028f65594546, tree96b9473d8b26fe8ffcf1febc8704b57e34809f2d, fingerprint2005829969828b46f63f20c47119638bc67a97c76dbc20384f1310b25c3ee20d; durable gategate-1AI assistance