fix: wire video_presentation fan-in as a barrier so generate_slide_scene_codes fires once#1538
Conversation
…ene_codes fires once
|
@mvanhorn is attempting to deploy a commit to the Rohan Verma's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe PR fixes a latent double-execution bug in the video presentation LangGraph agent: two independent ChangesVideo Presentation Graph Barrier Fix
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@mvanhorn Can you reopen this on |
|
Reopened against |
The video-presentation agent graph now uses a LangGraph list-based fan-in edge so the slide-generation node runs once after all upstream nodes complete, instead of once per incoming edge.
Description
The presentation node was wired to multiple upstream nodes with separate edges, so LangGraph triggered it once per completed predecessor rather than as a single join, producing duplicate slide-generation passes. This switches those edges to a list-based fan-in edge, which creates a proper barrier so the node runs exactly once.
Motivation and Context
Fixes #1531
Screenshots
N/A — backend agent-graph change with no visual surface.
API Changes
Change Type
Testing Performed
Added unit tests under
surfsense_backend/tests/unit/agents/that drive the graph and assert the fan-in node is triggered exactly once.Checklist
High-level PR Summary
This PR fixes a bug in the video presentation agent graph where the slide scene generation node was being triggered multiple times instead of once. The fix replaces two separate edges with a single list-based fan-in edge that creates a proper barrier, ensuring
generate_slide_scene_codesruns exactly once after bothcreate_slide_audioandassign_slide_themescomplete. Unit tests were added to verify the barrier behavior and confirm the node is triggered only once.⏱️ Estimated Review Time: 15-30 minutes
💡 Review Order Suggestion
surfsense_backend/app/agents/video_presentation/graph.pysurfsense_backend/tests/unit/agents/test_video_presentation_graph.pySummary by CodeRabbit
Bug Fixes
Tests