Skip to content

feat(electron): add opt-in automatic JavaScript error capture - #5716

Open
marandaneto wants to merge 21 commits into
feat/electron-browser-integrationsfrom
feat/electron-error-autocapture
Open

marandaneto wants to merge 21 commits into
feat/electron-browser-integrationsfrom
feat/electron-error-autocapture

Conversation

@marandaneto

@marandaneto marandaneto commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

Problem

The Electron alpha needs automatic JavaScript error observation without changing app behavior.

Changes

Stacked on #5715 (feat/electron-browser-integrations). Review and merge in dependency order. Keep the stack draft until human review and release gates are satisfied.

Add optional main uncaught-exception monitoring and renderer error/rejection observers using core exception builders and the existing main-owned delivery path. Preserve exception mechanisms, stacks and process attribution. Check consent before reading error fields, bound error storms and remove listeners on disposal.

Preserve host error handling and termination. Main uses a monitor, not a rejection handler that would suppress native behavior. Same-document renderer reinitialization keeps bridge sequences increasing.

Validation and limits

165 unit tests, types/build/built checks, installed-package Electron error scenarios and seven native Node mode/handler comparisons passed. Actual app callbacks, uncanceled renderer events and native exit/warning behavior matched the disabled baseline.

Main warning-mode or host-handled promise rejections are not automatically captured. Fatal Electron delivery is best effort. Native crashes and symbolication are excluded.

Required isolated Pi autoreview was run against this branch and its immediate predecessor. Parent test-quality audit and reproduction-first fixes are recorded locally. Replay, native crash capture, surveys and product tours remain excluded.

Release info Sub-libraries affected

Libraries affected

@posthog/electron

Checklist

  • Signed commits; normal merges only.
  • Focused tests and package/type checks.
  • Platform and backward-compatibility limits documented.
  • No independent analytics owner or recorder added.
  • Electron release entries removed; shared core/browser-common changesets retained where applicable.

🤖 Agent context

Autonomy: Human-driven (agent-assisted)

Pi and specialist workers implemented and checked the change using local tools, Git/gh, real Electron fixtures and the prescribed isolated Pi autoreview helper. The parent verified findings against code and runtime evidence. Human review is required before merge.

Stack

Merge the implementation PRs in dependency order. Electron is private, ignored by stable Changesets and absent from the stable npm publish matrix starting in #5696; intermediate merges cannot publish it. Only #5720 removes the private flag and enables the separate protected manual alpha path. Merging #5720 still does not publish automatically.

Order Change PR
1 Coordinated SDK and sample #5696
2 Native runtime and packaging #5699
3 Delivery and lifecycle #5713
4 Main/renderer API helpers #5714
5 DOM autocapture #5715
6 JavaScript errors #5716
7 React bindings #5717
8 Utility processes #5718
9 Acceptance adapters #5719
10 Alpha release and migration #5720

Current CI follow-up

Windows and Linux native and genuine Forge/Builder jobs passed on Electron 41.0.2, 42.4.0 and 43.0.0. The initial macOS jobs were canceled because GitHub retired macos-14 on November 2, 2026. Both new Electron workflows now select the supported macos-15 image. Updated macOS CI is pending. Local macOS installed-package fixtures pass. Published conformance and npm readiness remain separate gates.

Merge-safety cleanup

The temporary docs/plans/electron-sdk.md planning document is removed from the stack; local validation receipts remain ignored under target/. The built-export regression verifies actual Changesets release planning, private staging and the protected manual alpha boundary. It failed on the original stable Electron version bump and passes after cleanup. SDK runtime source is unchanged. Fresh CI results for these updated heads remain separate from historical runtime/conformance evidence.

…error-autocapture

# Conflicts:
#	packages/electron/README.md
#	packages/electron/src/__tests__/main.test.ts
#	packages/electron/src/__tests__/renderer.test.ts
#	packages/electron/src/main/index.ts
#	packages/electron/src/renderer/index.ts
…error-autocapture

