Skip to content

parser: dateless anchor-line flush-right location glue not peeled (follow-up to #891) #896

Description

@s-annam

Problem

#891 / PR #895 fixed a tab-justified flush-right work-mode/location keyword ("Remote"/"Hybrid"/"On-site") glued onto a role's title when title and location render on the same PDF row — but only for below-anchor header lines (peelFlushRightLocation, wired into the belowHeaderLines loop in src/lib/heuristics/entry-blocks.ts).

A dateless anchor linecfg.anchor === "first_line" sections (projects, achievements) whose anchor has no parseable date, or any date_range-anchor entry where shouldParseAnchorDate returns false — takes anchorLine.text verbatim with no peel:

const anchorTextWithoutDates = parseAnchorDate
  ? stripDateRange(anchorHeadText)
  : anchorLine.text;   // <- no peel applied here

So the same tab-justified flush-right glue on the anchor line itself (not a line below it) still merges the keyword into the title/anchor text, and the location is lost the same way #891 described.

Scope note

Flagged during review of PR #895 (self-review, comment) as narrow and untested — needs a dateless-anchor fixture to reproduce, not confirmed against a real corpus entry. Deliberately left out of #895's dated/below-anchor scope.

Suggested approach

Extend the same splitOnFlushRightGap (line-assembly.ts) geometry check to anchorLine when !parseAnchorDate, gated by the same closed isBareLocationString vocabulary as peelFlushRightLocation. Needs care: the anchor line feeds title/company disambiguation directly (not just a below-anchor header candidate), and first_line anchors are shared by projects/achievements sections where "title" semantics differ from experience roles — the peeled trailer needs a landing spot equivalent to what belowHeaderCandidates gives disambiguateCompanyTitle today.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingux:parsingUX program: parsing accuracy as the user experiences it

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions