Skip to content

refactor(sdk): shared @maple/sdk-core for the browser and Effect SDKs - #1167

Merged
Makisuo merged 5 commits into
fix/browser-sdk-review-findingsfrom
feat/sdk-parity
Sep 30, 2026
Merged

Makisuo merged 5 commits into
fix/browser-sdk-review-findingsfrom
feat/sdk-parity

fix(sdk-core): parse stack frame URLs without a backtracking regex

e780797
Select commit
Loading
Failed to load commit list.
Maple Review Bot / Maple / review succeeded Sep 30, 2026 in 2m 27s

Confidence 4/5 · No issues found

🟢 Confidence 4/5 · likely safe to merge
quality 100/100 · no findings · tests covered · risk medium

Extracts @maple/sdk-core (sampling, error filtering/rendering, status policy, browser collectors, page-wide coordination) and adapts @maple-dev/browser to it. The delta since the last review (e780797) is the linear stack-frame parser, per-batch consent checks in the offline queue, and the extracted interactionKey; all are correct and tested.

  • frameUrl parses stack frames by position, replacing the backtracking FRAME_URL regex
  • Offline batches carry an endpoint+key target; drain checks hasConsent() per batch
  • interactionKey extracted, so events without interactionId are still spanned
  • startPerf emits through an injected StartSpan sink instead of reaching for OTel
What was checked
  • Ran the new frameUrl against the old regex under node on V8/Firefox/eval/port/anonymous frames: same result everywhere except uppercase AT , which no engine emits
  • offline.ts:107 keeps another target's batch only while unexpired and deletes (never sends) expired ones, so one key cannot resend another's data
  • interactionKey fallback (perf.ts:128) keeps 0/undefined semantics and the seen dedup unchanged

e780797 · Updated on every push. Reply "won't fix" to dismiss a finding, or mention @maple-review-bot to ask about one.