# Conflicts:
#	packages/electron/src/__tests__/main.test.ts
…error-autocapture

# Conflicts:
#	packages/electron/src/__tests__/renderer.test.ts
#	packages/electron/src/renderer/index.ts
@github-actions

github-actions Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Coherence

📄 0 spec file errors · ⛔ 0 broken rules · 🚪 0 unchecked inputs · 🐛 0 bugs that came back

What is Coherence?

Coherence compares the code with its spec files (*.spec.md). A spec file lists the rules for one part of the code.

This check read 44 parts of the code and 7 rules.

Tip

Nothing to fix.

@github-actions

github-actions Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Node SDK acceptance v2

Commit: 9694885
Workflow run and artifacts

Capture v0

✅ 83 passed / ❌ 4 non-passing / ⚠️ 954 not selected

Drill-down: run artifacts → node-v2-v0 → acceptance/report.json.diagnostics.json (match case_id below).

❌ server_snapshot_payload_false — failed_assertion

Expected native data result

Code: snapshot_result

Failed step: acceptance/public/evaluate-flags.feature:868

the public snapshot outcomes should have these semantics:
❌ server_snapshot_payload_zero — failed_assertion

Expected native data result

Code: snapshot_result

Failed step: acceptance/public/evaluate-flags.feature:868

the public snapshot outcomes should have these semantics:
❌ server_snapshot_payload_null — failed_assertion

Expected native data result

Code: snapshot_result

Failed step: acceptance/public/evaluate-flags.feature:868

the public snapshot outcomes should have these semantics:
❌ migration/yaml-parity-v1/remote-flags-v1.feature::Omitted GeoIP settings default to enabled in flag requests — failed_assertion

Flags field differs

Code: flag_request_field

Failed step: migration/yaml-parity-v1/remote-flags-v1.feature:134

the first flags request field "geoip_disable" should equal JSON false

Operation: /flags/

Field: geoip_disable

Expected:

false

Actual value:

true

Harness exit: 1; report validation exit: 1.

Capture v1

✅ 148 passed / ❌ 4 non-passing / ⚠️ 889 not selected

Drill-down: run artifacts → node-v2-v1 → acceptance/report.json.diagnostics.json (match case_id below).

❌ server_snapshot_payload_false — failed_assertion

Expected native data result

Code: snapshot_result

Failed step: acceptance/public/evaluate-flags.feature:868

the public snapshot outcomes should have these semantics:
❌ server_snapshot_payload_zero — failed_assertion

Expected native data result

Code: snapshot_result

Failed step: acceptance/public/evaluate-flags.feature:868

the public snapshot outcomes should have these semantics:
❌ server_snapshot_payload_null — failed_assertion

Expected native data result

Code: snapshot_result

Failed step: acceptance/public/evaluate-flags.feature:868

the public snapshot outcomes should have these semantics:
❌ migration/yaml-parity-v1/remote-flags-v1.feature::Omitted GeoIP settings default to enabled in flag requests — failed_assertion

Flags field differs

Code: flag_request_field

Failed step: migration/yaml-parity-v1/remote-flags-v1.feature:134

the first flags request field "geoip_disable" should equal JSON false

Operation: /flags/

Field: geoip_disable

Expected:

false

Actual value:

true

Harness exit: 1; report validation exit: 1.

@github-actions

github-actions Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

SDK performance: posthog-node

3 changes worth reviewing: 3 observed improvements.

Flags require at least a 5% change in the median and all six pairs agreeing on direction. This is a noise filter, not proof of a performance change or a CI gate.

