Skip to content

SUP-52393: Prevent automatic caption requests after manual CaptionAss… - #14095

Merged
AlaaSaf12 merged 3 commits into
West-23.5.0from
West-23.4.0-SUP-52393
Aug 3, 2026
Merged

SUP-52393: Prevent automatic caption requests after manual CaptionAss…#14095
AlaaSaf12 merged 3 commits into
West-23.5.0from
West-23.4.0-SUP-52393

Conversation

@AlaaSaf12

@AlaaSaf12 AlaaSaf12 commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

…et uploads

Pull Request Checklist

Please complete the following before submitting:

General notes -

  • I have tested the changes locally.
  • I have written unit tests where applicable.
  • I have updated documentation where needed.
  • I have added comments to complex code.
  • This PR follows the coding style guidelines.
  • I have updated release notes with new feature

New Kaltura Types

  • I have created new clients
  • I have notified related apps - KMCNG / KMS / EP .... about new clients

New Kaltura Services / Actions

  • I have added a deployment script

Questions

  1. What is the purpose of this PR?

    • Enter your answer here
  2. Does this change affect production code or infrastructure?

    • Yes
    • No
  3. If yes, what is the rollback plan?

    • Enter your answer here

@AlaaSaf12
AlaaSaf12 requested a review from shahbaa123 July 29, 2026 14:30
@github-actions

Copy link
Copy Markdown

@github-copilot suggest

@shahbaa123

Copy link
Copy Markdown
Collaborator

🤖 AI PR Review

🚦 Verdict: 🟢 SAFE

Minimal, correctly placed guard that short-circuits the automatic caption vendor-task pipeline when the triggering object is already a CaptionAsset, with no signature changes, no refactoring, and no sibling duplicates found.


📌 Context Summary & Code Archaeology

Objective: Prevent the Reach (AI/vendor caption) plugin from automatically creating a new caption request when the event that fires the rule is a CaptionAsset upload itself. Without this guard, uploading a manual caption asset triggers the same automatic-rule pipeline that schedules machine captioning, creating an unwanted duplicate task.

Code path: objectAdded (line 419) and objectChanged (line 518) both route a CaptionAsset object into checkAutomaticRules or consumeEvent, both of which eventually call addingEntryVendorTaskByObjectIdsshouldSkipAutoRule. The new guard is inserted at the earliest evaluation point in shouldSkipAutoRule, ahead of the existing BlockAutoTranscript checks, so it fires on every code path without any duplication.

Legacy intent check: The existing BlockAutoTranscript block that follows the new guard is a separate, orthogonal opt-out mechanism for entries. The new block does not interfere with it — it is strictly additive and returns early only for the specific CaptionAsset + CAPTIONS case.


📋 Actionable Feedback

No issues found. Good to merge.

Comment thread plugins/reach/lib/kReachManager.php Outdated
@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown

@github-copilot suggest

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown

@github-copilot suggest

@AlaaSaf12
AlaaSaf12 changed the base branch from West-23.4.0 to West-23.5.0 August 3, 2026 08:41
@AlaaSaf12
AlaaSaf12 merged commit 7ec14c5 into West-23.5.0 Aug 3, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants