Skip to content

feat: add local audio intake bootstrap#56

Merged
seonghobae merged 3 commits into
developfrom
feat/issue-33-audio-intake-bootstrap
Mar 12, 2026
Merged

feat: add local audio intake bootstrap#56
seonghobae merged 3 commits into
developfrom
feat/issue-33-audio-intake-bootstrap

Conversation

@seonghobae

Copy link
Copy Markdown
Collaborator

Summary

  • add a secure local-audio selection and project bootstrap flow that keeps source validation and bootstrap roots inside the Tauri boundary
  • expand shared contracts and Python validation so local_audio requests use a trusted projectId handoff while Rust rehydrates the stored source metadata before engine execution
  • document the reference-only bootstrap decision, app-owned Tauri path roots, and the rfd admission rationale for the native file picker

Verification

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

@coderabbitai

coderabbitai Bot commented Mar 12, 2026

Copy link
Copy Markdown
Contributor

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: e3ff3b14-b0eb-4de8-bcfd-03cde90da3a1

📥 Commits

Reviewing files that changed from the base of the PR and between fb2283c and 322f3be.

⛔ Files ignored due to path filters (5)
  • apps/desktop/src-tauri/Cargo.lock is excluded by !**/*.lock
  • apps/desktop/src-tauri/gen/schemas/acl-manifests.json is excluded by !**/gen/**
  • apps/desktop/src-tauri/gen/schemas/capabilities.json is excluded by !**/gen/**
  • apps/desktop/src-tauri/gen/schemas/desktop-schema.json is excluded by !**/gen/**
  • apps/desktop/src-tauri/gen/schemas/macOS-schema.json is excluded by !**/gen/**
📒 Files selected for processing (20)
  • ARCHITECTURE.md
  • apps/desktop/src-tauri/Cargo.toml
  • apps/desktop/src-tauri/build.rs
  • apps/desktop/src-tauri/capabilities/main.json
  • apps/desktop/src-tauri/permissions/autogenerated/select_local_audio_source.toml
  • apps/desktop/src-tauri/src/main.rs
  • apps/desktop/src/App.test.tsx
  • apps/desktop/src/App.tsx
  • apps/desktop/src/lib/analysis.ts
  • apps/desktop/src/locales/en/common.json
  • apps/desktop/src/locales/ko/common.json
  • docs/architecture/overview.md
  • docs/plans/2026-03-12-issue-33-audio-intake-bootstrap-design.md
  • docs/plans/2026-03-12-issue-33-audio-intake-bootstrap.md
  • docs/security/app-security.md
  • packages/shared-types/src/index.ts
  • packages/shared-types/test/index.test.ts
  • services/analysis-engine/src/bandscope_analysis/api.py
  • services/analysis-engine/tests/test_api.py
  • services/analysis-engine/tests/test_cli.py

Cache: Disabled due to Reviews > Disable Cache setting

Disabled knowledge base sources:

  • Linear integration is disabled

You can enable these sources in your CodeRabbit configuration.


📝 Walkthrough

Summary by CodeRabbit

  • 새로운 기능

    • 로컬 오디오 파일 선택을 통한 분석 지원(파일 선택 버튼·선택 파일 표시 포함).
    • 지원 포맷(WAV/MP3/FLAC/M4A) 자동 검증과 안전한 오류 메시지 제공.
    • 선택된 파일 기반의 프로젝트 부트스트랩(프로젝트 메타데이터 생성 및 관리).
  • 문서

    • 로컬 오디오 부트스트랩 설계 문서 및 보안 가이드 업데이트 추가.

Walkthrough

이 PR은 사용자가 데스크탑에서 로컬 오디오 파일을 선택해 Rust에서 검증·부트스트랩한 뒤, 해당 메타데이터를 통해 Python 분석을 시작하는 로컬 오디오 인테이크 및 프로젝트 부트스트랩 흐름을 추가합니다.

Changes

Cohort / File(s) Summary
Tauri 권한·명령·의존성
apps/desktop/src-tauri/Cargo.toml, apps/desktop/src-tauri/build.rs, apps/desktop/src-tauri/capabilities/main.json, apps/desktop/src-tauri/permissions/autogenerated/select_local_audio_source.toml
rfd 의존성 추가, select_local_audio_source 명령 등록 및 권한 항목·자동생성 권한 TOML 추가.
Tauri/Rust 런타임(부트스트랩)
apps/desktop/src-tauri/src/main.rs
파일 선택 대화상자, 로컬 오디오 검증·정규화, 프로젝트 ID 생성, 앱 소유 프로젝트/cache/temp 디렉토리 생성, 부트스트랩 요약 저장/조회, select_local_audio_source 명령 노출 등 구현.
프론트엔드 통합 (UI · 테스트)
apps/desktop/src/App.tsx, apps/desktop/src/App.test.tsx, apps/desktop/src/locales/en/common.json, apps/desktop/src/locales/ko/common.json
UI에 로컬 오디오 선택 버튼·선택 요약·오류 표출 추가, 관련 단위 테스트 추가, 영어·한국어 번역 키 4개 추가.
클라이언트 API · 타입
apps/desktop/src/lib/analysis.ts, packages/shared-types/src/index.ts, packages/shared-types/test/index.test.ts
공유 타입 확장: AnalysisSourceKind"local_audio" 추가, LocalAudioSource, ProjectBootstrapSummary 타입/파서/팩토리 추가. 클라이언트 selectLocalAudioSource() 구현 및 테스트 보강.
분석 엔진 (Python) 및 테스트
services/analysis-engine/src/bandscope_analysis/api.py, services/analysis-engine/tests/test_api.py, services/analysis-engine/tests/test_cli.py
AnalysisJobRequest에서 sourceKind"local_audio" 허용, projectId/localSource 스키마·검증 추가 및 관련 단위/CLI 테스트 추가.
문서·설계·보안 가이드
ARCHITECTURE.md, docs/architecture/overview.md, docs/plans/2026-03-12-issue-33-*.md, docs/security/app-security.md
로컬 오디오 부트스트랩 설계·계획 문서 추가 및 앱 소유 디렉토리와 참조 기반 부트스트랩 전략 명시.

Sequence Diagram(s)

sequenceDiagram
    participant User as 사용자
    participant React as React 프론트엔드
    participant Tauri as Tauri 브리지
    participant Rust as Rust 런타임
    participant FS as 파일시스템
    participant Python as Python 분석엔진

    User->>React: "로컬 오디오 선택" 클릭
    React->>Tauri: select_local_audio_source() 호출
    Tauri->>Rust: IPC 전달
    Rust->>FS: rfd 파일 대화상자 (allowlist)
    FS-->>Rust: 선택된 파일 경로 반환
    Rust->>Rust: 경로 정규화·확장자/크기 검증
    Rust->>Rust: project_id 생성 및 앱 소유 project/cache/temp 생성
    Rust->>Rust: ProjectBootstrapSummary 생성/저장
    Rust-->>Tauri: 부트스트랩 요약 반환
    Tauri-->>React: ProjectBootstrapSummary 전달
    React->>React: selectedBootstrap 상태 저장
    User->>React: "분석 시작" 클릭
    React->>Tauri: start_analysis_job() 호출 (projectId 포함)
    Tauri->>Python: HTTP/JSON 요청 전달
    Python->>Python: 요청 검증 (sourceKind="local_audio" 분기)
    Python->>Python: 분석 수행 및 상태 반환
    Python-->>Tauri: 결과/상태
    Tauri-->>React: 상태 업데이트
    React->>User: 결과 표시
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

Poem

🐰 내 발자국은 키보드 위에,
파일 한 개 골라 안전히 보관해,
Rust는 경로 세우고 Python은 귀 기울여,
분석의 당근이 반짝이네—
토끼의 박수로 부트스트랩 완료! 🎵🐇

✨ 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-33-audio-intake-bootstrap

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

@seonghobae

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@seonghobae seonghobae enabled auto-merge (squash) March 12, 2026 09:01
@coderabbitai

coderabbitai Bot commented Mar 12, 2026

Copy link
Copy Markdown
Contributor
✅ 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 seonghobae merged commit 1e40121 into develop Mar 12, 2026
37 of 38 checks passed
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