Test Measurement Before PR With PR Change
Evaluate a rollout flag Time per operation 37.27 µs/op 34.07 µs/op 8.6% less time
Evaluate a rollout flag Process CPU time per operation 39.44 µs/op 36.75 µs/op 6.8% less time
Capture and deliver events (32-byte payload, burst) Allocated memory per operation (estimated) 10.53 KiB/op 9.89 KiB/op 6.1% less memory
View all results
Test Measurement Before PR With PR Change Assessment
Capture and deliver events (32-byte payload, burst)
Shard: capture
Allocations per operation — — — unavailable; base:​ unsupported; head:​ unsupported; base:​ V8 samples do not expose total allocation count; sample count is not object count.​; head:​ V8 samples do not expose total allocation count; sample count is not object count.​
Capture and deliver events (4,096-byte payload, burst)
Shard: capture
Allocations per operation — — — unavailable; base:​ unsupported; head:​ unsupported; base:​ V8 samples do not expose total allocation count; sample count is not object count.​; head:​ V8 samples do not expose total allocation count; sample count is not object count.​
Capture and deliver events (32-byte payload, steady)
Shard: capture
Allocations per operation — — — unavailable; base:​ unsupported; head:​ unsupported; base:​ V8 samples do not expose total allocation count; sample count is not object count.​; head:​ V8 samples do not expose total allocation count; sample count is not object count.​
Capture and deliver events (4,096-byte payload, steady)
Shard: capture
Allocations per operation — — — unavailable; base:​ unsupported; head:​ unsupported; base:​ V8 samples do not expose total allocation count; sample count is not object count.​; head:​ V8 samples do not expose total allocation count; sample count is not object count.​
Queue an event (32-byte payload)
Shard: capture
Allocations per operation — — — unavailable; base:​ unsupported; head:​ unsupported; base:​ V8 samples do not expose total allocation count; sample count is not object count.​; head:​ V8 samples do not expose total allocation count; sample count is not object count.​
Queue an event (4,096-byte payload)
Shard: capture
Allocations per operation — — — unavailable; base:​ unsupported; head:​ unsupported; base:​ V8 samples do not expose total allocation count; sample count is not object count.​; head:​ V8 samples do not expose total allocation count; sample count is not object count.​
Evaluate all 10 flags
Shard: flags-scaling
Allocations per operation — — — unavailable; base:​ unsupported; head:​ unsupported; base:​ V8 samples do not expose total allocation count; sample count is not object count.​; head:​ V8 samples do not expose total allocation count; sample count is not object count.​
Evaluate all 100 flags
Shard: flags-scaling
Allocations per operation — — — unavailable; base:​ unsupported; head:​ unsupported; base:​ V8 samples do not expose total allocation count; sample count is not object count.​; head:​ V8 samples do not expose total allocation count; sample count is not object count.​
Evaluate all 1,000 flags
Shard: flags-scaling
Allocations per operation — — — unavailable; base:​ unsupported; head:​ unsupported; base:​ V8 samples do not expose total allocation count; sample count is not object count.​; head:​ V8 samples do not expose total allocation count; sample count is not object count.​
Evaluate one boolean flag
Shard: flags-single
Allocations per operation — — — unavailable; base:​ unsupported; head:​ unsupported; base:​ V8 samples do not expose total allocation count; sample count is not object count.​; head:​ V8 samples do not expose total allocation count; sample count is not object count.​
Evaluate a cohort-filtered flag
Shard: flags-single
Allocations per operation — — — unavailable; base:​ unsupported; head:​ unsupported; base:​ V8 samples do not expose total allocation count; sample count is not object count.​; head:​ V8 samples do not expose total allocation count; sample count is not object count.​
Evaluate a flag (early match)
Shard: flags-single
Allocations per operation — — — unavailable; base:​ unsupported; head:​ unsupported; base:​ V8 samples do not expose total allocation count; sample count is not object count.​; head:​ V8 samples do not expose total allocation count; sample count is not object count.​
Evaluate a flag (late match)
Shard: flags-single
Allocations per operation — — — unavailable; base:​ unsupported; head:​ unsupported; base:​ V8 samples do not expose total allocation count; sample count is not object count.​; head:​ V8 samples do not expose total allocation count; sample count is not object count.​
Evaluate a flag (no match)
Shard: flags-single
Allocations per operation — — — unavailable; base:​ unsupported; head:​ unsupported; base:​ V8 samples do not expose total allocation count; sample count is not object count.​; head:​ V8 samples do not expose total allocation count; sample count is not object count.​
Evaluate a property-filtered flag
Shard: flags-single
Allocations per operation — — — unavailable; base:​ unsupported; head:​ unsupported; base:​ V8 samples do not expose total allocation count; sample count is not object count.​; head:​ V8 samples do not expose total allocation count; sample count is not object count.​
Evaluate a regex-filtered flag
Shard: flags-single
Allocations per operation — — — unavailable; base:​ unsupported; head:​ unsupported; base:​ V8 samples do not expose total allocation count; sample count is not object count.​; head:​ V8 samples do not expose total allocation count; sample count is not object count.​
Evaluate a rollout flag
Shard: flags-single
Allocations per operation — — — unavailable; base:​ unsupported; head:​ unsupported; base:​ V8 samples do not expose total allocation count; sample count is not object count.​; head:​ V8 samples do not expose total allocation count; sample count is not object count.​
Evaluate a multivariate flag
Shard: flags-single
Allocations per operation — — — unavailable; base:​ unsupported; head:​ unsupported; base:​ V8 samples do not expose total allocation count; sample count is not object count.​; head:​ V8 samples do not expose total allocation count; sample count is not object count.​
Capture and deliver events (32-byte payload, burst)
Shard: capture
Allocated memory per operation (estimated) 10.53 KiB/op 9.89 KiB/op 6.1% less memory Worth reviewing: observed improvement
Capture and deliver events (32-byte payload, burst)
Shard: capture
Time per operation 23.58 µs/op 24.36 µs/op 3.3% more time Not flagged
Capture and deliver events (32-byte payload, burst)
Shard: capture
Idle process memory (RSS) 102.62 MiB 102.57 MiB <0.1% less memory Not flagged
Capture and deliver events (32-byte payload, burst)
Shard: capture
Observed peak process memory (RSS) 106.27 MiB 106.43 MiB 0.2% more memory Not flagged
Capture and deliver events (32-byte payload, burst)
Shard: capture
Managed heap after settling 10.08 MiB 10.08 MiB <0.1% less memory Not flagged
Capture and deliver events (32-byte payload, burst)
Shard: capture
Process memory after settling (RSS) 105.93 MiB 106.1 MiB 0.2% more memory Not flagged
Capture and deliver events (32-byte payload, burst)
Shard: capture
Process CPU time per operation 39.23 µs/op 41.49 µs/op 5.8% more time Not flagged
Capture and deliver events (32-byte payload, burst)
Shard: capture
Lifetime peak process memory (RSS) 106.48 MiB 106.6 MiB 0.1% more memory Not flagged
Capture and deliver events (4,096-byte payload, burst)
Shard: capture
Allocated memory per operation (estimated) 17.64 KiB/op 17.53 KiB/op 0.6% less memory Not flagged
Capture and deliver events (4,096-byte payload, burst)
Shard: capture
Time per operation 38.7 µs/op 38.68 µs/op <0.1% less time Not flagged
Capture and deliver events (4,096-byte payload, burst)
Shard: capture
Idle process memory (RSS) 102.38 MiB 102.48 MiB <0.1% more memory Not flagged
Capture and deliver events (4,096-byte payload, burst)
Shard: capture
Observed peak process memory (RSS) 113.69 MiB 113.7 MiB <0.1% more memory Not flagged
Capture and deliver events (4,096-byte payload, burst)
Shard: capture
Managed heap after settling 10.09 MiB 10.09 MiB <0.1% less memory Not flagged
Capture and deliver events (4,096-byte payload, burst)
Shard: capture
Process memory after settling (RSS) 109.57 MiB 109.6 MiB <0.1% more memory Not flagged
Capture and deliver events (4,096-byte payload, burst)
Shard: capture
Process CPU time per operation 55.76 µs/op 56.26 µs/op 0.9% more time Not flagged
Capture and deliver events (4,096-byte payload, burst)
Shard: capture
Lifetime peak process memory (RSS) 115.9 MiB 115.92 MiB <0.1% more memory Not flagged
Capture and deliver events (32-byte payload, steady)
Shard: capture
Allocated memory per operation (estimated) 10.37 KiB/op 10.71 KiB/op 3.3% more memory Not flagged
Capture and deliver events (32-byte payload, steady)
Shard: capture
Time per operation 23.79 µs/op 24.19 µs/op 1.7% more time Not flagged
Capture and deliver events (32-byte payload, steady)
Shard: capture
Idle process memory (RSS) 102.49 MiB 102.49 MiB <0.1% more memory Not flagged
Capture and deliver events (32-byte payload, steady)
Shard: capture
Observed peak process memory (RSS) 106.68 MiB 106.73 MiB <0.1% more memory Not flagged
Capture and deliver events (32-byte payload, steady)
Shard: capture
Managed heap after settling 10.16 MiB 10.16 MiB <0.1% less memory Not flagged
Capture and deliver events (32-byte payload, steady)
Shard: capture
Process memory after settling (RSS) 106.68 MiB 106.79 MiB 0.1% more memory Not flagged
Capture and deliver events (32-byte payload, steady)
Shard: capture
Process CPU time per operation 41.2 µs/op 41.38 µs/op 0.4% more time Not flagged
Capture and deliver events (32-byte payload, steady)
Shard: capture
Lifetime peak process memory (RSS) 106.98 MiB 107.15 MiB 0.2% more memory Not flagged
Capture and deliver events (4,096-byte payload, steady)
Shard: capture
Allocated memory per operation (estimated) 17.97 KiB/op 18.39 KiB/op 2.3% more memory Not flagged
Capture and deliver events (4,096-byte payload, steady)
Shard: capture
Time per operation 33.87 µs/op 33.99 µs/op 0.4% more time Not flagged
Capture and deliver events (4,096-byte payload, steady)
Shard: capture
Idle process memory (RSS) 102.83 MiB 102.87 MiB <0.1% more memory Not flagged
Capture and deliver events (4,096-byte payload, steady)
Shard: capture
Observed peak process memory (RSS) 109.61 MiB 109.22 MiB 0.4% less memory Not flagged
Capture and deliver events (4,096-byte payload, steady)
Shard: capture
Managed heap after settling 10.17 MiB 10.16 MiB <0.1% less memory Not flagged
Capture and deliver events (4,096-byte payload, steady)
Shard: capture
Process memory after settling (RSS) 108.38 MiB 108 MiB 0.4% less memory Not flagged
Capture and deliver events (4,096-byte payload, steady)
Shard: capture
Process CPU time per operation 51.21 µs/op 51.42 µs/op 0.4% more time Not flagged
Capture and deliver events (4,096-byte payload, steady)
Shard: capture
Lifetime peak process memory (RSS) 109.61 MiB 109.28 MiB 0.3% less memory Not flagged
Queue an event (32-byte payload)
Shard: capture
Allocated memory per operation (estimated) 8.64 KiB/op 8.24 KiB/op 4.5% less memory Not flagged
Queue an event (32-byte payload)
Shard: capture
Time per operation 16.72 µs/op 16.22 µs/op 2.9% less time Not flagged
Queue an event (32-byte payload)
Shard: capture
Process CPU time per operation 31.94 µs/op 30.74 µs/op 3.8% less time Not flagged
Queue an event (4,096-byte payload)
Shard: capture
Allocated memory per operation (estimated) 8.98 KiB/op 8.88 KiB/op 1% less memory Not flagged
Queue an event (4,096-byte payload)
Shard: capture
Time per operation 16.95 µs/op 17.54 µs/op 3.5% more time Not flagged
Queue an event (4,096-byte payload)
Shard: capture
Process CPU time per operation 32.51 µs/op 33.72 µs/op 3.7% more time Not flagged
Evaluate all 10 flags
Shard: flags-scaling
Allocated memory per operation (estimated) 132.28 KiB/op 132.1 KiB/op 0.1% less memory Not flagged
Evaluate all 10 flags
Shard: flags-scaling
Time per operation 127.65 µs/op 127.59 µs/op <0.1% less time Not flagged
Evaluate all 10 flags
Shard: flags-scaling
Process CPU time per operation 233.32 µs/op 233.55 µs/op <0.1% more time Not flagged
Evaluate all 100 flags
Shard: flags-scaling
Allocated memory per operation (estimated) 1.22 MiB/op 1.22 MiB/op <0.1% more memory Not flagged
Evaluate all 100 flags
Shard: flags-scaling
Time per operation 1.03 ms/op 1.04 ms/op 0.1% more time Not flagged
Evaluate all 100 flags
Shard: flags-scaling
Process CPU time per operation 1.82 ms/op 1.82 ms/op 0.4% less time Not flagged
Evaluate all 1,000 flags
Shard: flags-scaling
Allocated memory per operation (estimated) 12.16 MiB/op 12.09 MiB/op 0.6% less memory Not flagged
Evaluate all 1,000 flags
Shard: flags-scaling
Time per operation 12.15 ms/op 12.14 ms/op <0.1% less time Not flagged
Evaluate all 1,000 flags
Shard: flags-scaling
Process CPU time per operation 19.33 ms/op 19.31 ms/op <0.1% less time Not flagged
Evaluate 1,000 flags under concurrent load
Shard: flags-memory
Idle process memory (RSS) 272.03 MiB 273.21 MiB 0.4% more memory Not flagged
Evaluate 1,000 flags under concurrent load
Shard: flags-memory
Observed peak process memory (RSS) 272.03 MiB 273.21 MiB 0.4% more memory Not flagged
Evaluate 1,000 flags under concurrent load
Shard: flags-memory
Managed heap after settling 9.72 MiB 9.71 MiB <0.1% less memory Not flagged
Evaluate 1,000 flags under concurrent load
Shard: flags-memory
Process memory after settling (RSS) 271.8 MiB 272.68 MiB 0.3% more memory Not flagged
Evaluate 1,000 flags under concurrent load
Shard: flags-memory
Lifetime peak process memory (RSS) 273.41 MiB 274.56 MiB 0.4% more memory Not flagged
Refresh 1,000 flag definitions
Shard: flags-memory
Idle process memory (RSS) 227.93 MiB 227.36 MiB 0.2% less memory Not flagged
Refresh 1,000 flag definitions
Shard: flags-memory
Observed peak process memory (RSS) 241.03 MiB 240.36 MiB 0.3% less memory Not flagged
Refresh 1,000 flag definitions
Shard: flags-memory
Managed heap after settling 11.74 MiB 11.74 MiB <0.1% less memory Not flagged
Refresh 1,000 flag definitions
Shard: flags-memory
Process memory after settling (RSS) 236.78 MiB 236.12 MiB 0.3% less memory Not flagged
Refresh 1,000 flag definitions
Shard: flags-memory
Lifetime peak process memory (RSS) 243.36 MiB 242.51 MiB 0.3% less memory Not flagged
Evaluate one boolean flag
Shard: flags-single
Allocated memory per operation (estimated) 17.21 KiB/op 17 KiB/op 1.2% less memory Not flagged
Evaluate one boolean flag
Shard: flags-single
Time per operation 41.66 µs/op 42.79 µs/op 2.7% more time Not flagged
Evaluate one boolean flag
Shard: flags-single
Process CPU time per operation 44.44 µs/op 45.49 µs/op 2.4% more time Not flagged
Evaluate a cohort-filtered flag
Shard: flags-single
Allocated memory per operation (estimated) 14.3 KiB/op 14.26 KiB/op 0.3% less memory Not flagged
Evaluate a cohort-filtered flag
Shard: flags-single
Time per operation 22.8 µs/op 27.17 µs/op 19.2% more time Not flagged
Evaluate a cohort-filtered flag
Shard: flags-single
Process CPU time per operation 26.99 µs/op 30.64 µs/op 13.5% more time Not flagged
Evaluate a flag (early match)
Shard: flags-single
Allocated memory per operation (estimated) 17.59 KiB/op 17.57 KiB/op 0.2% less memory Not flagged
Evaluate a flag (early match)
Shard: flags-single
Time per operation 24.84 µs/op 24.51 µs/op 1.3% less time Not flagged
Evaluate a flag (early match)
Shard: flags-single
Process CPU time per operation 28.22 µs/op 28.16 µs/op 0.2% less time Not flagged
Evaluate a flag (late match)
Shard: flags-single
Allocated memory per operation (estimated) 22.31 KiB/op 22.29 KiB/op <0.1% less memory Not flagged
Evaluate a flag (late match)
Shard: flags-single
Time per operation 25.46 µs/op 24.94 µs/op 2% less time Not flagged
Evaluate a flag (late match)
Shard: flags-single
Process CPU time per operation 28.97 µs/op 28.53 µs/op 1.5% less time Not flagged
Evaluate a flag (no match)
Shard: flags-single
Allocated memory per operation (estimated) 16.99 KiB/op 16.93 KiB/op 0.4% less memory Not flagged
Evaluate a flag (no match)
Shard: flags-single
Time per operation 3.55 µs/op 3.51 µs/op 1% less time Not flagged
Evaluate a flag (no match)
Shard: flags-single
Process CPU time per operation 6.85 µs/op 6.79 µs/op 1% less time Not flagged
Evaluate a property-filtered flag
Shard: flags-single
Allocated memory per operation (estimated) 12.69 KiB/op 12.64 KiB/op 0.4% less memory Not flagged
Evaluate a property-filtered flag
Shard: flags-single
Time per operation 25.55 µs/op 24.31 µs/op 4.9% less time Not flagged
Evaluate a property-filtered flag
Shard: flags-single
Process CPU time per operation 28.54 µs/op 27.62 µs/op 3.2% less time Not flagged
Evaluate a regex-filtered flag
Shard: flags-single
Allocated memory per operation (estimated) 18.18 KiB/op 18.29 KiB/op 0.6% more memory Not flagged
Evaluate a regex-filtered flag
Shard: flags-single
Time per operation 50.13 µs/op 50.29 µs/op 0.3% more time Not flagged
Evaluate a regex-filtered flag
Shard: flags-single
Process CPU time per operation 52.56 µs/op 52.49 µs/op 0.1% less time Not flagged
Evaluate a rollout flag
Shard: flags-single
Allocated memory per operation (estimated) 14.24 KiB/op 14.34 KiB/op 0.7% more memory Not flagged
Evaluate a rollout flag
Shard: flags-single
Time per operation 37.27 µs/op 34.07 µs/op 8.6% less time Worth reviewing: observed improvement
Evaluate a rollout flag
Shard: flags-single
Process CPU time per operation 39.44 µs/op 36.75 µs/op 6.8% less time Worth reviewing: observed improvement
Evaluate a multivariate flag
Shard: flags-single
Allocated memory per operation (estimated) 17.47 KiB/op 17.49 KiB/op 0.1% more memory Not flagged
Evaluate a multivariate flag
Shard: flags-single
Time per operation 40.73 µs/op 43.55 µs/op 6.9% more time Not flagged
Evaluate a multivariate flag
Shard: flags-single
Process CPU time per operation 44.03 µs/op 46.62 µs/op 5.9% more time Not flagged

