Backend — orchestration - xxriny/KNU-PROJECT GitHub Wiki

1. backend/orchestration/init.py

라인 코드 설명
(빈 파일) 패키지 초기화

2. backend/orchestration/pipeline_runner.py

라인 코드 설명
23 validate_analysis_inputs() 입력 매개변수(api_key, model 등) 검증
33 build_reverse_context() AST 스캔 결과 → 프로젝트 컨텍스트 변환
49 analysis_pipeline_type() action_type 기반 파이프라인 타입 결정
57–114 _run_pipeline_base() 공통 파이프라인 실행 로직(state 초기화, invoke, 결과 수집)
115–168 run_analysis() 분석 파이프라인 WS 진입점 — state 초기화 → 파이프라인 실행 → 결과 반환
169–191 run_revision() 수정 파이프라인 실행
192–212 run_idea_chat() 아이디어 채팅 노드 단독 실행
213–330 stream_pipeline_updates() 비동기 제너레이터 — 각 노드 완료 시 WS 스트리밍, _emit_thinking(), _merge_state() 헬퍼

3. backend/orchestration/executor.py

라인 코드 설명
9–13 PipelineResult @dataclass — 파이프라인 결과 컨테이너
18–33 execute_pipeline() REST 동기 호출용 — 파이프라인 invoke → shape_result() 통합