Skip to content

RDKEMW-15080: Log subtitle content when enabled - #699

Draft
naveendude15 wants to merge 1 commit into
masterfrom
feature/RDKEMW-15080_env
Draft

naveendude15 wants to merge 1 commit into
masterfrom
feature/RDKEMW-15080_env

Conversation

@naveendude15

@naveendude15 naveendude15 commented Nov 4, 2026 •

Copy link
Copy Markdown

RDKEMW-15080: Log subtitle content when enabled

Reason for change: Add configurable capture of subtitle payloads for diagnosis. A configured RIALTO_SUBTITLE_LOG_PATH writes them to a separate file; otherwise RIALTO_SHOW_SUBTITLE_DATA enables the normal Rialto DEBUG log.

Test Procedure: https://ccp.sys.comcast.net/browse/RDKEMW-15080

@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown

Pull request title must follow the pattern:
< JIRA TICKET >: < one line summary of change less than 65 characters >

Pull request description must follow the Commit message format for RDK-E:
https://etwiki.sys.comcast.net/spaces/RDKAR/pages/1407997180/Commit+Message+Format+For+RDKE

  1. Associated JIRA ticket in format : < JIRA TICKET >: < one line summary of change less than 65 characters >
  2. Detailed reason for change information
  3. Test procedure. Only references links to Jira ticket or sub tickets where test steps and references are captured.

< JIRA TICKET >: < one line summary of change less than 65 characters >
< empty line >
Reason for change:
Test Procedure: < https://ccp.sys.comcast.net/browse/JIRA TICKET/url/to/test_step_section>

@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown

Coverage statistics of your commit:
Lines coverage stays unchanged and is: 84.3%
Functions coverage stays unchanged and is: 92.7%

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Both text-track logging paths silently truncate larger TTML/WebVTT payloads and need full-payload handling with tests confirming that payload tails are preserved.

1 open issue
What changed in this PR

Adds configurable subtitle payload capture to the media server’s text-track handling for diagnosis.

Changes:

  • Writes payloads to RIALTO_SUBTITLE_LOG_PATH when configured.
  • Enables normal DEBUG logging through RIALTO_SHOW_SUBTITLE_DATA, with DEBUG fallback when file writing fails.
  • Adds tests for logging configuration, file output, and write-failure fallback.
File Description
tests/​unittests/​media/​server/​main/​textTrackAccessor/​TextTrackAccessorTest.cpp Adds logging capture, environment cleanup, and subtitle-output tests.
media/​server/​main/​source/​TextTrackAccessor.cpp Adds environment-controlled subtitle logging and synchronized file output.

Review effort: Balanced

@naveendude15
naveendude15 force-pushed the feature/RDKEMW-15080_env branch 2 times, most recently from 4956c89 to c35f6bf Compare November 4, 2026 15:12
@naveendude15
naveendude15 requested a balanced review from Copilot November 4, 2026 15:19

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Subtitle capture ignores the documented path variable and silently truncates long payloads in both DEBUG and file-error fallback logging, while successful file output remains untested.

4 open issues

Review effort: Balanced

@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown

Coverage statistics of your commit:
Lines coverage stays unchanged and is: 84.3%
Functions coverage stays unchanged and is: 92.7%

@naveendude15
naveendude15 force-pushed the feature/RDKEMW-15080_env branch 3 times, most recently from 6cfb3f7 to 9d05076 Compare November 4, 2026 20:19
@naveendude15
naveendude15 requested a balanced review from Copilot November 4, 2026 20:46

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Opening a pre-existing FIFO can block indefinitely while holding the logging mutex, stalling subtitle delivery and other file-logging calls.

3 open issues
3 resolved since last review

Review effort: Balanced

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Hard-linked targets can bypass the directory restriction, embedded NULs truncate logged payloads, and the FIFO test fails to detect blocking regressions.

3 open issues
3 resolved since last review

Review effort: Balanced

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

File-output failures bypass the normal-log capture opt-in, and DEBUG-log assertions fail in the default Release configuration because DEBUG calls are compiled out.

2 open issues
3 resolved since last review

Review effort: Balanced

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Subtitle logging still escapes the full payload and allocates chunks when DEBUG output is disabled, adding unnecessary work to synchronous sendData calls.

1 open issue
2 resolved since last review

Review effort: Balanced

@naveendude15
naveendude15 force-pushed the feature/RDKEMW-15080_env branch from 603f08a to e0e0eac Compare November 5, 2026 04:52
@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown

media/server/main/source/TextTrackAccessor.cpp:94:9: style: Condition '!isSubtitleDebugLoggingEnabled()' is always true [knownConditionTrueFalse]
if (!isSubtitleDebugLoggingEnabled())
^
media/server/main/source/TextTrackAccessor.cpp:94:39: note: Calling function 'isSubtitleDebugLoggingEnabled' returns 0
if (!isSubtitleDebugLoggingEnabled())
^
media/server/main/source/TextTrackAccessor.cpp:94:9: note: Condition '!isSubtitleDebugLoggingEnabled()' is always true
if (!isSubtitleDebugLoggingEnabled())
^
nofile:0:0: information: Active checkers: 161/592 (use --checkers-report= to see details) [checkersReport]

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

A critical ownership-validation gap allows another user to pre-create an accepted file in /tmp and control captured diagnostics when kernel-level protected_regular enforcement is absent.

1 open issue
1 resolved since last review

Review effort: Balanced

@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown

Coverage statistics of your commit:
Lines coverage stays unchanged and is: 84.3%
Functions coverage stays unchanged and is: 92.7%

@naveendude15
naveendude15 force-pushed the feature/RDKEMW-15080_env branch from e0e0eac to d991657 Compare November 5, 2026 06:26
@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown

media/server/main/source/TextTrackAccessor.cpp:94:9: style: Condition '!isSubtitleDebugLoggingEnabled()' is always true [knownConditionTrueFalse]
if (!isSubtitleDebugLoggingEnabled())
^
media/server/main/source/TextTrackAccessor.cpp:94:39: note: Calling function 'isSubtitleDebugLoggingEnabled' returns 0
if (!isSubtitleDebugLoggingEnabled())
^
media/server/main/source/TextTrackAccessor.cpp:94:9: note: Condition '!isSubtitleDebugLoggingEnabled()' is always true
if (!isSubtitleDebugLoggingEnabled())
^
nofile:0:0: information: Active checkers: 161/592 (use --checkers-report= to see details) [checkersReport]

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues block approval of the configurable subtitle payload logging change.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown

Coverage statistics of your commit:
Lines coverage stays unchanged and is: 84.3%
Functions coverage stays unchanged and is: 92.7%

Reason for change:

Add configurable capture of subtitle payloads passed to Rialto. When a dedicated path is supplied, payloads are appended there; without a path, RIALTO_SHOW_SUBTITLE_DATA controls whether they are included in Rialto DEBUG logs. This helps diagnose subtitle delivery while allowing content to be kept out of the general log stream.

Test Procedure: https://ccp.sys.comcast.net/browse/RDKEMW-15080
@naveendude15
naveendude15 force-pushed the feature/RDKEMW-15080_env branch from d991657 to 2ea0ea4 Compare November 5, 2026 07:19
@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown

Coverage statistics of your commit:
Lines coverage stays unchanged and is: 84.3%
Functions coverage stays unchanged and is: 92.7%

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues were identified for the configurable subtitle payload logging change.

No open issues 🎉

Review effort: Balanced

This branch has not been deployed

No deployments
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.

3 participants