mirror of
https://github.com/MadsLorentzen/ai-job-search.git
synced 2026-09-17 00:26:26 +00:00
When a tracker row's cv_file/cover_letter_file columns are empty, /outcome and /interview fell back to a company-prefix glob (cv/main_<company>*.tex). /apply names drafts main_<company>_<role><CV_EXT>, so two roles at one company both match that glob. /outcome copied whichever the filesystem returned first into the archive as cv_draft.tex - the file whose stated purpose is to record what was actually submitted - and its own "leave an existing archived file" rule then made the wrong copy permanent. Both fallbacks now glob cv/main_<company>_<role>.* and cover_letters/cover_<company>_<role>.*, deriving the stem by the Subfolder naming rule in documents/README.md rather than restating it, and skip with a note instead of widening the search. Dropping the hardcoded .tex also makes a template registered by /add-template findable. The dot before the extension wildcard matters: a bare trailing * also absorbs a longer role, so ML Engineer and ML Engineer II at one company would collide the same way the company-prefix glob did.