Repository navigation
build(types): exclude Vitest globals from production builds - #5748
marandaneto wants to merge 1 commit into
Conversation
📝 No Changeset FoundThis PR doesn't include a changeset. A changeset is required to release a new version. How to add a changesetRun this command and follow the prompts: pnpm changesetRemember: Never use |
|
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 ( This check read 44 parts of the code and 7 rules. Tip Nothing to fix. |
|
Size Change: 0 B Total Size: 27.4 MB ℹ️ View Unchanged
|
Node SDK acceptance v2Commit: 8d57cb8 Capture v0✅ 229 passed / ❌ 8 non-passing / Drill-down: run artifacts → ❌ server_snapshot_payload_false — failed_assertionExpected native data result Code: Failed step: acceptance/public/evaluate-flags.feature:868 the public snapshot outcomes should have these semantics: ❌ server_snapshot_payload_zero — failed_assertionExpected native data result Code: Failed step: acceptance/public/evaluate-flags.feature:868 the public snapshot outcomes should have these semantics: ❌ server_snapshot_payload_null — failed_assertionExpected native data result Code: 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_assertionFlags field differs Code: Failed step: migration/yaml-parity-v1/remote-flags-v1.feature:135 the first flags request field "geoip_disable" should equal JSON false Operation: Field: Expected: false Actual value: true ❌ migration/yaml-parity-v1/remote-flags-v4-legacy-getter.feature::Legacy getter reads reader fixture readers.dependency_error — failed_assertionGetter value differs Code: Failed step: migration/yaml-parity-v1/remote-flags-v4-legacy-getter.feature:1174 the public flag getter should return exactly JSON false Operation: Arguments: {"key":"garden-layout","distinct_id":"flags-v4-person"}
Expected: false Actual outcome: ❌ migration/yaml-parity-v1/remote-flags-v4-legacy-getter.feature::Legacy getter reads reader fixture readers.error — failed_assertionGetter value differs Code: Failed step: migration/yaml-parity-v1/remote-flags-v4-legacy-getter.feature:1213 the public flag getter should return exactly JSON false Operation: Arguments: {"key":"garden-layout","distinct_id":"flags-v4-person"}
Expected: false Actual outcome: ❌ migration/yaml-parity-v1/remote-flags-v4-legacy-getter.feature::Legacy getter reads reader fixture readers.error_with_value — failed_assertionGetter value differs Code: Failed step: migration/yaml-parity-v1/remote-flags-v4-legacy-getter.feature:1252 the public flag getter should return exactly JSON false Operation: Arguments: {"key":"garden-layout","distinct_id":"flags-v4-person"}
Expected: false Actual outcome: ❌ migration/yaml-parity-v1/remote-flags-v4-legacy-getter.feature::Legacy getter reads reader fixture readers.v1_failed — failed_assertionGetter value differs Code: Failed step: migration/yaml-parity-v1/remote-flags-v4-legacy-getter.feature:1425 the public flag getter should return exactly JSON false Operation: Arguments: {"key":"garden-layout","distinct_id":"flags-v4-person"}
Expected: false Actual outcome: Harness exit: 1; report validation exit: 1. Capture v1✅ 294 passed / ❌ 8 non-passing / Drill-down: run artifacts → ❌ server_snapshot_payload_false — failed_assertionExpected native data result Code: Failed step: acceptance/public/evaluate-flags.feature:868 the public snapshot outcomes should have these semantics: ❌ server_snapshot_payload_zero — failed_assertionExpected native data result Code: Failed step: acceptance/public/evaluate-flags.feature:868 the public snapshot outcomes should have these semantics: ❌ server_snapshot_payload_null — failed_assertionExpected native data result Code: 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_assertionFlags field differs Code: Failed step: migration/yaml-parity-v1/remote-flags-v1.feature:135 the first flags request field "geoip_disable" should equal JSON false Operation: Field: Expected: false Actual value: true ❌ migration/yaml-parity-v1/remote-flags-v4-legacy-getter.feature::Legacy getter reads reader fixture readers.dependency_error — failed_assertionGetter value differs Code: Failed step: migration/yaml-parity-v1/remote-flags-v4-legacy-getter.feature:1174 the public flag getter should return exactly JSON false Operation: Arguments: {"key":"garden-layout","distinct_id":"flags-v4-person"}
Expected: false Actual outcome: ❌ migration/yaml-parity-v1/remote-flags-v4-legacy-getter.feature::Legacy getter reads reader fixture readers.error — failed_assertionGetter value differs Code: Failed step: migration/yaml-parity-v1/remote-flags-v4-legacy-getter.feature:1213 the public flag getter should return exactly JSON false Operation: Arguments: {"key":"garden-layout","distinct_id":"flags-v4-person"}
Expected: false Actual outcome: ❌ migration/yaml-parity-v1/remote-flags-v4-legacy-getter.feature::Legacy getter reads reader fixture readers.error_with_value — failed_assertionGetter value differs Code: Failed step: migration/yaml-parity-v1/remote-flags-v4-legacy-getter.feature:1252 the public flag getter should return exactly JSON false Operation: Arguments: {"key":"garden-layout","distinct_id":"flags-v4-person"}
Expected: false Actual outcome: ❌ migration/yaml-parity-v1/remote-flags-v4-legacy-getter.feature::Legacy getter reads reader fixture readers.v1_failed — failed_assertionGetter value differs Code: Failed step: migration/yaml-parity-v1/remote-flags-v4-legacy-getter.feature:1425 the public flag getter should return exactly JSON false Operation: Arguments: {"key":"garden-layout","distinct_id":"flags-v4-person"}
Expected: false Actual outcome: Harness exit: 1; report validation exit: 1. |
SDK performance: posthog-nodeBenchmarks 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
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 102 metric rows; 102 rows shown in all results. Omitted or shortened data remain in |
PR overviewNo security issues were found in this pull request. Reviews
|
|
✅ Security review complete — No findings above the confidence threshold, in 2 min. Add the |
Problem
The
@posthog/typesproduction build inherits Vitest globals and the shared Vitest compatibility shim. These resolve to two Vitest declaration copies with different Node typing peers. Neither is needed by the production source.This was found while investigating the
TS2321andTS2717failures in #5720. The duplicate compiler inputs reproduce on main. The intermittent CI compiler error itself has not reproduced locally.Changes
The new regression fails before the config fix and passes afterward. The package build, type check, all five tests, lint and formatting pass on macOS arm64 with Node 24.21.0 and pnpm 11.7.0. All 60 production build artifacts match their pre-fix SHA-256 hashes.
Autoreview passed for
8d57cb8f891bb2faf341e801b32279499f761864using the isolated Pi helper withopenai-codex/gpt-6.1-sol. It reported no actionable findings. Windows and Linux validation are left to CI.This PR targets main independently of the Electron stack. It changes no SDK source, dependencies, lockfile or shared configuration.
Release info Sub-libraries affected
Libraries affected
No library needs a version bump. This is a build-only change with identical production artifacts, so no changeset is included.
Checklist
If releasing new changes
pnpm changesetto generate a changeset file🤖 Agent context
Autonomy: Human-driven (agent-assisted)
Prepared with Pi, Git, pnpm and the isolated Pi autoreview helper. The fix stays in the package's production config rather than changing dependency versions or shared test settings. Human review is required.