Skip to content

test(node): cover server identify and alias delivery in v2 adapter - #5070

Open
dustinbyrne wants to merge 1 commit into
mainfrom
feat/node-identify-alias-compliance
Open

dustinbyrne wants to merge 1 commit into
mainfrom
feat/node-identify-alias-compliance

Conversation

@dustinbyrne

Copy link
Copy Markdown
Contributor

Problem

The Node v2 compliance adapter cannot yet exercise server identify and alias delivery in the existing acceptance features.

Changes

  • Add negotiated /identify and /alias routes to the compliance adapter only. Identify maps distinct_id to distinctId and wraps the literal supplied set under public properties.$set; alias maps the previous distinct_id and target alias to the public SDK call. Preserve omitted values, native errors and native void results.
  • Add mapping and real installed-package HTTP tests across CJS/ESM and v0/v1. Document the routes.
  • Works with sdk-specs #75 and harness #65. Four server examples are opt-in by case ID; CI selection and the released harness image digest remain unchanged.

Release info Sub-libraries affected

Libraries affected

No publishable SDK library changed; the changes are limited to compliance/node/v2. No changeset or SDK version bump.

Checklist

  • Tests for new code
  • Accounted for impact across CJS/ESM and v0/v1 profiles
  • Public SDK API and default behavior unchanged
  • Published bundle size unchanged

Validation

  • Fresh Docker image from current branch: 113 adapter/caller tests passed.
  • Fresh local harness image with updated specs: 4 selected server examples passed and 4 existing cases not selected in both Node profiles; strict report check and wrappers exited 0. This establishes delivery for these cases, not client identity or private-queue conformance.
  • Commit hooks (Oxlint/Oxfmt) passed.

🤖 Agent context

Autonomy: Human-driven (agent-assisted)

The human directed the public-delivery approach and chose to update existing acceptance features. Pi coding agent and a read-only reviewer assisted with the adapter, controlled and installed-package tests, and cross-repository validation. The agent session is local and not publicly linked. @dustinbyrne is the DRI.

@dustinbyrne
dustinbyrne requested a review from a team as a code owner September 22, 2026 19:21
@dustinbyrne dustinbyrne self-assigned this Sep 22, 2026
@dustinbyrne
dustinbyrne added this pull request to stack #5053 September 22, 2026 19:21
@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.

@greptile-apps

greptile-apps Bot commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

Retrigger

The PR appears safe to merge; no actionable correctness, security, or repository-rule violations were identified.

Reviews (1) · Last reviewed commit: "test(node): bind identify and alias for ..."

@github-actions

github-actions Bot commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

Node SDK compliance v2

Commit: c3e10f4
Workflow run and artifacts

Capture v0

✅ 55 passed / ❌ 1 non-passing / ⚠️ 101 not selected

Drill-down: run artifactsnode-v2-v0reports/report.json.diagnostics.json (match case_id below).

❌ migration:yaml-parity-v1:feature_flags:disable_geoip_omitted_defaults_to_false — failed_assertion

Flags field differs

Code: flag_request_field

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

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

✅ 120 passed / ❌ 1 non-passing / ⚠️ 36 not selected

Drill-down: run artifactsnode-v2-v1reports/report.json.diagnostics.json (match case_id below).

❌ migration:yaml-parity-v1:feature_flags:disable_geoip_omitted_defaults_to_false — failed_assertion

Flags field differs

Code: flag_request_field

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

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.

@marandaneto marandaneto left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code looks good; no qualifying findings. Verdict: correct.

Base automatically changed from ci/node-v2-harness to main September 23, 2026 18:49
@dustinbyrne
dustinbyrne force-pushed the feat/node-identify-alias-compliance branch from eb35b56 to c3e10f4 Compare September 23, 2026 18:49

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