Skip to content

feat(electron): instrument trusted utility processes - #5718

Open
marandaneto wants to merge 23 commits into
feat/electron-react-bindingsfrom
feat/electron-utility-process
Open

marandaneto wants to merge 23 commits into
feat/electron-react-bindingsfrom
feat/electron-utility-process

Conversation

@marandaneto

@marandaneto marandaneto commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

Problem

The Electron alpha needs coordinated instrumentation in helper processes.

Changes

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

Add @posthog/electron/utility and explicit main registration of a trusted utilityProcess.fork() result. Utility clients share main identity, consent, sessions, flags and delivery instead of creating another SDK owner.

Validate connection tokens, message size, rate, ordering and identity generation. Assign process context in main and revoke pending work when a child exits or registration closes. Keep reloads outside the mutation lock. Utility registration has one documented client lifetime; automatic DOM/error options are not exposed there.

Validation and limits

193 unit tests, seven built checks, types/build and genuine installed-tarball utilityProcess tests passed on macOS. Tests cover protected attribution, flags, consent/reset, pending close, unexpected exit and replacement sources. Actual ordinary-Node import/manual-exception proof verifies no browser globals are required.

Optional observer definitions may be present in the reused facade, but are not installed in utility processes. Windows/Linux packaged utility validation remains pending.

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.

Final review warning about filling 100 pending utility requests was rejected after checking the real facade: requests await the prior bridge response through its promise queue, so supported fire-and-forget calls cannot fill that main-side set. Request timeout closes the bridge. Raw-protocol misuse is not a supported client path.

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.

@github-actions

github-actions Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Coherence

📄 0 spec file errors · ⛔ 0 broken rules · 🚪 2 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.

Note

These findings do not make this check fail.

None of these findings are in files that this pull request changes. You do not need to fix them in this pull request.

🚪 Unchecked inputs (2)

  • public api in packages/web/Web.spec.md. The input comes from: host-app.
  • webpack plugin in packages/webpack-plugin/Webpack-plugin.spec.md. The input comes from: build.
What this means and how to fix it

Input from outside this code comes in at these places. The spec does not say what checks that input. 10 more places were already like this when Coherence was added. This list does not show them.

To close one of these, find the place by its name in the ## entrances section of its spec file. Add one line under it:

  • If all of the input goes through one function that a rule in the spec protects, add guard: <function>.
  • If a rule in the spec already checks input from the same source, add the place's name to the entrances: line of that rule.
  • If the input needs no check, add control: none - <reason>.

To get the line to add, run npx --no -- coherence scaffold control "<name>".

@github-actions

github-actions Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Node SDK acceptance v2

Commit: 96a9d2d
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 13, 2026 •

Copy link
Copy Markdown
Contributor

SDK performance: posthog-node

