fix(marketing): release and spotlight drafts carry their source project

draft_release_post / draft_release_video accept a project_id and the
release-proposal approve hooks pass the proposal task's own project;
the spotlight companion video forwards the spotlight draft's project
into open_video_task — previously it always authored against the
deployment-anchor project's motion/ tree regardless of which project
the spotlight was about. Omitted project_id keeps the anchor-project
fallback, so single-project deployments are unchanged.
This commit is contained in:
Renn F
2026-07-18 16:48:45 +02:00
parent fecb021eef
commit b0dcb03356
7 changed files with 42 additions and 15 deletions
@@ -147,7 +147,7 @@ async def test_publish_success_calls_video_engine_draft_seam(
assert result is not None
assert result.status == "published"
fake_video_engine.draft_release_video.assert_awaited_once_with(
version=_VERSION, changelog=_CHANGELOG
version=_VERSION, changelog=_CHANGELOG, project_id=task.project_id
)
@@ -139,7 +139,9 @@ async def test_publish_success_calls_x_engine_draft_seam(
assert result is not None
assert result.status == "published"
fake_engine.draft_release_post.assert_awaited_once_with(
version=_VERSION, highlights=["feat: a thing", "fix: another thing"]
version=_VERSION,
highlights=["feat: a thing", "fix: another thing"],
project_id=task.project_id,
)
@@ -584,6 +584,9 @@ async def test_approve_feature_spotlight_with_video_opens_video_task(
assert kwargs["platforms"] == ["x", "tiktok"]
assert kwargs["script"] == "Custom voiceover script"
assert kwargs["brief"] == "Organizational Memory Loop: Draft body"
# The spotlight's own project scopes the video authoring — without it the
# video authored against the deployment-anchor project regardless.
assert kwargs["project_id"] == task.project_id
@pytest.mark.asyncio