Problem
The two-column sidebar fixture's phone number is present in the extracted plain text (555-0142) but the parser reports "Phone not detected" in the Contact card (3 of 5 detected). This drags Completeness scoring (the score's "Missing: phone, LinkedIn" line).
Surfaced during Playwright QA of the #60 two-column reading-order fix.
Observed (live UI, chromium-two-column-sidebar.pdf)
- Extracted plain text contains:
Jamie Rivera Software Engineering Leader 555-0142 jamie.rivera@example.com …
- Contact card shows Phone — not detected (⚠).
Root cause
This is a fixture artifact, not a general parser gap. PHONE_RE in src/lib/heuristics/regex.ts:19:
export const PHONE_RE =
/(?:(?:\+?\d{1,3})[\s.-]?)?\(?\d{3}\)?[\s.-]?\d{3}[\s.-]?\d{4}\b/g;
requires a full 10-digit number (\d{3} area + \d{3} + \d{4}, optional country code). The fixture's 555-0142 is only 7 digits (\d{3}-\d{4}) → no match. A real US résumé phone is 10 digits, so the regex is correct for production; the fixture simply carries an unmatchable 7-digit local number.
Broadening PHONE_RE to accept bare 7-digit runs is not advised — it would false-match zip+4, ID numbers, and stray NNN-NNNN runs (e.g. a 1985 - 1989-style range with a dash).
Proposed fix
Primary — fix the fixture to a realistic 10-digit synthetic number. Re-export chromium-two-column-sidebar.pdf with a full synthetic 555 phone that a real résumé would use and that PHONE_RE matches, e.g.:
(512) 555-0142, or
512-555-0142, or
555-555-0142
(555-01XX is the reserved fictional block — keep the 555-0142 suffix, prepend a synthetic area+exchange so it's a valid 10-digit shape. Stays PII-free.)
Then re-bake the snapshot — Contact becomes 4/5 and Completeness improves accordingly.
Decision to confirm: should a 7-digit local number ever be surfaced? Recommendation: no — keep PHONE_RE 10-digit-only (production-correct, low false-positive), and fix the fixture. Document this in the fixture README so future synthetic personas use 10-digit numbers.
Affected files
tests/fixtures/pdfs/unknown/chromium-two-column-sidebar.pdf — re-export with a 10-digit synthetic phone.
tests/fixtures/pdfs/unknown/chromium-two-column-sidebar.expected.json — re-bake (npm run bake-fixtures); Contact field count + Completeness shift.
tests/fixtures/pdfs/README.md — add a one-line note: synthetic personas use full 10-digit 555 phone numbers so PHONE_RE matches.
src/lib/heuristics/regex.ts:19 — no change (documented as intentional 10-digit floor).
Acceptance criteria
Notes
Problem
The two-column sidebar fixture's phone number is present in the extracted plain text (
555-0142) but the parser reports "Phone not detected" in the Contact card (3 of 5 detected). This drags Completeness scoring (the score's "Missing: phone, LinkedIn" line).Surfaced during Playwright QA of the #60 two-column reading-order fix.
Observed (live UI,
chromium-two-column-sidebar.pdf)Jamie Rivera Software Engineering Leader 555-0142 jamie.rivera@example.com …Root cause
This is a fixture artifact, not a general parser gap.
PHONE_REinsrc/lib/heuristics/regex.ts:19:requires a full 10-digit number (
\d{3}area +\d{3}+\d{4}, optional country code). The fixture's555-0142is only 7 digits (\d{3}-\d{4}) → no match. A real US résumé phone is 10 digits, so the regex is correct for production; the fixture simply carries an unmatchable 7-digit local number.Broadening
PHONE_REto accept bare 7-digit runs is not advised — it would false-match zip+4, ID numbers, and strayNNN-NNNNruns (e.g. a1985 - 1989-style range with a dash).Proposed fix
Primary — fix the fixture to a realistic 10-digit synthetic number. Re-export
chromium-two-column-sidebar.pdfwith a full synthetic555phone that a real résumé would use and thatPHONE_REmatches, e.g.:(512) 555-0142, or512-555-0142, or555-555-0142(
555-01XXis the reserved fictional block — keep the555-0142suffix, prepend a synthetic area+exchange so it's a valid 10-digit shape. Stays PII-free.)Then re-bake the snapshot — Contact becomes 4/5 and Completeness improves accordingly.
Decision to confirm: should a 7-digit local number ever be surfaced? Recommendation: no — keep
PHONE_RE10-digit-only (production-correct, low false-positive), and fix the fixture. Document this in the fixture README so future synthetic personas use 10-digit numbers.Affected files
tests/fixtures/pdfs/unknown/chromium-two-column-sidebar.pdf— re-export with a 10-digit synthetic phone.tests/fixtures/pdfs/unknown/chromium-two-column-sidebar.expected.json— re-bake (npm run bake-fixtures); Contact field count + Completeness shift.tests/fixtures/pdfs/README.md— add a one-line note: synthetic personas use full 10-digit555phone numbers soPHONE_REmatches.src/lib/heuristics/regex.ts:19— no change (documented as intentional 10-digit floor).Acceptance criteria
chromium-two-column-sidebar.pdfre-exported with a 10-digit synthetic555phone;pdftotextconfirms the new number and that name/email stay synthetic (Jamie Rivera /@example.com).phoneno longer in the score'smissinglist for this fixture.chromium-two-column-sidebar.expected.jsonre-baked and committed alongside the PDF.PHONE_REleft at 10-digit (no broadening);npm run testgreen.Notes
pdftotext tests/fixtures/pdfs/unknown/chromium-two-column-sidebar.pdf - | head -40before commit (binary is the exposure surface, not the PR prose).