Skip to content

fix(profile): resolve no-scheme URLs and ignore placeholder URN drift#21

Merged
peggyrayzis merged 1 commit intomainfrom
codex/20-profile-resolution
Feb 27, 2026
Merged

fix(profile): resolve no-scheme URLs and ignore placeholder URN drift#21
peggyrayzis merged 1 commit intomainfrom
codex/20-profile-resolution

Conversation

@peggyrayzis
Copy link
Owner

@peggyrayzis peggyrayzis commented Feb 27, 2026

Closes

Closes #20

Description

Fixes two li profile regressions in production: no-scheme profile URLs were parsed as raw usernames, and recipient cache drift warnings could surface synthetic placeholder URNs.

Summary

  • Normalize no-scheme LinkedIn URLs in parseLinkedInUrl (for example linkedin.com/in/<handle>).
  • Tighten LinkedIn hostname validation to linkedin.com or *.linkedin.com only.
  • Filter recipient cache warning comparisons to canonical URNs (urn:li:member:<digits> or urn:li:fsd_profile:ACo...) so placeholder cache values do not emit false drift warnings.
  • Resolve recipient-cache path lazily from env to make tests/processes isolate cache files safely.
  • Add regression coverage for no-scheme URLs, malicious suffix-match hostnames, no-scheme recipient resolution, and warning behavior with placeholder vs valid cached URNs.
  • Isolate Vitest recipient cache path to avoid polluting user-level temp cache between test and production runs.
  • Append a memory-log entry for the regression/fix.

Checks

  • npm run check
  • npm run security
  • bash scripts/check-docs.sh

Review

  • Reviewer findings addressed or documented
  • Residual risks documented

Residual Risks

  • Canonical URN filtering intentionally treats non-ACo... fsd_profile IDs as non-cacheable; if LinkedIn introduces a new profile-ID shape, warnings for that shape will be suppressed until patterns are updated.
  • Integration tests for this path remain skipped unless auth-backed test env is enabled.

@peggyrayzis peggyrayzis merged commit 5bb0e32 into main Feb 27, 2026
4 checks passed
@peggyrayzis peggyrayzis deleted the codex/20-profile-resolution branch February 27, 2026 06:51
peggyrayzis added a commit that referenced this pull request Feb 27, 2026
peggyrayzis added a commit that referenced this pull request Mar 5, 2026
* chore: release 0.1.3

* docs: include #19 and #21 in 0.1.3 changelog
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.

Fix profile resolution for no-scheme URLs and placeholder URN cache drift

1 participant