Skip to content

Bug: one profile with url=null (or missing name) discards the entire basics section, silently disabling GitHub enrichment #428

Description

@rajarshidattapy

Description

Profile.url is a required str and Basics.name is a required str:

https://github.com/interviewstreet/hiring-agent/blob/70fd3ea/models.py#L30-L41

The basics prompt explicitly allows partial profiles ("If a URL is present but you cannot determine the network or username, still include it with the available information"), and models regularly emit "url": null for entries like LinkedIn: johndoe. When that happens, Basics(**...) raises and pdf.py discards the entire basics section:

https://github.com/interviewstreet/hiring-agent/blob/70fd3ea/pdf.py#L306-L313

try:
    complete_resume["basics"] = Basics(**complete_resume["basics"])
except Exception as e:
    logger.error(f"❌ Error creating Basics object: {e}")
    complete_resume["basics"] = None

Consequences: name, email, summary and all profiles are lost, so find_profile(..., "Github") finds nothing and GitHub enrichment is skipped. The open-source score (35/100) is then computed without any GitHub data.

A related failure mode: any single wrongly-typed field in another section (e.g. skill keywords returned as a string "Python, Go") makes JSONResume(**complete_resume) raise at L315, _extract_all_sections_separately returns None, and score.main() returns None without scoring.

Steps to reproduce

from models import Basics, JSONResume
Basics(name="A", profiles=[{"network": "GitHub", "url": "https://github.com/a"},
                           {"network": "LinkedIn", "username": "a", "url": None}])
# ValidationError -> in the pipeline, basics becomes None

Basics(name=None, profiles=[{"network": "GitHub", "url": "https://github.com/a"}])
# ValidationError

JSONResume(skills=[{"name": "Languages", "keywords": "Python, Go"}])
# ValidationError -> whole resume discarded

Expected

  • A single malformed profile is dropped (or url made optional), not the whole basics section.
  • A missing name doesn't discard valid contact/profile data.
  • One bad field in a section doesn't discard the whole resume.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions