refactor: decompose scan/extractSkills + typed SectionedResume (#137, #132) - #138
Merged
Conversation
…dResume - #137: split scan() (extract/contact.ts) and extractSkills() (extract/skills.ts) into smaller helpers to clear fallow cognitive-complexity >15; behavior-preserving, byte-identical snapshots - #132: promote typed SectionedResume onto CascadeResult and retire the skillsSectionText side-channel end-to-end; scorer now derives skills-exclusion from sections.byName.get("skills"); corpus goldens unchanged Resolves #137 Resolves #132 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GstfZc8CpvugDY85bS541Y
This was referenced Jun 20, 2026
Closed
This was referenced Jun 20, 2026
Collaborator
Review — Approve ✅Two clean, behavior-preserving refactors with disjoint blast radii. All gates pass locally. Verification performed
#137 — decompose
|
rohithgollapalli
previously approved these changes
Jun 21, 2026
- Export ACCOMPLISHMENT_SECTION_NAMES and reuse it in the cascade no-markdown / scanned-abandon fallback defaults instead of [], so a future consumer reading accomplishmentSections off a scanned result gets the canonical list, matching toSectionedResume. - Move the extractContact doc-comment back down onto the function (the scan/extractLocation/extractOtherUrls extraction had widened the gap). - Drop the stray leading blank line in extractContact. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GstfZc8CpvugDY85bS541Y
Contributor
Author
|
Addressed all three minor nits from the review in
Gates green on the branch: |
s-annam
added a commit
that referenced
this pull request
Jun 21, 2026
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two behavior-preserving refactors bundled onto one branch (epic run, disjoint blast radii):
scan(extract/contact.ts) andextractSkills(extract/skills.ts) into smaller cohesive helpers to clear fallow's cognitive-complexity gate (>15). Logic preserved verbatim; snapshots byte-identical.SectionedResumeonCascadeResult, and retire theskillsSectionTextside-channel end to end. The scorer now derives the skills-exclusion set fromsections.byName.get("skills"). Inert by design — corpus goldens unchanged.Closes #137
Closes #132
Test plan
npm run typecheckcleannpm run testgreen (616/616, 41 files)npm run lintclean*.expected.jsonchurn (goldens NOT regenerated — clean diff is the pass condition)npm run dev/npm run preview