Skip to content

feat: add local analysis orchestration#52

Closed
seonghobae wants to merge 6 commits into
developfrom
feat/issue-32-analysis-orchestration-v4
Closed

feat: add local analysis orchestration#52
seonghobae wants to merge 6 commits into
developfrom
feat/issue-32-analysis-orchestration-v4

Conversation

@seonghobae
Copy link
Copy Markdown
Owner

Summary

  • add typed analysis job request and status contracts across shared types, the desktop shell, Tauri commands, and the Python engine CLI
  • expose a narrow allowlisted Tauri IPC boundary for starting and polling local analysis jobs without opening a loopback HTTP listener
  • harden the orchestration boundary with runtime engine discovery, strict schema validation, localized UI states, in-flight limiting, timeout handling, and pinned SBOM tooling

Verification

  • ./scripts/harness/quickcheck.sh
  • cargo check --manifest-path apps/desktop/src-tauri/Cargo.toml

@seonghobae
Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 12, 2026

Caution

Review failed

Pull request was closed or merged during review

📝 Walkthrough

Summary by CodeRabbit

새 기능

  • 분석 작업 시작 및 실시간 상태 추적 가능 (대기 중, 실행 중, 완료, 실패)
  • 분석 진행 상황에 따른 다국어 메시지 표시

문서화

  • 분석 오케스트레이션 설계 및 보안 아키텍처 문서 추가

Walkthrough

데스크톱 앱과 Python 분석 엔진 간의 분석 작업 오케스트레이션을 구현합니다. Tauri IPC 기반 두 개의 명령어(start_analysis_job, get_analysis_job_status)를 추가하고, 공유 타입, 브라우저 폴백을 포함한 분석 브릿지, Python CLI 진입점을 제공합니다. 추가로 SBOM 생성 및 보안 문서를 업데이트합니다.

Changes

Cohort / File(s) Summary
Workflow 및 빌드 구성
.github/workflows/sbom.yml, apps/desktop/src-tauri/build.rs, apps/desktop/src-tauri/Cargo.toml
SBOM 생성 워크플로우에서 Syft 직접 설치 및 호출로 변경. Tauri 빌드 스크립트에서 명령어 매니페스트 추가 및 직렬화 라이브러리 의존성 추가.
Tauri 보안 구성
apps/desktop/src-tauri/capabilities/main.json, apps/desktop/src-tauri/permissions/autogenerated/*, apps/desktop/src-tauri/tauri.conf.json
분석 작업 명령어 권한 및 메인 윈도우 기능 정의 TOML/JSON 파일 추가.
Tauri 백엔드 구현
apps/desktop/src-tauri/src/main.rs, apps/desktop/package.json
작업 큐, 상태 추적, Python 부프로세스 실행을 포함한 완전한 분석 작업 시스템 구현. 548줄 추가.
데스크톱 UI 및 테스트
apps/desktop/src/App.tsx, apps/desktop/src/App.test.tsx, apps/desktop/src/lib/analysis.ts
분석 작업 폴링, 상태 표시, 브라우저 폴백 구현 추가. 포괄적인 통합 테스트 추가.
번역 및 타입
apps/desktop/src/i18n/index.ts, apps/desktop/src/locales/*/common.json
분석 상태별 6개 새 영어/한국어 지역화 키 추가. 번역 함수 타입 안정성 개선.
공유 타입 및 검증
packages/shared-types/src/index.ts, packages/shared-types/test/index.test.ts
분석 작업 요청/상태/스냅샷 타입 및 검증 함수 추가. 재귀적 필드 검증 강화.
Python 분석 엔진 API
services/analysis-engine/src/bandscope_analysis/api.py, services/analysis-engine/tests/test_api.py
TypedDict 기반 페이로드 정의 및 작업 검증, 데모 생성, 실행 함수 추가.
Python CLI 진입점
services/analysis-engine/src/bandscope_analysis/cli.py, services/analysis-engine/tests/test_cli.py
stdin/stdout 기반 JSON 오케스트레이션 CLI 추가. 검증 및 오류 처리 테스트 포함.
문서
ARCHITECTURE.md, docs/architecture/overview.md, docs/security/app-security.md, docs/plans/2026-03-12-*
IPC 오케스트레이션 아키텍처 및 보안 고려사항 문서화. 구현 계획 및 설계 문서 추가.

Sequence Diagram(s)

sequenceDiagram
    participant User as 사용자
    participant UI as React App
    participant Tauri as Tauri IPC
    participant RustOrc as Rust Orchestrator
    participant Queue as Job Queue
    participant Python as Python CLI

    User->>UI: Start Analysis 클릭
    UI->>Tauri: start_analysis_job(request)
    Tauri->>RustOrc: 명령어 호출
    RustOrc->>RustOrc: 요청 검증
    RustOrc->>Queue: 상태: Queued
    RustOrc-->>Tauri: AnalysisJobStatus 반환
    Tauri-->>UI: 상태 업데이트
    
    UI->>UI: 폴링 시작 (ANALYSIS_POLL_INTERVAL_MS)
    
    loop 상태 확인
        UI->>Tauri: get_analysis_job_status(jobId)
        Tauri->>RustOrc: 상태 조회
        alt Running
            RustOrc->>Python: 부프로세스 실행 중
            RustOrc-->>Tauri: State: Running
        else Succeeded
            RustOrc-->>Tauri: State: Succeeded + Result
            Python-->>RustOrc: 데모 RehearsalSong 반환
        else Failed
            RustOrc-->>Tauri: State: Failed + Error
        end
        Tauri-->>UI: 상태/결과 반환
        UI->>UI: 결과 렌더링
    end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

  • PR #1: Tauri 데스크톱 스캐폴딩 및 CI SBOM 워크플로우 변경 (apps/desktop/src-tauri/build.rs, .github/workflows/sbom.yml) 공유.
  • PR #5: 동일한 GitHub Actions SBOM 워크플로우 파일 (.github/workflows/sbom.yml) 수정.
  • PR #37: 공유 리허설 데이터 모델 및 데스크톱 UI 렌더링/테스트 변경 (packages/shared-types, apps/desktop App/test).

Poem

🐰✨ 분석 작업이 이제 흐른다네,
Tauri 경계를 넘어 Python으로,
stdin/stdout 악수하며 평화로이,
큐에서 대기하고 결과를 기다리고,
폴링하며 춤을 추네, 완성될 때까지! 🎵

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 31.82% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed PR 제목이 주요 변경 사항인 로컬 분석 오케스트레이션 추가를 명확하고 간결하게 요약합니다.
Description check ✅ Passed PR 설명이 변경 사항과 관련이 있으며, 핵심 기능(분석 작업 계약, Tauri IPC 경계, 오케스트레이션 강화)을 언급합니다.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/issue-32-analysis-orchestration-v4

Comment @coderabbitai help to get the list of available commands and usage tips.

@seonghobae seonghobae enabled auto-merge (squash) March 12, 2026 05:05
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 12, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@seonghobae
Copy link
Copy Markdown
Owner Author

Superseded by #53 to clear repeated stale check and CodeRabbit states after green verification on the refreshed branch.

@seonghobae seonghobae closed this Mar 12, 2026
auto-merge was automatically disabled March 12, 2026 05:24

Pull request was closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant