Skip to content

Build recommendation quality feedback loop using skip history and mute preferences#148

Open
Shubb07 wants to merge 14 commits into
Coder-s-OG-s:mainfrom
Shubb07:recommendation-feedback-loop
Open

Build recommendation quality feedback loop using skip history and mute preferences#148
Shubb07 wants to merge 14 commits into
Coder-s-OG-s:mainfrom
Shubb07:recommendation-feedback-loop

Conversation

@Shubb07
Copy link
Copy Markdown

@Shubb07 Shubb07 commented May 17, 2026

Summary

Improves recommendation quality by incorporating contributor feedback signals into the recommendation ranking pipeline.

The recommendation engine now:

  • tracks optional skip reasons
  • down-ranks repeatedly skipped repositories
  • down-ranks repeatedly skipped languages
  • respects contributor mute preferences for repositories and languages
  • preserves recommendation diversity through soft penalties instead of hard filtering

Type of Change

  • Bug fix
  • New feature
  • UI / UX improvement
  • Refactor
  • Documentation
  • Other

Related Issue

Closes #91

What was changed?

  • Added optional skip_reason persistence for skipped recommendations
  • Added centralized recommendation ranking penalties/constants
  • Implemented repository skip down-ranking
  • Implemented language skip down-ranking
  • Added muted repository/language preference persistence
  • Added muted repository/language ranking penalties
  • Added efficient bulk skip-history aggregation with bounded history windows
  • Avoided N+1 queries using shared in-memory lookup maps
  • Preserved recommendation diversity through subtractive scoring only
  • Added runtime-safe fallback handling for missing language/skip data

Screenshots

N/A (backend/recommendation pipeline enhancement)

Checklist

  • My code follows the project structure and conventions
  • I tested this locally (npm run dev)
  • No hardcoded secrets or credentials
  • I have updated documentation if needed

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented May 17, 2026

@Shubb07 is attempting to deploy a commit to the codersogs-3057's projects Team on Vercel.

A member of the Team first needs to authorize it.

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented May 17, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
mergeship Ready Ready Preview, Comment May 20, 2026 2:04pm

Copy link
Copy Markdown
Collaborator

@Siddhartha-singh01 Siddhartha-singh01 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The penalty design here is solid subtractive soft penalties with documented
constants in constants.ts is exactly the right approach. But I ran CI's steps
locally and the PR isn't mergeable yet:

  1. Typecheck fails. You added repoLanguage: string | null as a required field on
    ScoredIssue, but didn't update recommend.test.ts its issue() factory
    builds ScoredIssue objects without repoLanguage. Exact error:
    recommend.test.ts(4,61): error TS2322: ... not assignable to type 'ScoredIssue'.
    Fix: add repoLanguage (e.g. repoLanguage: null) to the factory's base object.

  2. Format check fails on src/app/actions/profile.ts. Run npm run format and
    commit.

  3. Migration numbering: 0010_recommendation_feedback.sql is the third 0010_
    migration main already has 0010_add_failed_webhook_events and
    0010_add_profile_fields. Please rename it to the next free number.

  4. Most important for a "recommendation quality" PR: the new penalty logic (repo
    skip, language skip, muted repo/language) has no test coverage at all —
    recommend.test.ts wasn't touched. Please add tests for the penalties in
    rankScore so the ranking behavior is actually verified.

Run npm run typecheck, npm run format, and npm test locally all three need
to be green before this can merge. The design is good; it just needs the build
fixed and the new logic tested.

@Ayush-Patel-56
Copy link
Copy Markdown
Collaborator

Please see this #67 (comment)

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.

Build issue recommendation quality feedback loop

3 participants