Values are medians of paired measurements. Not flagged does not mean unchanged. Unavailable means a measurement could not be provided, not zero. Estimated allocation measurements retain their instrumentation uncertainty. RSS measures the whole process, not just SDK allocations; observed peaks are sampled checkpoints. Paired ranges in the diagnostics describe variability, not confidence intervals.

Each shard uses its own runner; compare Before PR against With PR within a row, not across shards.

Compared eb76a337e794ed358b2bcb7b4811584e4a376044 → 9694885d60880b65e5304aabdc874b74db5d0ebb.

Full report and diagnostics

102 metric rows; 102 rows shown in all results. Omitted or shortened data remain in comparison.json, including per-runner environments, resource limits, measurement methods, samples and checkpoints.

@github-actions

Copy link
Copy Markdown
Contributor

📝 No Changeset Found

This PR doesn't include a changeset. A changeset is required to release a new version.

How to add a changeset

Run this command and follow the prompts:

pnpm changeset

Remember: Never use major version bumps for posthog-js as it's autoloaded by clients.

@github-actions

Copy link
Copy Markdown
Contributor
⚠️ `@posthog/electron` is modified but this PR has no changeset

This is informational — the PR is not blocked. Click the triangle above to collapse, or push a fix and this comment will auto-delete.

Modified in this PR but no changeset added:

  • @posthog/electron

