Skip to content

Fix Prime Video platform dedupe#9

Merged
120318 merged 7 commits into
mainfrom
fix/prime-platform-dedupe
May 31, 2026
Merged

Fix Prime Video platform dedupe#9
120318 merged 7 commits into
mainfrom
fix/prime-platform-dedupe

Conversation

@120318

@120318 120318 commented May 30, 2026

Copy link
Copy Markdown
Owner

Summary

  • Normalize Prime Video and Amazon Prime Video watch-provider variants to one platform key.
  • Make MediaScheduleSummary.platforms the single schedule platform contract exposed across services and APIs.
  • Keep source-specific networks and online_platforms on media/profile storage models only, not on schedule summaries or overview schedule consumers.
  • Update media detail overview rendering to consume only schedule.platforms.
  • Preserve TV network vs online platform roles when building airings/scopes, and keep Amazon Video distinct from Prime Video.

Testing

  • ./aethera.sh test-backend tests/test_media_context_resolution.py
  • ./aethera.sh test-backend tests/test_media_detail_overview.py tests/test_media_context_resolution.py
  • ./scripts/docker_compose.sh run --rm --no-deps frontend npm run quality
  • ./scripts/check_quality.sh

Notes

  • Static scan found no remaining summary.networks, summary.online_platforms, schedule.networks, or schedule.online_platforms consumers in backend service/frontend schedule paths.
  • Review fixes after the initial PR commit are pushed as incremental commits rather than amended commits.

@120318 120318 force-pushed the fix/prime-platform-dedupe branch 2 times, most recently from 12bc695 to f9cb4ea Compare May 30, 2026 17:25

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f9cb4ea227

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread backend/app/services/domain/media/profile/schedule_snapshot.py
Comment thread backend/app/services/domain/media/schedule/platforms.py Outdated
@120318 120318 force-pushed the fix/prime-platform-dedupe branch from f9cb4ea to 4dbdc02 Compare May 30, 2026 17:46

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4dbdc02d28

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread backend/app/services/domain/media/schedule/service.py Outdated
Comment thread backend/app/services/domain/media/profile/scope_projection.py Outdated
Comment thread backend/app/services/domain/media/schedule/platforms.py Outdated

@120318 120318 left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Follow-up pushed in 1504be2.

This removes source-specific networks and online_platforms from MediaFullInfo. The aggregate now exposes schedule platform data through schedule.platforms only, while profile/scope storage keeps its source-specific fields internally. Scope/profile projection now derives network roles from TV airings and online roles from schedule platforms without reintroducing those source fields on the public aggregate.

Validation:

  • ./aethera.sh test-backend tests/test_media_context_resolution.py tests/test_media_profile_service_simple_info.py tests/test_media_detail_overview.py tests/test_media_provider_service_tmdb_source.py tests/test_media_provider_service_tmdb_override.py tests/test_media_source_canonical.py
  • ./scripts/check_quality.sh

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1504be2276

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread backend/app/services/domain/media/profile/scope_projection.py Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 914dfc58f7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread backend/app/services/domain/media/schedule/service.py

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ba2832467e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread backend/app/services/domain/media/profile/builders.py
Comment thread backend/app/services/application/views/media_detail_overview/schedule.py Outdated
@120318

120318 commented May 31, 2026

Copy link
Copy Markdown
Owner Author

@codex 看看

@chatgpt-codex-connector

Copy link
Copy Markdown

Summary

  • 已提交新提交 f04b47fPreserve source TV network roles in scopes),并创建 PR:Preserve TV network roles in scope projection
  • 在 TV scope 投影里新增对 MediaFullInfo._source_networks 的显式消费:即使当前季没有 episode airing,也会把明确的源电视网写成 network 角色,并用这些 network key 从合并后的 schedule.platforms 中排除,避免电视网被误写成 online。
  • 调整 apply_scopes_to_profile() 的 online 回填条件:仅有 network / airing 角色的平台即使带 display_url,也不会被回填进 online_platforms
  • 增加回归测试,覆盖“无 airings 但存在 _source_networks 时正确拆分 TV network/online 角色”和“network display URL 不应导致 online 回填”两个场景。

Testing

  • python -m py_compile backend/app/services/domain/media/profile/scope_projection.py backend/tests/test_media_context_resolution.py
  • ⚠️ ./aethera.sh test-backend tests/test_media_context_resolution.py(当前 runner 无 Docker / /var/run/docker.sock,且 docker 命令不存在)
  • ⚠️ ./scripts/check_quality.sh(当前 runner 无 Docker / /var/run/docker.sock,且 docker 命令不存在)
  • ⚠️ ./scripts/review_with_gates.sh(当前 runner 无 Docker / /var/run/docker.sock,且 docker 命令不存在)

View task →

@120318 120318 left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🚀

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@120318 120318 merged commit 9f35ba4 into main May 31, 2026
1 check passed
@120318 120318 deleted the fix/prime-platform-dedupe branch May 31, 2026 03:13
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