refactor(sdk): shared @maple/sdk-core for the browser and Effect SDKs - #1167
Merged
Merged
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.
frameUrlparses stack frames by position, replacing the backtrackingFRAME_URLregex- Offline batches carry an endpoint+key
target;draincheckshasConsent()per batch interactionKeyextracted, so events withoutinteractionIdare still spannedstartPerfemits through an injectedStartSpansink instead of reaching for OTel
What was checked
- Ran the new
frameUrlagainst the old regex under node on V8/Firefox/eval/port/anonymous frames: same result everywhere except uppercaseAT, which no engine emits offline.ts:107keeps another target's batch only while unexpired and deletes (never sends) expired ones, so one key cannot resend another's datainteractionKeyfallback (perf.ts:128) keeps0/undefinedsemantics and theseendedup unchanged
e780797 · Updated on every push. Reply "won't fix" to dismiss a finding, or mention @maple-review-bot to ask about one.
Loading