If this change should ship, run pnpm changeset and select a bump level.
If it isn't user-facing (refactor with no behavior change, internal tooling, generated files), no action needed.

@marandaneto
marandaneto marked this pull request as ready for review November 13, 2026 12:34
@marandaneto
marandaneto requested a review from a team as a code owner November 13, 2026 12:34
@veria-ai

veria-ai Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

PR overview

No security issues were found in this pull request.

Reviews

@posthog-security-review-bot posthog-security-review-bot Bot added the security-review Request a security review label Nov 13, 2026
@posthog-security-review-bot

posthog-security-review-bot Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

✅ Security review complete — b25c5d845fde

No findings above the confidence threshold, in 8 min.

Add the security-review label to run again on the latest commit.

@posthog posthog Bot 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.

PostHog Review · Standard · reviewed b25c5d8: 1 Should fix.

See this review and its findings in PostHog Review. Comment @posthog review --deep for a Deep review. A Deep review takes longer and looks deeper than a Standard review.

Comment thread packages/electron/src/renderer/index.ts Resolved

@posthog-security-review-bot posthog-security-review-bot 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.

Agent-driven security review - no findings.

@posthog-security-review-bot posthog-security-review-bot Bot removed the security-review Request a security review label Nov 13, 2026
…error-autocapture

# Conflicts:
#	packages/electron/package.json
#	packages/electron/src/__tests__/main.test.ts
#	packages/electron/src/__tests__/renderer.test.ts
#	packages/electron/src/main/index.ts
#	packages/electron/src/renderer/index.ts

@posthog posthog Bot 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.

PostHog Review · Standard · reviewed 95a8bc6: 1 Should fix. This pull request is large, so the review ran in 4 parts with less depth than usual.

Comment thread packages/electron/src/renderer/index.ts Resolved
@marandaneto

Copy link
Copy Markdown
Member Author

Verified 43423903309: burst-4096 CPU rises 41.8725 → 45.2325 µs/op (+8.02%), all six pairs positive. Node/core/benchmark digests and the lockfile are identical between compared sources. Actual runtime is Node 24.22.3. No changed measured implementation was identified, but matching Linux same-build controls are absent, so attribution remains blocked rather than calling the warning noise.

@dustinbyrne dustinbyrne 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.

The opt-in observers preserve the existing capture ownership and host error handling. The earlier disabled-state issue is addressed. Two optional notes remain about pending-opt-out observation and merge-backup artifacts.

AI-assisted review.

Comment thread packages/electron/src/renderer/index.ts Resolved
Comment thread packages/electron/package.json.orig Resolved

This branch has not been deployed

No deployments
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.

2 participants