Skip to content

fix: public profile not found, resume analysis 502, AI model errors, leaderboard rate limits - #3530

Merged
Priyanshu-byte-coder merged 1 commit into
mainfrom
fix/profile-and-resume
Oct 15, 2026
Merged

Priyanshu-byte-coder merged 1 commit into
mainfrom
fix/profile-and-resume

Conversation

@Priyanshu-byte-coder

Copy link
Copy Markdown
Owner

Fixes the errors reported after the schema migration, found in production logs.

  • Public profile "Profile Not Found": the canonical-username redirect() ran inside a try/catch. redirect() throws by design, so every mixed-case link (/u/Priyanshu-byte-coder) fell into the catch. Lowercase URLs already worked.

  • Resume generation error: /api/cv/analyze requested 50 repos with per-commit diff stats in one GraphQL query, and GitHub returns 502 past its ~10s budget. Measured against GitHub:

    query result
    10 repos with commit stats 502
    5 repos with commit stats 9.6s
    10 repos without commit stats 6.2s

    Repos are now paged 10 at a time, and line totals come from merged PRs.

  • AI features failing (personality, AI insights, resume wording, project tutor): Groq returned model_not_found for llama-3.3-70b-versatile on the production key. Project tutor still used the long-retired llama3-8b-8192. The new src/lib/groq.ts:

    • honors GROQ_MODEL;
    • falls back through available models;
    • remembers the one that works.
  • Leaderboard rate-limited: each user's streak paged up to 10 commit searches. Stats now come from GitHub contribution data via GraphQL (at most 2 requests per user, using their stored token).

  • SSE /api/stream: connections now end at 4 min instead of being killed at the 300s function limit, which logged an error for every connection.

Tests: 2488 pass (jira-credentials is an existing timing flake that passes when run alone); added tests for the Groq fallback.

…leaderboard rate limits

- Public profile: the canonical-username redirect ran inside a try/catch.
  redirect() works by throwing, so the catch turned every mixed-case
  profile link (e.g. /u/Priyanshu-byte-coder) into "Profile Not Found".
  The page already redirects correctly after loading.
- Resume: the contribution query asked for 50 repositories with per-commit
  diff stats in one request; GitHub answers 502 past its ~10s budget.
  Repositories are now paged 10 at a time and commits carry no diff stats
  (line totals come from merged pull requests).
- AI features: Groq returned model_not_found for llama-3.3-70b-versatile
  on the production key, so personality, AI insights, resume wording and
  project tutor all failed (project tutor still used the long-retired
  llama3-8b-8192). A shared helper tries GROQ_MODEL, then falls back
  through available models and remembers the one that works.
- Leaderboard: per-user stats paged up to 10 commit searches for streaks
  and hit GitHub's secondary rate limit. Stats now come from contribution
  data via GraphQL (streak from the contribution calendar, as on GitHub
  profiles), using each user's stored token.
- SSE stream: connections now end at 4 minutes instead of being killed at
  the 300s function limit, which logged an error per connection.
@github-actions github-actions Bot added type:bug GSSoC type bonus: bug fix type:testing GSSoC type bonus: tests (+10 pts) labels Oct 15, 2026
@github-actions github-actions Bot added type:feature GSSoC type bonus: new feature type:performance GSSoC type bonus: performance (+15 pts) labels Oct 15, 2026
@Priyanshu-byte-coder
Priyanshu-byte-coder merged commit 5769540 into main Oct 15, 2026
18 checks passed
@Priyanshu-byte-coder
Priyanshu-byte-coder deleted the fix/profile-and-resume branch October 15, 2026 17:31
@github-actions

Copy link
Copy Markdown

🎉 Merged! Thanks for contributing to DevTrack.

If the project has been useful to you, a ⭐ star on the repo is the easiest way to support it — it helps DevTrack get discovered by more developers.

Keep an eye on open issues for your next contribution!

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

Labels

type:bug GSSoC type bonus: bug fix type:feature GSSoC type bonus: new feature type:performance GSSoC type bonus: performance (+15 pts) type:testing GSSoC type bonus: tests (+10 pts)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant