fix(cv): add Groq timeout, avoid caching fallback resumes for 24h, and clean skillSummary
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 25/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 停滞
- 技術スタック
- next.js, supabase, typescript
調査の方向性
Read src/lib/cv/cv-ai-generator.ts and src/app/api/cv/generate/route.ts, then inspect test/cv-ai-generator.test.ts. Trace the parallel Groq calls, fallback content, and cache write; add coverage for timeout handling, summary cleanup, empty language lists, and source tracking. Done means fallback resumes are not cached for 24 hours and the listed output and reliability cases are covered. A linked open pull request already addresses this issue.
索引モデルが issue の本文から書いたものです。
説明
Summary
The AI resume generator (src/lib/cv/cv-ai-generator.ts and src/app/api/cv/generate/route.ts) has several reliability and output-quality bugs when calling Groq:
- No request timeout on parallel Groq calls:
callGroqAPI()callsgroqChatCompletion()without anAbortSignal.timeout(...). SincegenerateResumeContent()runs 4 Groq requests in parallel (Promise.all), a single stalled Groq connection hangs the entire/api/cv/generaterequest instead of aborting and falling back cleanly. - Fallback resumes are cached for 24 hours on transient AI failures: When
GROQ_API_KEYis missing or all 4 Groq calls fail/time out,generateResumeContent()returns rule-based fallback content, and/api/cv/generateunconditionally caches it incv_generated_contentfor 24 hours (expires_at). A transient Groq outage/rate limit locks users into a template resume for 24 hours unless they manually regenerate (consuming their hourly quota). - Uncleaned / potentially empty
skillSummary:generateSkillSummary()returnsparsed.summarydirectly without trimming/cleaning or falling back whenparsed.summary.trim()is empty. - Broken sentence in
fallbackProfessionalSummary: WhencontributionScores.topLanguagesis empty,fallbackProfessionalSummary()ends with"Proficient in .".
Proposed Fix
- Add
AbortSignal.timeout(15_000)togroqChatCompletion()incallGroqAPI(). - Track whether AI generation succeeded (
source: "ai" | "fallback"onResumeContent) and skip the 24-hour Supabase cache in/api/cv/generatewhensource === "fallback". - Clean and validate
parsed.summaryingenerateSkillSummary(), falling back tofallbackSkillSummary()'s summary when empty. - Omit
"Proficient in ."infallbackProfessionalSummary()whentopLanguagesis empty. - Add unit tests in
test/cv-ai-generator.test.tscovering JSON parsing, hallucination-prevention validation, fallback behavior, timeout handling, andsourcetracking.
- 主要言語
- TypeScript
- スター
- 246
- フォーク
- 436
- 平均マージ
- 9時間 33分
- マージ済み PR(30日)
- 213
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
Priyanshu-byte-coder/devtrack のほかの issue
-
bug needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
Priyanshu-byte-coder/devtrack#4067 ·
メンテナーはふだん 1 日以内に返信
-
bug needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
Priyanshu-byte-coder/devtrack#4066 ·
メンテナーはふだん 1 日以内に返信
-
Webhook manager: replace the browser confirm() dialogs with ConfirmModal対応中かも @Nandaninaulaa が 4 日前に担当しました。 オープンgood first issue level 1 level:beginner status:assigned type:design
難易度 2/5 1〜3時間 初心者へのやさしさ 90/100
Priyanshu-byte-coder/devtrack#3889 · コメント 4 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
Goals form: square arcade buttons for recurrence, Create goal and Refresh対応中かも @KartikeyG-world が 4 日前に担当しました。 オープンgood first issue level 1 level:beginner status:assigned type:design
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
Priyanshu-byte-coder/devtrack#3877 · コメント 4 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
Goals: the error banner and the "No goals yet" hint show at the same time対応中かも @KartikeyG-world が 4 日前に担当しました。 オープンgood first issue level 1 level:beginner status:assigned type:bug
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
Priyanshu-byte-coder/devtrack#3872 · コメント 6 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
Priyanshu-byte-coder/devtrack の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
makecindy/cindy#15342 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
kwitsch/claude-code-plugin-tooling#219 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信
-
no-repo-link tool-submission
難易度 1/5 1時間未満 初心者へのやさしさ 74/100
BraveOPotato/NoSignups#2618 ·
-
enhancement good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100