fix: DisplayStage dependency and render pipeline data flow

Critical fix for display rendering:

1. DisplayStage Missing Dependency
   - DisplayStage had empty dependencies, causing it to execute before render
   - No data was reaching the display output
   - Fix: Add 'render.output' dependency so display comes after render stages
   - Now proper execution order: source → render → display

2. create_default_pipeline Missing Render Stage
   - Default pipeline only had source and display, no render stage between
   - Would fail validation with 'Missing render.output' capability
   - Fix: Add SourceItemsToBufferStage to convert items to text buffer
   - Now complete data flow: source → render → display

3. Updated Test Expectations
   - test_display_stage_dependencies now expects 'render.output' dependency

Result: Display backends (pygame, terminal, websocket) now receive proper
rendered text buffers and can display output correctly.

Tests: All 502 tests passing
This commit is contained in:
2026-03-16 21:59:52 -07:00
parent affafe810c
commit d54147cfb4
3 changed files with 10 additions and 4 deletions

View File

@@ -111,7 +111,7 @@ class DisplayStage(Stage):
@property
def dependencies(self) -> set[str]:
return set()
return {"render.output"} # Display needs rendered content
def init(self, ctx: PipelineContext) -> bool:
w = ctx.params.viewport_width if ctx.params else 80