▌ 2026-05-30 RezMyCV ats_keywords fix.md
▒ PATH:
▒ SIZE: 2.3 KB
▒ MODIFIED: 2026-05-30 04:20
Session Summaries/2026-05-30 RezMyCV ats_keywords fix.md▒ SIZE: 2.3 KB
▒ MODIFIED: 2026-05-30 04:20
# Session Summary — May 30, 2026
## RezMyCV — ats_keywords bug
**Problem:** `ats_keywords` was always `[]` in Supabase despite `requirements` having full AI-extracted data.
**Investigation:**
- `extract_requirements()` correctly returns skills as simple strings: `["AI strategy", "AI delivery", "Enterprise AI initiatives", ...]`
- `confirm_job_route` built `ats_keywords` via a loop iterating skills/certifications/tools/other categories — but the loop returned `[]`
- `requirements` column in Supabase had the full correct JSON, but `ats_keywords` was `[]`
- Root cause unknown — suspected supabase-py Python 3.10+ type union syntax issue on Railway runtime
**Fix applied (commit 065065a):**
- Use `requirements.skills` directly as `ats_keywords` — no more extraction loop
- Simpler, more reliable — goes straight from source
- Pushed to GitHub, Railway auto-deploying
**Before (broken):**
```python
for category in ['skills', 'certifications', 'tools', 'other']:
for item in items:
if isinstance(item, dict): ats_keywords.append(...)
elif isinstance(item, str): ats_keywords.append(item)
```
**After (working):**
```python
skills = requirements.get('skills', [])
ats_keywords = [s.lower() for s in skills if isinstance(s, str) and s.strip()]
```
## What was ruled out
- `save_job_description` double-encoding: not the cause (ats_keywords was already a string before reaching save)
- `extract_requirements` failure: not the cause (requirements JSON saved correctly)
- Old code at time of job confirm: debug commit 944a148 was pushed before the job was confirmed
## Still pending on RezMyCV
1. [ ] Test new job paste → verify `ats_keywords` now populated (SQL: `SELECT ats_keywords FROM job_descriptions WHERE user_id = '...'`)
2. [ ] Fix `ats_score=0` — `score_ats_keywords()` in `gap_analyzer.py:score_ats_keywords()` only scans experience bullets, not skills array; also 'other' phrases inflate missing count
3. [ ] CV preview design — `/cv/preview` shows plain HTML, no CSS styling
4. [ ] "Add to CV" not updating profile — `merge_cv_sections()` silently ignores AI output that doesn't have `.bullets` sub-key
5. [ ] PDF download for tailored CV
## Links
- Live: [[Rezmycv.com|rezmycv.com]] — Railway deployed
- GitHub: [[GitHub — ncik8/TailorMyCV]]
- Project details: [[MemPalace Archive/projects/tailormycv]] (full history)