fix: improve career break inference in stint changes#4087
Conversation
Signed-off-by: Yeganathan S <63534555+skwowet@users.noreply.github.com>
|
Your PR title doesn't contain a Jira issue key. Consider adding it for better traceability. Example:
Projects:
Please add a Jira issue key to your PR title. |
2 similar comments
|
Your PR title doesn't contain a Jira issue key. Consider adding it for better traceability. Example:
Projects:
Please add a Jira issue key to your PR title. |
|
Your PR title doesn't contain a Jira issue key. Consider adding it for better traceability. Example:
Projects:
Please add a Jira issue key to your PR title. |
There was a problem hiding this comment.
Pull request overview
Adjusts the stint-change inference logic used by the email-domain member-organization pipeline to better distinguish true career breaks from “umbrella” organizations that span neighboring stints, reducing false split/merge behavior.
Changes:
- Adds an early guard to ignore non-overlapping gap intersections (
overlapStart >= overlapEnd). - Changes “umbrella org” handling from “never a separator” to “separator only if it overlaps the gap for >90 days” (vs >30 days for non-umbrella orgs).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Your PR title doesn't contain a Jira issue key. Consider adding it for better traceability. Example:
Projects:
Please add a Jira issue key to your PR title. |
Signed-off-by: Yeganathan S <63534555+skwowet@users.noreply.github.com>
|
Your PR title doesn't contain a Jira issue key. Consider adding it for better traceability. Example:
Projects:
Please add a Jira issue key to your PR title. |
Note
Medium Risk
Changes stint-splitting heuristics when inferring member org career breaks, which can alter generated/updated affiliation date ranges in production data. Logic is localized but affects core inference outcomes.
Overview
Adjusts career-break (stint split) detection in
inferMemberOrganizationStintChangeswhen another organization overlaps the gap between dates.Instead of always treating “umbrella” orgs (those that wrap the neighboring stint) as non-separators, they can now separate stints only if they occupy the gap for more than 90 days (vs the existing 30-day threshold for normal overlaps), and the overlap check is made explicit by early-returning when there is no positive overlap.
Reviewed by Cursor Bugbot for commit b1fadf9. Bugbot is set up for automated code reviews on this repo. Configure here.