Skip to content

Duplicate job titles cause tailored resume and cover letter PDFs to overwrite each other #11

@tearl42

Description

@tearl42

Description of the bug
When multiple job postings share the same title and source site, the generated PDF filenames are identical, causing files to be silently overwritten. The final "ready to apply" count is lower than the number of approved tailored resumes because matched resume/cover letter pairs are lost.

To Reproduce
Run the tailor stage against a job database containing multiple postings with the same title from the same site (e.g. five "Network Engineer V" listings from LinkedIn). Only one tailored resume PDF and one cover letter PDF will exist after the run despite all jobs being marked [APPROVED].

Expected behavior
Each job posting should produce a uniquely named file regardless of title. The job's unique ID (available from the URL) should be appended to the filename.

Fix
In tailor.py around line 496, change:
prefix = f"{safe_site}_{safe_title}"
to:
job_id = job["url"].rstrip("/").split("/")[-1] prefix = f"{safe_site}_{safe_title}_{job_id}"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions