fix(recommender):Fix skill duplicate AFTER - #1937
Merged
komalharshita merged 3 commits intoSep 19, 2026
Merged
Conversation
|
@jerry-kay19 is attempting to deploy a commit to the komalsony234-1530's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
Thank you for submitting your first pull request to DevPath. Before review:
A maintainer will review your contribution soon. |
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
A moderate input-handling regression and unresolved lint issues remain.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 1
Open (3)
What changed in this PR
This PR fixes duplicate canonical skill entries after alias resolution and adds regression coverage.
Changes:
- Deduplicates normalized skill aliases while preserving order.
- Adds a regression test for duplicate aliases.
| File | Review findings |
|---|---|
tests/test_basic.py |
Line 1343: Nit (2 votes)—fix the docstring’s grammar and spacing. Nit (1 vote)—shorten or wrap it to meet the 88-character flake8 limit. |
src/utils/recommender.py |
Line 150: Moderate (3 votes)—blank-only input can return None and cause TypeError; always return the deduplicated list. Line 147: Nit (3 votes)—remove trailing whitespace causing W291. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+150
to
+151
| if duplicates := [SKILL_SYNONYMS.get(token, token) for token in tokens]: | ||
| return list(dict.fromkeys(duplicates)) # deduplicate while preserving order |
| tokens = [ | ||
| s.strip().lower() | ||
| for s in skills_string.split(",") | ||
| for s in skills_string.split(",") |
| assert any("Data" in title or "Pipeline" in title for title in titles) | ||
|
|
||
| def test_parse_skill_entries_deduplicates_synonyms(): | ||
| """Verify parse_skill_entries and also removes duplicate canonical tokens after alias resolution.""" |
komalharshita
approved these changes
Sep 19, 2026
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.


Summary [required]
This resolves an issue parse_skill_entries() where passing comma-seperated skill aliases that map to identical tokens that create duplicate entries in the resulting list.
Related Issue [required]
Closes #
Type of Change [required]
data/projects.jsonWhat Was Changed [required]
tests/test_basic.pyHow to Test This PR [required]
test_parse_skill_entries_deduplicates_synonyms to verify alias deduplication
git checkout your-branch-namepip install -r requirements.txtpython app.pypython tests/test_basic.pyExpected test output:
Test Results [required]
tests\test_basic.py . [100%]
============ 1 passed, 100 deselected in 0.90s =============
Screenshots (if UI change)
Self-Review Checklist [required]
feat/,fix/,docs/,data/,style/,test/python tests/test_basic.pyand all 27 tests passflake8 .locally and there are no errorsprint()orconsole.log()debug statementsNotes for Reviewer
None