Conversation
…ery alignment - POST /api/jobs/parse and POST /api/cover-letter/draft with Writer graph - Dashboard: job parse, draft, embedding demo copy - GitHub embedding metadata source=github; user_assets OpenAI query_embeddings - Docs, tests, issue/week5.md summary Made-with: Cursor
…tatus, RAG fixes - Add week-issues/week5.md: PR title, summary, API list, dashboard tabs/encoding/badge sync, issue table, file checklist - Remove duplicate issue/week5.md (content consolidated under week-issues/) - Include Week 5 code: jobs/cover-letter, Writer graph, RAG/Chroma alignment, GitHub embedding-status API, dashboard updates Made-with: Cursor
…tters script Made-with: Cursor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Week 5 작업 정리
PR 제목 (예시)
Summary (PR 본문용)
POST /api/jobs/parse— SQLitejobs에 저장 후job_id반환 (manual / url).POST /api/cover-letter/draft— 세션 필수, 선택job_id로 공고 맥락 로드, LangGraph Writer 파이프라인.source: github,load_assets에서 구 문서 호환, 임베딩 공간 불일치 해결(OpenAI 임베딩으로query_embeddings검색).src/web/dashboard.py): Job parse UI, Writer Draft UI, 레포 카드 탭(파일 선택 / 파일 보기 / 커밋), 카드 단위 히스토리 동기화·임베딩, 경로 인코딩 이슈 대응, 페이지 로드 시 Chroma 임베딩 뱃지 동기화.GET /api/user/embedding-status— 선택 레포별 Chromauser_assets_{user_id}에repo메타 존재 여부로 embedded 여부 반환.API·백엔드
채용공고 저장 (parse)
POST /api/jobs/parse: SQLitejobs테이블에 공고 저장 후job_id반환.OPENAI_API_KEY가 있으면 구조화 보조.자소서 Draft (Writer)
POST /api/cover-letter/draft: GitHub 로그인 세션 필수. 선택job_id로jobs+job_parsed맥락 로드.retrieve_samples→load_assets→generate_draft→self_consistency→format_output.src/api/cover_letter.py,src/graphs/writer_graph/(노드, 엣지, 프롬프트).앱 등록
src/app/main.py에 jobs·cover letter 라우터 등록.GitHub 임베딩 상태 (신규)
GET /api/user/embedding-status(src/api/github.py)user_id필수.selected_repos목록의 각full_name에 대해 Chroma 컬렉션user_assets_{user_id}에서collection.get(where={"repo": {"$eq": full_name}}, limit=1)—ids가 있으면 embedded.{ "status": { "<owner/repo>": true | false, ... } }.GitHub 코드 임베딩·RAG
데모 흐름 (대시보드)
asset_hierarchy↔selected_repo_assets동기화, GitHub Contents API, (옵션) OpenAI 요약·임베딩, Chromauser_assets_{user_id}.docs/API_GitHub_Spec.md(임베딩 바디 등 실제 코드와 맞춤).버그 수정 (핵심)
source메타데이터GitHub 파이프라인
_normalize_metadata에source: github추가. Chromawhere필터와 스키마 정합.load_assets필터과거 문서에
source가 없을 수 있어retrieve_user_assets(..., source_filter=None)로 조회.임베딩 공간 불일치 (Draft 빈 응답 원인)
text-embedding-3-small.query_texts만 쓰면 컬렉션 기본 임베더(MiniLM 등)가 사용되어 차원·공간이 달라짐.OPENAI_API_KEY가 있을 때 STAR 쿼리를 동일OpenAIEmbedder로 임베딩한 뒤query_embeddings로 검색 (src/service/rag/user_assets.py).프론트·대시보드 (
src/web/dashboard.py)공통
job_id자동 채움), Cover letter Draft 패널, GitHub 임베딩 안내 문구.레포 카드 (임베딩 데모 그리드) — 상세
[파일 선택] [파일 보기] [커밋]—repoCardMap.activeTab(기본'files').sync-from-assets), 임베딩 (카드 단건: PUT assets → sync → POST embedding; 상단embedRef/include_summaries와 동일 규칙).selectedAssetKeys중code:경로만 드롭다운 — 선택 시GET .../contents?path=...&encoding=raw, 카드 내<pre>표시. 카드별ref는 비우면 쿼리 미전송(기본 브랜치).author(비우면 서버에서 로그인 유저),per_page(기본 10), 커밋 조회 — 상위 10건을sha(7) · message · date · files_changed형태로 표시.alert대신 카드 내 에러 영역에접근 실패: ...형식.경로 인코딩 (FastAPI
{repo_id:path}호환)encodeURIComponent(full_name)시owner/repo→owner%2Frepo가 되어 FastAPI가 path로 인식하지 못해 404 / fetch 실패.encodeURIComponent(full_name)대신full_name.replace(/ /g, '%20')만 적용(슬래시 유지).Query(
path,ref,author등)는 기존처럼encodeURIComponent유지.임베딩 뱃지 동기화 (페이지 새로고침)
loadMe()→loadSelectedReposUI()완료 후GET /api/user/embedding-status호출.status로embeddingStatusCache갱신 후renderAllRepoCards()재호출 → ✅/⬜ 뱃지가 Chroma 실제 상태와 일치.기타 (raw string)
dashboard.py는 Python raw string이라 JS 문자열 이스케이프 주의(줄바꿈 등).구현·이슈 해결 요약 (타임라인식)
%2F로 인코딩된 레포 경로full_name을encodeURIComponent→ 슬래시가%2F%20activeTab상태GET /api/user/embedding-status+ 캐시 + 재렌더\n\\nvs\n혼동.join('\n')정리의존성
pyproject.toml/poetry.lock: 예)httpx등 공고 URL fetch용.테스트
tests/api/test_cover_letter.py,tests/api/test_jobs_parse.pytests/service/rag/test_user_assets.py(OpenAI 쿼리 경로·기존 STAR 쿼리)tests/graphs/writer_graph/등 Writer 노드문서
docs/API_GitHub_Spec.md,docs/API_Service_Spec.md갱신.참고·후속
error가 있어도 HTTP 200에서 본문만 비는 경우가 있었음 → API 레이어에서 그래프error를 노출하는 개선은 후속 과제로 남길 수 있음.used_assets.github_repos는 응답 스키마 상 플레이스홀더에 가까움.GET /api/user/embedding-status에 대한 단위/API 테스트 추가는 선택 과제.변경 파일 참고 (PR 리뷰용 체크리스트)
src/api/github.py,src/api/jobs.py,src/api/cover_letter.py,src/service/rag/user_assets.py,src/service/rag/passed_samples.py, …src/graphs/writer_graph/node.py,prompts.py,state.py, …src/web/dashboard.pytests/api/,tests/service/rag/,tests/graphs/writer_graph/, …scripts/load_passed_cover_letters.py(정확한 diff는
git diff main...week5또는 PR Files changed 탭 참고.)