Benchmarks completed. No changes flagged for review.

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.

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.92 KiB/op 10.05 KiB/op 8% less memory Not flagged
Capture and deliver events (32-byte payload, burst)
Shard: capture
Time per operation 21.77 µs/op 22.15 µs/op 1.7% more time Not flagged
Capture and deliver events (32-byte payload, burst)
Shard: capture
Idle process memory (RSS) 102.54 MiB 102.46 MiB <0.1% less memory Not flagged
Capture and deliver events (32-byte payload, burst)
Shard: capture
Observed peak process memory (RSS) 106.34 MiB 106.25 MiB <0.1% less 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) 106.13 MiB 105.95 MiB 0.2% less memory Not flagged
Capture and deliver events (32-byte payload, burst)
Shard: capture
Process CPU time per operation 36.95 µs/op 37.29 µs/op 0.9% more time Not flagged
Capture and deliver events (32-byte payload, burst)
Shard: capture
Lifetime peak process memory (RSS) 106.56 MiB 106.49 MiB <0.1% less memory Not flagged
Capture and deliver events (4,096-byte payload, burst)
Shard: capture
Allocated memory per operation (estimated) 17.31 KiB/op 17.49 KiB/op 1% more memory Not flagged
Capture and deliver events (4,096-byte payload, burst)
Shard: capture
Time per operation 38.37 µs/op 38.68 µs/op 0.8% more time Not flagged
Capture and deliver events (4,096-byte payload, burst)
Shard: capture
Idle process memory (RSS) 102.36 MiB 102.51 MiB 0.1% more memory Not flagged
Capture and deliver events (4,096-byte payload, burst)
Shard: capture
Observed peak process memory (RSS) 113.88 MiB 113.83 MiB <0.1% less 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.77 MiB 109.69 MiB <0.1% less memory Not flagged
Capture and deliver events (4,096-byte payload, burst)
Shard: capture
Process CPU time per operation 55.18 µs/op 54.9 µs/op 0.5% less time Not flagged
Capture and deliver events (4,096-byte payload, burst)
Shard: capture
Lifetime peak process memory (RSS) 116.18 MiB 116.13 MiB <0.1% less memory Not flagged
Capture and deliver events (32-byte payload, steady)
Shard: capture
Allocated memory per operation (estimated) 9.98 KiB/op 10.37 KiB/op 3.9% more memory Not flagged
Capture and deliver events (32-byte payload, steady)
Shard: capture
Time per operation 23.41 µs/op 23.62 µs/op 0.9% more time Not flagged
Capture and deliver events (32-byte payload, steady)
Shard: capture
Idle process memory (RSS) 102.57 MiB 102.44 MiB 0.1% less memory Not flagged
Capture and deliver events (32-byte payload, steady)
Shard: capture
Observed peak process memory (RSS) 106.58 MiB 106.64 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.62 MiB 106.76 MiB 0.1% more memory Not flagged
Capture and deliver events (32-byte payload, steady)
Shard: capture
Process CPU time per operation 39.13 µs/op 39.66 µs/op 1.4% more time Not flagged
Capture and deliver events (32-byte payload, steady)
Shard: capture
Lifetime peak process memory (RSS) 106.77 MiB 106.93 MiB 0.2% more memory Not flagged
Capture and deliver events (4,096-byte payload, steady)
Shard: capture
Allocated memory per operation (estimated) 17.57 KiB/op 17.36 KiB/op 1.2% less memory Not flagged
Capture and deliver events (4,096-byte payload, steady)
Shard: capture
Time per operation 34.17 µs/op 33.57 µs/op 1.8% less time Not flagged
Capture and deliver events (4,096-byte payload, steady)
Shard: capture
Idle process memory (RSS) 102.97 MiB 102.83 MiB 0.1% less memory Not flagged
Capture and deliver events (4,096-byte payload, steady)
Shard: capture
Observed peak process memory (RSS) 109.39 MiB 109.65 MiB 0.2% more 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.21 MiB 108.45 MiB 0.2% more memory Not flagged
Capture and deliver events (4,096-byte payload, steady)
Shard: capture
Process CPU time per operation 51.43 µs/op 50.59 µs/op 1.6% less time Not flagged
Capture and deliver events (4,096-byte payload, steady)
Shard: capture
Lifetime peak process memory (RSS) 109.43 MiB 109.65 MiB 0.2% more memory Not flagged
Queue an event (32-byte payload)
Shard: capture
Allocated memory per operation (estimated) 8.82 KiB/op 8.42 KiB/op 4.6% less memory Not flagged
Queue an event (32-byte payload)
Shard: capture
Time per operation 17.09 µs/op 17.28 µs/op 1.1% more time Not flagged
Queue an event (32-byte payload)
Shard: capture
Process CPU time per operation 33.35 µs/op 32.3 µs/op 3.1% less time Not flagged
Queue an event (4,096-byte payload)
Shard: capture
Allocated memory per operation (estimated) 8.66 KiB/op 8.7 KiB/op 0.5% more memory Not flagged
Queue an event (4,096-byte payload)
Shard: capture
Time per operation 17.26 µs/op 16.16 µs/op 6.4% less time Not flagged
Queue an event (4,096-byte payload)
Shard: capture
Process CPU time per operation 32.66 µs/op 31.11 µs/op 4.7% less time Not flagged
Evaluate all 10 flags
Shard: flags-scaling
Allocated memory per operation (estimated) 131.54 KiB/op 133.26 KiB/op 1.3% more memory Not flagged
Evaluate all 10 flags
Shard: flags-scaling
Time per operation 288.17 µs/op 286.23 µs/op 0.7% less time Not flagged
Evaluate all 10 flags
Shard: flags-scaling
Process CPU time per operation 448.71 µs/op 447.09 µs/op 0.4% less time Not flagged
Evaluate all 100 flags
Shard: flags-scaling
Allocated memory per operation (estimated) 1.22 MiB/op 1.23 MiB/op 0.6% more memory Not flagged
Evaluate all 100 flags
Shard: flags-scaling
Time per operation 2.4 ms/op 2.41 ms/op 0.4% more time Not flagged
Evaluate all 100 flags
Shard: flags-scaling
Process CPU time per operation 3.69 ms/op 3.7 ms/op 0.4% more time Not flagged
Evaluate all 1,000 flags
Shard: flags-scaling
Allocated memory per operation (estimated) 12.17 MiB/op 12.14 MiB/op 0.2% less memory Not flagged
Evaluate all 1,000 flags
Shard: flags-scaling
Time per operation 25.73 ms/op 25.76 ms/op 0.1% more time Not flagged
Evaluate all 1,000 flags
Shard: flags-scaling
Process CPU time per operation 37.7 ms/op 37.74 ms/op 0.1% more time Not flagged
Evaluate 1,000 flags under concurrent load
Shard: flags-memory
Idle process memory (RSS) 284.95 MiB 271.91 MiB 4.6% less memory Not flagged
Evaluate 1,000 flags under concurrent load
Shard: flags-memory
Observed peak process memory (RSS) 284.95 MiB 271.91 MiB 4.6% less memory Not flagged
Evaluate 1,000 flags under concurrent load
Shard: flags-memory
Managed heap after settling 9.71 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) 283.74 MiB 271.04 MiB 4.5% less memory Not flagged
Evaluate 1,000 flags under concurrent load
Shard: flags-memory
Lifetime peak process memory (RSS) 285.7 MiB 272.41 MiB 4.7% less memory Not flagged
Refresh 1,000 flag definitions
Shard: flags-memory
Idle process memory (RSS) 227.87 MiB 225.73 MiB 0.9% less memory Not flagged
Refresh 1,000 flag definitions
Shard: flags-memory
Observed peak process memory (RSS) 239.9 MiB 240.02 MiB <0.1% more memory Not flagged
Refresh 1,000 flag definitions
Shard: flags-memory
Managed heap after settling 11.74 MiB 11.73 MiB <0.1% less memory Not flagged
Refresh 1,000 flag definitions
Shard: flags-memory
Process memory after settling (RSS) 234.72 MiB 235.22 MiB 0.2% more memory Not flagged
Refresh 1,000 flag definitions
Shard: flags-memory
Lifetime peak process memory (RSS) 241.02 MiB 241.67 MiB 0.3% more memory Not flagged
Evaluate one boolean flag
Shard: flags-single
Allocated memory per operation (estimated) 17.13 KiB/op 17.09 KiB/op 0.2% less memory Not flagged
Evaluate one boolean flag
Shard: flags-single
Time per operation 52.38 µs/op 52.74 µs/op 0.7% more time Not flagged
Evaluate one boolean flag
Shard: flags-single
Process CPU time per operation 58.29 µs/op 58.81 µs/op 0.9% more time Not flagged
Evaluate a cohort-filtered flag
Shard: flags-single
Allocated memory per operation (estimated) 14.21 KiB/op 14.3 KiB/op 0.6% more memory Not flagged
Evaluate a cohort-filtered flag
Shard: flags-single
Time per operation 29.54 µs/op 28.96 µs/op 2% less time Not flagged
Evaluate a cohort-filtered flag
Shard: flags-single
Process CPU time per operation 35.89 µs/op 35.02 µs/op 2.4% less time Not flagged
Evaluate a flag (early match)
Shard: flags-single
Allocated memory per operation (estimated) 17.62 KiB/op 17.53 KiB/op 0.5% less memory Not flagged
Evaluate a flag (early match)
Shard: flags-single
Time per operation 30.15 µs/op 29.78 µs/op 1.2% less time Not flagged
Evaluate a flag (early match)
Shard: flags-single
Process CPU time per operation 35.87 µs/op 35.37 µs/op 1.4% less time Not flagged
Evaluate a flag (late match)
Shard: flags-single
Allocated memory per operation (estimated) 22.34 KiB/op 22.17 KiB/op 0.8% less memory Not flagged
Evaluate a flag (late match)
Shard: flags-single
Time per operation 30.38 µs/op 30.11 µs/op 0.9% less time Not flagged
Evaluate a flag (late match)
Shard: flags-single
Process CPU time per operation 35.98 µs/op 35.57 µs/op 1.1% less time Not flagged
Evaluate a flag (no match)
Shard: flags-single
Allocated memory per operation (estimated) 16.77 KiB/op 17.07 KiB/op 1.8% more memory Not flagged
Evaluate a flag (no match)
Shard: flags-single
Time per operation 4.45 µs/op 4.26 µs/op 4.2% less time Not flagged
Evaluate a flag (no match)
Shard: flags-single
Process CPU time per operation 8.17 µs/op 7.9 µs/op 3.4% less time Not flagged
Evaluate a property-filtered flag
Shard: flags-single
Allocated memory per operation (estimated) 12.76 KiB/op 12.71 KiB/op 0.4% less memory Not flagged
Evaluate a property-filtered flag
Shard: flags-single
Time per operation 29.25 µs/op 28.36 µs/op 3.1% less time Not flagged
Evaluate a property-filtered flag
Shard: flags-single
Process CPU time per operation 34.68 µs/op 33.66 µs/op 2.9% less time Not flagged
Evaluate a regex-filtered flag
Shard: flags-single
Allocated memory per operation (estimated) 18.25 KiB/op 18.18 KiB/op 0.4% less memory Not flagged
Evaluate a regex-filtered flag
Shard: flags-single
Time per operation 56.09 µs/op 56.15 µs/op <0.1% more time Not flagged
Evaluate a regex-filtered flag
Shard: flags-single
Process CPU time per operation 62.52 µs/op 62.01 µs/op 0.8% less time Not flagged
Evaluate a rollout flag
Shard: flags-single
Allocated memory per operation (estimated) 14.34 KiB/op 14.26 KiB/op 0.5% less memory Not flagged
Evaluate a rollout flag
Shard: flags-single
Time per operation 39.89 µs/op 40.17 µs/op 0.7% more time Not flagged
Evaluate a rollout flag
Shard: flags-single
Process CPU time per operation 45.59 µs/op 46.21 µs/op 1.4% more time Not flagged
Evaluate a multivariate flag
Shard: flags-single
Allocated memory per operation (estimated) 17.49 KiB/op 17.56 KiB/op 0.4% more memory Not flagged
Evaluate a multivariate flag
Shard: flags-single
Time per operation 50.93 µs/op 52.44 µs/op 3% more time Not flagged
Evaluate a multivariate flag
Shard: flags-single
Process CPU time per operation 56.11 µs/op 58.7 µs/op 4.6% 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 541f7925ebe438fb644c9e837e0847d05edc0b9b → 96a9d2dead23e3d413183bfca2d712e26ba4eaf3.

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 — e2bd0c449c32

No findings above the confidence threshold, in 7 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 e2bd0c4: 4 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/utility/attach.ts Resolved
Comment thread packages/electron/src/utility/attach.ts Resolved
Comment thread packages/electron/src/utility/bridge.ts Resolved
Comment thread packages/electron/src/utility/attach.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
@marandaneto

Copy link
Copy Markdown
Member Author

Changeset note: these warnings are expected. Electron is intentionally private across the implementation PRs (#5696–#5719), is in the Changesets ignore list, and is absent from the stable publish matrix, so merging them cannot version or publish it. Shared changes keep their own changesets: @posthog/core (extension hooks) and, from #5715, @posthog/browser-common/posthog-js (composed-tree autocapture privacy fix). Only #5720 removes private and enables the protected manual alpha path; it does not publish on merge.

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

Three earlier transport issues are resolved. The slow-flush terminal disconnect remains unresolved; please settle its recovery/lifecycle behavior before approval.

AI-assisted review.

Comment thread packages/electron/src/utility/bridge.ts Resolved
@dustinbyrne
dustinbyrne requested a review from a team November 13, 2026 21:04

@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 8beba89: no findings. This pull request is large, so the review ran in 4 parts with less depth than usual.

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