Conversation
A two-column flatten can glue a sidebar bar-value onto a real section header — e.g. "20% Projects" — producing a body-size line that the text-only matchSectionHeader path (and after #115, Guard 7) correctly rejects as prose. The fix restores the lost projectsCount (2→0 on the chromium-two-column-sidebar fixture) without reopening the FP class that #115 closed. Changes: - Add `matchSectionAnchorToken` in regex.ts: the unguarded trailing- anchor cousin of `matchAnchorFallback`. Normalizes, splits, returns the section whose anchor set contains the LAST token (anchorFallback- enabled only). No prose guards — the caller's column signal replaces them. - Extract `isHeaderShort` from `isVisualHeader` in sections.ts so the column-gated branch and the L3 visual path share one predicate. - Thread `columnBoundaries` (the per-page split-x map already produced by detectColumnBoundaries) into `splitIntoSections` and `classifyLine`. A new branch in `classifyLine` fires only when: (a) columnSplitX is defined, (b) line.x >= columnSplitX (secondary column), and (c) the line is header-short. Within that gate, `matchSectionAnchorToken` can recover the section name without prose guards. - Pass `boundaries` through the `parseHeuristic` → `splitIntoSections` call in openresume.ts. - Add tests: matchSectionAnchorToken unit suite (regex.test.ts) + three sections.test.ts cases pinning the (a) recover / (b) main-column / (c) single-column gate. - Rebake chromium-two-column-sidebar.expected.json: projectsCount 0→2, `projects` added to fieldsPopulated; score block unchanged. Resolves #117
s-annam
requested review from
rohithgollapalli
and removed request for
rohithgollapalli
June 18, 2026 03:02
Contributor
Author
|
Merging via admin bypass (no second reviewer available). This is a narrow follow-up fix to #115 / the section-recognition epic (#109): PR #115 correctly tightened Guard 7 to reject numeric-lead prose, which as a side effect dropped the accidental recovery of sidebar-glued headers like |
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
A two-column résumé flatten can glue a sidebar bar-value onto a real section header (e.g.
20% Projects), producing a body-size line that the text-onlymatchSectionHeaderpath correctly rejects as prose. After #115 tightened Guard 7 (uppercase-lead), the accidental match was lost andchromium-two-column-sidebardroppedprojectsCount2 → 0.This recovers the section properly without reopening the prose FP class #115 closed. The gate is column membership, not font: the per-page
columnBoundariesmap is threaded intosplitIntoSections, and a new branch inclassifyLinerecovers the section name only when the line is body-size, header-shaped, and sits in the secondary column (line.x >= columnSplitX) of a detected two-column layout. Main-column prose (5 Years Experience,20% Experience) and single-column docs never trigger it; the text-only path is unchanged.Closes #117
Test plan
npm run typecheckcleannpm run testgreen (446 passed / 35 files)chromium-two-column-sidebar.expected.jsonprojectsCount0 → 2 +projectsadded tofieldsPopulated; score block unchanged; no other fixture movedmatchSectionHeader("20% Experience" / "5 Years Experience" / "10+ Years Experience")still returnnull