refactor(#134, #135): contact-link ownership model + real profile-section boundary - #140
Conversation
Review — Approve ✅ (stacked on #138 — merge that first)A clean, well-motivated refactor: it trades two segmentation-imprecision workarounds for the proper signals from Verification performed
Load-bearing invariants — both verified
Other things I checked
Notes (non-blocking)
None block merge. Good structural cleanup with the risky invariants holding up under inspection. 🤖 Generated with Claude Code |
…tion boundary Replace two segmentation-imprecision workarounds in contact extraction with the proper signals now available from the typed SectionedResume (#138). - #134: retire the stripPromotedUrls after-the-fact slug-subtraction scrub (isPromotedUrl, PROMOTED_LABEL_RE, urlSlug, per-section strip driver) in favor of a line-level ownership model. extractContact now returns consumedLines: ReadonlySet<PdfLine>; buildHeuristicResult strips owned lines from body pools before extraction, so a promoted identity link is claimed by contact and never re-renders as a phantom project/achievement. #125 identity-link fixtures pass; zero corpus-golden movement. - #135: replace extractContact's geometric y-band header proxy (inHeaderRegion: ann.yTop < 280) with inProfileSection, a real boundary derived from the profile section's line extents. portfolio_url/website_url annotation lookups consult it; the document-wide LinkedIn/GitHub identity match (anywhereOnDoc) is retained by design (spike §1.4). No PDF-points magic number remains; contact-field counts unchanged on all fixtures. Verified: typecheck clean, 616/616 tests pass, 24/24 corpus snapshots unchanged. Refs #109, #127. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GstfZc8CpvugDY85bS541Y
77e6d03 to
7176439
Compare
|
Rebased onto One conflict resolved in Gates green on the rebased branch: Both review notes are non-blocking observations (narrower whole-line ownership edge cases; the one remaining |
Summary
Replaces two segmentation-imprecision workarounds in contact extraction with the proper signals from the typed
SectionedResume(#138). Stacked on #138 — base isrefactor-137-132-fallow-sectioned, notmain.stripPromotedUrlsafter-the-fact slug-subtraction scrub (isPromotedUrl,PROMOTED_LABEL_RE,urlSlug, the per-section strip driver) for a line-level ownership model:extractContactreturnsconsumedLines: ReadonlySet<PdfLine>, andbuildHeuristicResultstrips owned lines from body pools before extraction, so a promoted identity link is claimed by contact and never re-renders as a phantom project/achievement entry.inHeaderRegion: ann.yTop < 280) withinProfileSection, a real boundary from the profile section's line extents;portfolio_url/website_urlannotation lookups consult it. Document-wide LinkedIn/GitHub identity match (anywhereOnDoc) retained by design (spike §1.4).Closes #134
Closes #135
Refs #109, #127
Test plan
npm run typecheckcleannpm run testgreen — 616/616, 24/24 corpus snapshots unchangedyTop < 280magic-number band remains in contact extractionnpm run previewStacked-PR note
Base is the unmerged #138 branch. GitHub auto-retargets this PR to
mainonce #138 merges; then rebase to drop #138's commits:git rebase --onto main refactor-137-132-fallow-sectioned gh-134-135-contact-ownership