Skip to content

feat: map sessionize export rows to activities - #5451

Open
mbani01 wants to merge 11 commits into
feat/issue-1156-sessionize-event-exportfrom
feat/issue-1156-sessionize-activity-mapper
Open

mbani01 wants to merge 11 commits into
feat/issue-1156-sessionize-event-exportfrom
feat/issue-1156-sessionize-activity-mapper

Conversation

@mbani01

@mbani01 mbani01 commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

What this adds

The mapping from a parsed Sessionize export row to a CDP activity. Nothing calls it yet: the sync comes in the next PR, so merging this loads nothing. Stacked on #5447.

Behaviour

  • Two activity types. submitted-session is dated by the submission date. spoke-at-session is dated by the session's scheduled start and carries room, start time and duration. An accepted session with no scheduled slot gives no spoke-at-session.
  • One activity per speaker per session. The key is platform sessionize, channel = event key, sourceId = {sessionId}-{speakerId}.
  • Member. Sessionize has no username, so the speaker's email is sent as the username identity and as the email identity (both verified), as the Luma and Credly connectors do. The Speaker Id is not an identity. A LinkedIn handle is added when the field holds a profile link (not verified). Photo and bio are sent when filled.
  • Speakers without a valid email give no activity. About 3% of rows in the production exports.
  • No fallback values. The display name is the first and last name only, the bio is the Bio field only, and the spoke-at timestamp is the scheduled start only.
  • Organization. Built from the speaker's "Company Website", kept as the hostname only. No organization for a public email provider, for a shared site (LinkedIn, GitHub, short links, link pages), or for a host where anyone can get a subdomain (github.io and similar, read from the public suffix list). Text that is not a website never reaches the activity.
  • @crowd/common. Two new exports, privateSuffix and isOnPrivateSuffix. Nothing existing changes.
  • A duplicated optional column no longer also warns "missing column" (the small point noted in feat: parse and check sessionize exports #5447).

Checked on real data

Run on the production export of one large event (3,758 rows): 3,670 submission activities and 400 spoke-at activities; 88 and 9 rows are skipped for a missing email; 0 schema failures. 2,878 activities carry an organization; 330 of them come from a company website with a path.

Follow-up fixes after review

  • A subdomain of a public email provider, such as mail.yahoo.com, gives no organization.
  • A website is refused only when the whole value is an email address or the URL carries userinfo; an @ in the path or query keeps the organization.
  • A company domain under a registry-style suffix such as uk.com or co.nl gets its organization; the bare suffix does not.
  • The LinkedIn handle keeps its letter case and is percent-decoded. It is refused only when it is empty or holds whitespace, a control character or a slash; real handles contain emoji, dots and tildes.
  • The email identity is sent only for a valid email address.

Known small point, not fixed here

  • The list of registry-style suffixes is not complete (ru.com and a few others are missing). A company there gets no organization; nothing is attached wrongly.

Tests

All connector and common tests pass (918). Fixtures use made-up data only.

Refs linuxfoundation/lfx-cdp-insights-ops#1156

@mbani01
mbani01 requested review from a team and lfx-one as code owners November 26, 2026 14:35
Copilot AI balanced review requested due to automatic review settings November 26, 2026 14:35
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@cursor

cursor Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

PR Summary

Low Risk
New mapping code is test-only until a follow-up wires sync; org/domain heuristics could mis-attribute edge-case websites but are heavily tested and conservative.

Overview
Adds a Sessionize mapper that turns parsed export rows into submitted-session and spoke-at-session activities (not wired into sync yet). Rows without a valid email or submission date produce no submission activity; spoke-at-session only for Accepted rows with a scheduled slot, sharing the same sourceId as the submission.

Members get verified Sessionize username and email identities, optional LinkedIn handle from profile URLs, and optional avatar/bio. Organizations are derived from company website hostnames with filtering for shared hosts, email providers, userinfo/whole-email “URLs”, and private suffixes (via new privateSuffix / isOnPrivateSuffix in @crowd/common). Registry-style suffixes like uk.com can still produce an org when appropriate.

compareWithLastGoodRun now emits duplicate_optional_column warnings and no longer treats duplicated optional headers as missing columns. Large mapper.test.ts coverage accompanies the new module.

Reviewed by Cursor Bugbot for commit c69cb5d. Bugbot is set up for automated code reviews on this repo. Configure here.

@lfx-one

lfx-one commented Nov 26, 2026 •

Copy link
Copy Markdown

@mbani01 I'm starting review 1 of this pull request now (started 2026-11-26 14:35 UTC using review agent v0.1.34). This usually takes a few minutes. I'll update this comment with the summary when I'm done. If there's no summary here after about 45 minutes, the review stopped: push a new commit, or post a comment that begins with a mention of me followed by re-review, to start another. For help with the review agent, see https://github.com/linuxfoundation/lfx-review-agent/issues.


Hi @mbani01, thanks for the detailed PR description and the real-data check.

Summary

This PR adds the mapping from a parsed Sessionize export row to submitted-session and spoke-at-session activities, and one new @crowd/common export. It also stops a duplicated optional column from raising a second "missing column" warning. The code is tidy and well tested, and nothing calls it yet. My main concern is the spoke-at-session timestamp.

Decision

✅ Approved with minor comments

🟡 1 minor · ⚪ 1 nit

Details

Overall impression: The mapper is small and easy to follow. It keeps names and emails out of the activity attributes, and it filters shared hosts and private suffixes before building an organization. The tests cover the edge cases well. Because nothing calls the mapper yet, the one real risk is in how timestamps will behave once the sync lands.

🟡 Minor: 1 issue: spoke-at-session timestamp can change between syncs and create a duplicate activity
⚪ Nit: 1 issue: New @crowd/common export has no direct test

Other reviewers and CI checks: Cursor Bugbot posted a summary with no findings that I needed to reconcile. CI has no commit statuses on this commit yet, and I couldn't read the branch's required checks (403), so none were checked. Please make sure CI is green before merging.

Rule files: read AGENTS.md; skipped CONTRIBUTING.md (not needed for this change), .claude/rules/* (not related to this change); read services/libs/connectors/README.md as the connectors rules file

Questions, problems, or feedback: https://github.com/linuxfoundation/lfx-review-agent/issues

@greptile-apps

greptile-apps Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

Confidence Score: 5/5 · The PR appears safe to merge; no actionable issues remain.RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The PR appears safe to merge; no actionable issues remain.

Summary

Adds Sessionize row mapping for submission and speaking activities, with member identities, optional profile fields, and filtered company websites.

  • Sessionize rows can become submission and scheduled-speaking activities.
  • Duplicated optional columns no longer trigger a missing-column warning.

Reviews (5) · Last reviewed commit: "test: follow the removed sensitive colum..." · Reviewed by Greptile

lfx-one
lfx-one previously approved these changes Nov 26, 2026

@lfx-one lfx-one left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The mapper is clean and well tested, and nothing calls it yet. I have one minor point about spoke-at-session timestamps that is worth settling before the sync PR, and one nit. Neither blocks approval.

Comment thread services/libs/common/src/domain.ts Resolved

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Domain filtering lets webmail-provider subdomains become verified organization domains while incorrectly rejecting valid company URLs with an @ in the path or query.

2 open issues
What changed in this PR

Adds the Sessionize row-to-activity mapper on top of the export parser from #5447. The mapper is not yet connected to ingestion; synchronization comes in a later PR.

Changes:

  • Maps submission and accepted-session rows to activities with speaker identities, profile details, and organization domains.
  • Filters shared-site organization domains using a new private-suffix helper.
  • Prevents duplicated optional columns from also producing false missing-column warnings.
File Description
services/​libs/​connectors/​src/​connectors/​sessionize/​mapper.ts Adds activity, speaker, and organization mapping.
services/​libs/​connectors/​src/​connectors/​sessionize/​mapper.test.ts Tests mapping, domain filtering, and output schemas.
services/​libs/​connectors/​src/​connectors/​sessionize/​exportRows.ts Suppresses missing-column warnings for duplicated optional columns.
services/​libs/​connectors/​src/​connectors/​sessionize/​exportRows.test.ts Updates regression coverage for column warnings.
services/​libs/​common/​src/​domain.ts Adds the isOnPrivateSuffix helper.

Review effort: Balanced

@mbani01 mbani01 self-assigned this Nov 26, 2026
Copilot AI balanced review requested due to automatic review settings November 26, 2026 15:54
@lfx-one

lfx-one commented Nov 26, 2026 •

Copy link
Copy Markdown

@mbani01 I'm starting review 2 of this pull request now (started 2026-11-26 15:54 UTC using review agent v0.1.34). This usually takes a few minutes. I'll update this comment with the summary when I'm done. If there's no summary here after about 45 minutes, the review stopped: push a new commit, or post a comment that begins with a mention of me followed by re-review, to start another. For help with the review agent, see https://github.com/linuxfoundation/lfx-review-agent/issues.


Hi Mouad BANI, thanks for working through the earlier feedback so quickly.

Summary

These commits tighten how a Sessionize row becomes a member and an organization: email-provider subdomains, @ in URL paths, LinkedIn handle casing and decoding, and email validation. They also add a direct test for the private-suffix helpers. The changes are small, well tested, and I found no new issues.

Decision

✅ Approved with minor comments

❌ 1 prior item still open

The one open item is the earlier minor point on the spoke-at-session timestamp. You said it is settled in the sync PR (#5452), so it does not block approval.

Details

Overall impression: The follow-up commits address each bot and review comment with a matching test case. Email-provider subdomains such as mail.yahoo.com now give no organization, and a company website with an @ in its path or query keeps its organization. The LinkedIn handle keeps its case, is decoded, and is checked against an allowlist of characters. The merge of the base branch widened nothing: I reviewed the new commits as a whole.

👏 Nice work: each fix has its own row in the table test, and the new private-suffix helpers are tested directly in domain.test.ts.

  • ✅ Resolved: New @crowd/common export has no direct test (r1-f2). domain.test.ts now covers isOnPrivateSuffix and privateSuffix.
  • ❌ Still open: spoke-at-session timestamp can change between syncs and create a duplicate activity (r1-f1). The mapper still dates an unscheduled session by the event's first day, so please confirm in feat: add the sessionize eventExport sync #5452 that the single full load after the event ends covers this.

❌ Prior items still open: 1 (spoke-at-session timestamp, prior)

Other reviewers and CI checks: Greptile now reports no new issue, and Copilot's and Greptile's earlier findings are fixed in this diff. Cursor Bugbot's lowercase-handle finding is also fixed. No commit statuses were present on this commit yet, and I couldn't read the branch's required checks (403), so none were checked. Please make sure CI is green before merging. GitHub also reports this branch as behind its base.

Rule files: read AGENTS.md; skipped CONTRIBUTING.md (not needed for this change), .claude/rules/* (not related to this change)

Questions, problems, or feedback: https://github.com/linuxfoundation/lfx-review-agent/issues

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The email-detection regex misclassifies scheme-less website URLs containing an @ in the query, causing valid website and organization data to be dropped.

1 open issue
2 resolved since last review

Review effort: Balanced

lfx-one
lfx-one previously approved these changes Nov 26, 2026

@lfx-one lfx-one left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The follow-up fixes address the bot and review feedback (email-provider subdomains, @ in paths and queries, LinkedIn handle casing and decoding, email validation, and the new domain.test.ts case), and I found no new issues. The one earlier minor point, the spoke-at-session timestamp, still stands in this diff and is deferred to the sync PR by the author, so it does not block approval.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit b104646. Configure here.

Copilot AI balanced review requested due to automatic review settings November 26, 2026 16:10
@lfx-one

lfx-one commented Nov 26, 2026 •

Copy link
Copy Markdown

@mbani01 I'm starting review 3 of this pull request now (started 2026-11-26 16:10 UTC using review agent v0.1.34). This usually takes a few minutes. I'll update this comment with the summary when I'm done. If there's no summary here after about 45 minutes, the review stopped: push a new commit, or post a comment that begins with a mention of me followed by re-review, to start another. For help with the review agent, see https://github.com/linuxfoundation/lfx-review-agent/issues.


Hi Mouad BANI, thanks for acting on the earlier feedback so quickly. Dropping the first-day fallback for spoke-at-session settles the timestamp concern.

Summary

These commits make the speaker's email the username and email identity, so a row without one valid email gives no activity. They also drop the fallback values (display name, bio and spoke-at timestamp), and let a LinkedIn handle hold emoji, dots and tildes. The change is small and well tested. One minor edge case remains in the website check.

Decision

✅ Approved with minor comments

🟡 1 minor

Details

Overall impression: Each fix has a matching test row, and the mapper now has no invented values. A spoke-at activity exists only for an accepted session with a scheduled slot, and its timestamp is that slot, so a later re-sync can no longer produce a second activity for the same session. The only gap I found is that WHOLE_EMAIL also matches a scheme-less website with @ in its query and no path, so that site loses its organization. It fails safe: nothing is attached wrongly, and the data is only lost.

👏 Nice work: the PR description was updated with the new behavior and fresh numbers from the real-data run, and the spoke-at rows in mapper.test.ts now cover the no-slot case.

  • ✅ Resolved: spoke-at-session timestamp can change between syncs and create a duplicate activity (r1-f1). The fallback to the event's first day is gone, so the timestamp is the scheduled start only.
  • ✅ Resolved: New @crowd/common export has no direct test (r1-f2). This stays resolved: domain.test.ts covers isOnPrivateSuffix and privateSuffix.

🟡 Minor: 1 issue: A scheme-less website with @ in its query is still dropped

Other reviewers and CI checks: Copilot's remaining comment on the scheme-less @ case is the same point as my finding. Cursor Bugbot's spoke-at timestamp comment is addressed by the removed fallback. Greptile found nothing new. GitHub reports no commit statuses on this commit yet, and I couldn't read the branch's required checks (403), so none were checked. Please make sure CI is green before merging. GitHub also reports this branch as behind its base.

Rule files: read AGENTS.md, services/libs/connectors/README.md; skipped CONTRIBUTING.md (not needed for this change), .claude/rules/* (not related to this change)

Questions, problems, or feedback: https://github.com/linuxfoundation/lfx-review-agent/issues

lfx-one
lfx-one previously approved these changes Nov 26, 2026

@lfx-one lfx-one left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new commits fix the earlier spoke-at-session timestamp concern (a session with no slot now gives no activity) and key speakers on their email instead of the speaker id. I found one minor edge case in the website check, which does not block approval.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The mapper drops valid rows without email or scheduled start times, lacks stable speaker-ID identities, and accepts LinkedIn handles containing disallowed characters.

4 open issues

Review effort: Balanced

Shared sites such as linkedin.com or github.com no longer become an organization.
Refs linuxfoundation/lfx-cdp-insights-ops#1156

Signed-off-by: Mouad BANI <mouad-mb@outlook.com>
Short links, link-in-bio and profile pages give no organization, and neither do personal
pages on hosts where anyone can get a subdomain, found through the private public suffixes.

Refs linuxfoundation/lfx-cdp-insights-ops#1156

Signed-off-by: Mouad BANI <mouad-mb@outlook.com>
…izations

Email provider subdomains and URLs with userinfo give no organization, while an @ in a path or
query no longer refuses a company website. Registry-style suffixes such as uk.com count as
company domains. LinkedIn handles keep their case and are percent-decoded, and the email
identity is sent only for a cell holding one email address.

Refs linuxfoundation/lfx-cdp-insights-ops#1156

Signed-off-by: Mouad BANI <mouad-mb@outlook.com>
A decoded LinkedIn handle must hold letters, digits, hyphen or underscore only.
A company website that is only a registry suffix gives no organization.

Refs linuxfoundation/lfx-cdp-insights-ops#1156

Signed-off-by: Mouad BANI <mouad-mb@outlook.com>
Real handles hold such characters. Only an empty handle or one with
whitespace, a control character or a slash is refused.

Refs linuxfoundation/lfx-cdp-insights-ops#1156

Signed-off-by: Mouad BANI <mouad-mb@outlook.com>
The sessionize username identity is the speaker's email, next to the email identity, as for
Credly. A speaker without one valid email address gives no activity. The activity key still
uses the speaker id.

Refs linuxfoundation/lfx-cdp-insights-ops#1156

Signed-off-by: Mouad BANI <mouad-mb@outlook.com>
The two email identities are written out so their platform and type keep the literal types.

Refs linuxfoundation/lfx-cdp-insights-ops#1156

Signed-off-by: Mouad BANI <mouad-mb@outlook.com>
A spoke-at activity needs a scheduled slot and takes its timestamp from it. The bio comes
from the Bio cell only, and the display name is the speaker's name, left out when it is empty.

Refs linuxfoundation/lfx-cdp-insights-ops#1156

Signed-off-by: Mouad BANI <mouad-mb@outlook.com>
@mbani01
mbani01 force-pushed the feat/issue-1156-sessionize-activity-mapper branch from ebd0f3f to 1bd573e Compare November 26, 2026 16:14
Copilot AI balanced review requested due to automatic review settings November 26, 2026 16:14
@lfx-one

lfx-one commented Nov 26, 2026

Copy link
Copy Markdown

@mbani01 A recent review was posted within the last 5 minutes: #5451 (comment). I won't re-review yet. Push another update after 5 minutes if you want another pass.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

LinkedIn handle validation admits forbidden emoji and punctuation as username identities, while the new test reinforces this behavior instead of rejecting invalid handles.

4 open issues

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings November 26, 2026 16:26
@lfx-one

lfx-one commented Nov 26, 2026 •

Copy link
Copy Markdown

@mbani01 I'm starting review 4 of this pull request now (started 2026-11-26 16:26 UTC using review agent v0.1.34). This usually takes a few minutes. I'll update this comment with the summary when I'm done. If there's no summary here after about 45 minutes, the review stopped: push a new commit, or post a comment that begins with a mention of me followed by re-review, to start another. For help with the review agent, see https://github.com/linuxfoundation/lfx-review-agent/issues.


Hi Mouad BANI, thanks for keeping the branch in step with its base.

Summary

These commits merge the base branch into the mapper branch. The merge drops the sensitive-column warning from the parser, and a test change follows that. The mapper code is unchanged since my last review, and I found no new issues.

Decision

✅ Approved with minor comments

❌ 1 prior item still open

The open item is the earlier minor point: a scheme-less website with @ in its query still loses its organization. You accepted it as a known limit and it only drops data, so it does not block approval.

Details

Overall impression: The only new change is the merge of the base branch and a one-line follow-up in the parser test. It touches nothing in the mapper, so the earlier review of the mapper still holds. The earlier findings (r1-f1 and r1-f2) stay resolved.

  • ✅ Resolved: spoke-at-session timestamp can change between syncs (r1-f1). The fallback is gone, so the timestamp is the scheduled start only.
  • ✅ Resolved: New @crowd/common export has no direct test (r1-f2). domain.test.ts covers it.
  • ❌ Still open: A scheme-less website with @ in its query is still dropped (r3-f1). WHOLE_EMAIL still matches it. You declined the fix as not worth it. Adding ? and # to both character classes would close it later.

🟡 Minor: 1 prior item still open: A scheme-less website with @ in its query is still dropped (prior)

Other reviewers and CI checks: Copilot's open comments on the LinkedIn handle, the unscheduled-row fallback and the speaker-ID identity were answered by your replies, which match the PR description. Greptile and Cursor Bugbot report nothing new. No commit statuses exist on this commit yet, and I couldn't read the branch's required checks (403), so none were checked. Please make sure CI is green before merging.

Rule files: read AGENTS.md, .claude/rules/commit-workflow.md, CONTRIBUTING.md; skipped none

Questions, problems, or feedback: https://github.com/linuxfoundation/lfx-review-agent/issues

@lfx-one lfx-one left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new commits merge the base branch (which drops the sensitive-column warning from the parser) and update the parser test to match. I found no new issues. The one earlier minor point, a scheme-less website with @ in its query, is still in the code. You accepted it as a known limit, so it does not block approval.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues block the Sessionize activity-mapping changes.

No open issues 🎉

4 resolved since last review

Review effort: Balanced

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants