refactor(cleanup): Remove 4,500 lines of dead code (Phase 1 legacy cleanup)

- Delete engine/emitters.py (25 lines, unused Protocol definitions)
- Delete engine/beautiful_mermaid.py (4,107 lines, unused Mermaid ASCII renderer)
- Delete engine/pipeline_viz.py (364 lines, unused visualization module)
- Delete tests/test_emitters.py (orphaned test file)
- Remove introspect_pipeline_viz() method and references from engine/pipeline.py
- Add comprehensive legacy code analysis documentation in docs/

Phase 1 of legacy code cleanup: 0 risk, 100% safe to remove.
All tests pass (521 passing tests, 9 fewer due to test_emitters.py removal).
No regressions or breaking changes.
This commit is contained in:
2026-03-16 20:33:04 -07:00
parent 28203bac4b
commit 5762d5e845
8 changed files with 678 additions and 4590 deletions

View File

@@ -112,8 +112,6 @@ class PipelineIntrospector:
subgraph_groups["Async"].append(node_entry)
elif "Animation" in node.name or "Preset" in node.name:
subgraph_groups["Animation"].append(node_entry)
elif "pipeline_viz" in node.module or "CameraLarge" in node.name:
subgraph_groups["Viz"].append(node_entry)
else:
other_nodes.append(node_entry)
@@ -424,28 +422,6 @@ class PipelineIntrospector:
)
)
def introspect_pipeline_viz(self) -> None:
"""Introspect pipeline visualization."""
self.add_node(
PipelineNode(
name="generate_large_network_viewport",
module="engine.pipeline_viz",
func_name="generate_large_network_viewport",
description="Large animated network visualization",
inputs=["viewport_w", "viewport_h", "frame"],
outputs=["buffer"],
)
)
self.add_node(
PipelineNode(
name="CameraLarge",
module="engine.pipeline_viz",
class_name="CameraLarge",
description="Large grid camera (trace mode)",
)
)
def introspect_camera(self) -> None:
"""Introspect camera system."""
self.add_node(
@@ -585,7 +561,6 @@ class PipelineIntrospector:
self.introspect_async_sources()
self.introspect_eventbus()
self.introspect_animation()
self.introspect_pipeline_viz()
return self.generate_full_diagram()