fix(cv): add Groq timeout, avoid caching fallback resumes for 24h, and clean skillSummary
Maintainers usually reply within 1 day
@SiddheshCodes4554 is already working on this.
Since Dec 3, 2026.
- #4046 by @SiddheshCodes4554 — open
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- next.js, supabase, typescript
Research direction
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.
Written by the indexing model from the issue text.
Description
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.
- Dominant language
- TypeScript
- Stars
- 246
- Forks
- 436
- Avg merge
- 9h 33m
- Merged PRs (30d)
- 213
Getting set up
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Priyanshu-byte-coder/devtrack
-
bug needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Priyanshu-byte-coder/devtrack#4067 ·
Maintainers usually reply within 1 day
-
bug needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
Priyanshu-byte-coder/devtrack#4066 ·
Maintainers usually reply within 1 day
-
Webhook manager: replace the browser confirm() dialogs with ConfirmModalPossibly taken @Nandaninaulaa claimed this 5 days ago. Opengood first issue level 1 level:beginner status:assigned type:design
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
Priyanshu-byte-coder/devtrack#3889 · 4 comments · 1 assignee ·
Maintainers usually reply within 1 day
-
Goals form: square arcade buttons for recurrence, Create goal and RefreshPossibly taken @KartikeyG-world claimed this 5 days ago. Opengood first issue level 1 level:beginner status:assigned type:design
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
Priyanshu-byte-coder/devtrack#3877 · 4 comments · 1 assignee ·
Maintainers usually reply within 1 day
-
Goals: the error banner and the "No goals yet" hint show at the same timePossibly taken @KartikeyG-world claimed this 5 days ago. Opengood first issue level 1 level:beginner status:assigned type:bug
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
Priyanshu-byte-coder/devtrack#3872 · 6 comments · 1 assignee ·
Maintainers usually reply within 1 day
All issues in Priyanshu-byte-coder/devtrack
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
callstackincubator/simlock#2113 ·
Maintainers usually reply within 1 day
-
BUG: Backend Docker build fails due to Go version mismatchPossibly taken @Aakriti0207 claimed this today. Open
Difficulty 1/5 Under an hour Newbie friendliness 93/100
gittuf/visualizer#203 ·
Maintainers usually reply within 2 days
-
bug 🐛
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
bug P2
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
BaaRai/ARTEX#981 · 2 comments · 1 reaction ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day