Skip to content

FE-3106 test(billing): expect the lifecycle started event to carry its operation id - #19648

Merged
dante01yoon merged 1 commit into
mainfrom
jaewon/fe-3106-expect-the-lifecycle-started-event-to-carry-its-operation-id
Sep 30, 2026
Merged

dante01yoon merged 1 commit into
mainfrom
jaewon/fe-3106-expect-the-lifecycle-started-event-to-carry-its-operation-id

Conversation

@dante01yoon

@dante01yoon dante01yoon commented Sep 30, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Make the SDK-rail ownership test expect the operation id on a lifecycle-sent started event. Two rows of that test fail on main today.

Why

Unit tests that run against main fail on billingSdkTelemetryOwnership.test.ts, so every branch that merges with main inherits two red rows.

Root cause

Two merged PRs each passed CI on their own and were never run together. FE-3110 (#19623) made the SDK event mapper keep billing_op_id on started. FE-3106 (#19620), branched earlier, added the ownership test with STARTED = { stage: 'started' }, which asserts the pre-FE-3110 shape. The rows where the lifecycle, not the caller, sends started (a checkout that reports no started, and resubscribe) now receive the id and fail.

How

A separate LIFECYCLE_STARTED expectation carries billing_op_id: 'op-1' and is used by exactly those two rows. STARTED stays as is for the rows where the caller sends started, which has no operation id yet. Test-only change, no production code.

Review Focus

  • The caller's started still has no id, so the two expectations are deliberately different.
  • UnifiedPricingTable.test.ts ("prompts free-tier users to subscribe") fails locally on origin/main too (INTERNAL ASSERTION FAILED: Expected a class definition, local Node 24 against engine 26). This diff does not touch it.

AS IS / TO BE

AS IS: AS IS at 934af0705e: 2 of 12 rows failed. a checkout that reports no started subscribes and resubscribe succeeds receive started with billing_op_id op-1 while the row expects STARTED with no billing_op_id; the vitest diff shows the added billing_op_id on started

TO BE: TO BE at 6adcac8aa2: 12 of 12 rows passed. The same two rows now expect LIFECYCLE_STARTED with billing_op_id op-1 and match the received events; the other ten rows are unchanged

The evidence is the ownership test's result on main and on this branch: 2 failed, 10 passed before; 12 passed after.

Where this sits in the plan

Linear: FE-3106, part of FE-3105. Plan, event catalog and dependency graph: action items.

Task Ticket What Status
T1 FE-3107 Decide vocabulary and dimensions todo
T2 FE-3108 Decide RUM application and env mapping todo
T3 FE-3109 Billing web telemetry bootstrap (RUM and PostHog) todo
T4, F1 FE-3106 SDK-rail ownership PR 19620, merged; this PR fixes its test on main
T4, F2 FE-3110 Keep operation id and fields in the mapper PR 19623, merged
T4, F3 FE-3111 Stamp billing_surface and billing_client todo
T4, F5 FE-3112 SDK top-up terminals PR 19628, in review
T4, F6 FE-3113 Downgrade reconciliation terminal PR 19622, merged
T4, F7 FE-3114 Legacy personal-rail events PR 19627, merged (first slice); rest in FE-3131
T5 FE-3115 Cloud entry fidelity and Datadog parity todo
T6 FE-3116 Handoff contract and event todo
T7 FE-3117 Billing web attempt lifecycle todo
T8 FE-3118 Billing web journey and choices todo
T9 FE-3119 Payment friction events todo
T10 FE-3120 Billing web entry, session and return todo
T11 FE-3121 Portal events todo
T12 FE-3122 Flag coverage check todo
T13 FE-3123 PostHog rollout dashboard todo
T14 FE-3124 Datadog health tiles todo
T15 FE-3125 Verification per flow todo
T16 FE-3126 Rollout plan todo

@dante01yoon
dante01yoon requested a review from a team September 30, 2026 17:50
@dante01yoon dante01yoon added needs-backport Fix/change that needs to be cherry-picked to the current feature freeze branch core/1.55 Backport PRs for core 1.55 cloud/1.55 Backport PRs for cloud 1.55 labels Sep 30, 2026
@github-actions

github-actions Bot commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

🎨 Storybook: ✅ Built — View Storybook

Details

⏰ Completed at: 09/30/2026, 05:52:06 PM UTC

Links

🧩 Custom Nodes Ecosystem Matrix: 🟡 Withheld — could not measure

Executes the frontend JS of every registry pack that ships any, against this change, in both renderers. The eight ecosystem-matrix shard checks are a harness self-test; the pack verdict is matrix-verdict.

This candidate changes nothing the matrix measures, so every expensive stage was skipped.

Reproduce locally
# build one shard's fixture, then run it
python3 scripts/registry-census/build_matrix.py --shard 1/4
MATRIX_RENDERER=vue MATRIX_VUE=1 \
  npx vitest run --config vitest.matrix.config.mts

Full docs: scripts/registry-census/README.md

🌾 Fallow: ✅ Passed

Fallow audits the diff for duplication, complexity and dead code. It gates on new findings only, so when the audit completes, a red is something this PR introduced or moved — never inherited backlog. A red can also mean the audit itself did not finish; the details below say which happened.

No new findings in the changed files.

Reproduce locally
# the base the gate compared against
npx fallow audit --root . --quiet --format json \
  --changed-since 934af0705efb127c9c9530e98a5531bff88aba05

Full docs: ADR-DEVEX-LINT-0015

@github-actions github-actions Bot added the risk:xhigh PR risk grade (advisory shadow check; grader-owned) label Sep 30, 2026
@coderabbitai

coderabbitai Bot commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: Comfy-Org/ComfyUI_frontend/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 23e74819-853f-4ba1-8e7c-10714d94cf35

📥 Commits

Reviewing files that changed from the base of the PR and between 934af07 and 6adcac8.

📒 Files selected for processing (1)
  • src/platform/workspace/billing/sdk/billingSdkTelemetryOwnership.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 3 remain after this review.


📝 Walkthrough

Walkthrough

The telemetry test adds a started lifecycle event that includes billing_op_id: 'op-1'. The legacy Stripe checkout subscribe and resubscribe expectations now use this event.

Changes

Billing telemetry tests

Layer / File(s) Summary
Lifecycle event expectations
src/platform/workspace/billing/sdk/billingSdkTelemetryOwnership.test.ts
Adds a started lifecycle event with op-1. The legacy Stripe checkout subscribe and resubscribe cases now expect this event.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~3 minutes

Change: Other

Merge Risk: ⚪ Minimal · up to 6adca

The checkout and resubscribe expectations match the emitted lifecycle event. No actionable merge-blocking risk remains.

🚥 Pre-merge checks | ✅ 7
✅ Passed checks (7 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
End-To-End Regression Coverage For Fixes ✅ Passed PASS. The PR title and commit subject do not contain bug-fix language. The custom check therefore does not apply, regardless of the changed test file or browser_tests coverage.
Website End-To-End Regression Coverage ✅ Passed The PR changes only src/platform/workspace/billing/sdk/billingSdkTelemetryOwnership.test.ts. It does not change files under apps/website/src/ or apps/website/public/, so this website-specific ch…
Adr Compliance For Entity/Litegraph Changes ✅ Passed The changed-file list contains only src/platform/workspace/billing/sdk/billingSdkTelemetryOwnership.test.ts. It does not modify src/lib/litegraph/, src/ecs/, or files related to graph entities. …
Title check ✅ Passed The title clearly and concisely describes the test change: it updates the billing test to expect the lifecycle started event to include its operation ID.
Description check ✅ Passed The description is complete and relevant. It explains the failure, root cause, fix, test-only scope, review focus, evidence, and related plan. It does not use the exact Changes heading or explicitly l…
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

@@            Coverage Diff             @@
##             main   #19648      +/-   ##
==========================================
+ Coverage   84.45%   85.20%   +0.75%     
==========================================
  Files        3345     2357     -988     
  Lines      161299   135267   -26032     
  Branches    43845    36422    -7423     
==========================================
- Hits       136233   115261   -20972     
+ Misses      23169    19644    -3525     
+ Partials     1897      362    -1535     
Flag Coverage Δ
billing-web-unit ?
unit 81.73% <ø> (+0.01%) ⬆️
website-unit ?

Flags with carried forward coverage won't be shown. Click here to find out more.
see 1001 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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

Approved. The two lifecycle-owned expectations now match the merged mapper contract: started retains billing_op_id.

Full context for agent readers

Reviewed the complete test-only diff at 6adcac8aa239e435f0477b753e7cbfb2fe7e3682. The change is limited to the legacy subscribe and workspace resubscribe rows that receive lifecycle-owned started events; the caller-owned rows remain unchanged. Exact-head CI is settled green and there are no unresolved review threads.

@dante01yoon
dante01yoon added this pull request to the merge queue Sep 30, 2026
Merged via the queue into main with commit 8481295 Sep 30, 2026
123 of 125 checks passed
@dante01yoon
dante01yoon deleted the jaewon/fe-3106-expect-the-lifecycle-started-event-to-carry-its-operation-id branch September 30, 2026 18:33
@comfy-pr-bot

Copy link
Copy Markdown
Member

⚠️ Backport to core/1.55 failed

Reason: Merge conflicts detected during cherry-pick of 8481295

The auto-backport could not be completed automatically. Please backport
manually onto branch backport-19648-to-core-1.55 (from origin/core/1.55) and
open a PR to core/1.55.

This may be a stacking conflict rather than a real one. #19646, #19631 are still open against core/1.55. If this PR sits on top of any of them, the conflict will disappear once they merge — wait for that, then remove and re-add the needs-backport label to re-run this workflow.

📄 Conflicting files
src/platform/workspace/billing/sdk/billingSdkTelemetryOwnership.test.ts
🤖 Prompt for AI Agents
Backport PR #19648 (https://github.com/Comfy-Org/ComfyUI_frontend/pull/19648) to core/1.55.
Cherry-pick merge commit 84812959aea46b48c8cd42dcb2ef31e1f1c0b32b onto new branch
backport-19648-to-core-1.55 from origin/core/1.55.
Resolve conflicts in: src/platform/workspace/billing/sdk/billingSdkTelemetryOwnership.test.ts .

> **This may be a stacking conflict rather than a real one.** #19646, #19631 are still open against `core/1.55`. If this PR sits on top of any of them, the conflict will disappear once they merge — wait for that, then remove and re-add the `needs-backport` label to re-run this workflow.

For test snapshots (browser_tests/**/*-snapshots/), accept PR version if
changed in original PR, else keep target. For package.json versions, keep
target branch. For pnpm-lock.yaml, regenerate with pnpm install.
Ask user for non-obvious conflicts.
Create PR titled "[backport core/1.55] <original title>" with label "backport".
See .github/workflows/pr-backport.yaml for workflow details.

cc @dante01yoon

@comfy-pr-bot

Copy link
Copy Markdown
Member

⚠️ Backport to cloud/1.55 failed

Reason: Merge conflicts detected during cherry-pick of 8481295

The auto-backport could not be completed automatically. Please backport
manually onto branch backport-19648-to-cloud-1.55 (from origin/cloud/1.55) and
open a PR to cloud/1.55.

This may be a stacking conflict rather than a real one. #19647, #19632 are still open against cloud/1.55. If this PR sits on top of any of them, the conflict will disappear once they merge — wait for that, then remove and re-add the needs-backport label to re-run this workflow.

📄 Conflicting files
src/platform/workspace/billing/sdk/billingSdkTelemetryOwnership.test.ts
🤖 Prompt for AI Agents
Backport PR #19648 (https://github.com/Comfy-Org/ComfyUI_frontend/pull/19648) to cloud/1.55.
Cherry-pick merge commit 84812959aea46b48c8cd42dcb2ef31e1f1c0b32b onto new branch
backport-19648-to-cloud-1.55 from origin/cloud/1.55.
Resolve conflicts in: src/platform/workspace/billing/sdk/billingSdkTelemetryOwnership.test.ts .

> **This may be a stacking conflict rather than a real one.** #19647, #19632 are still open against `cloud/1.55`. If this PR sits on top of any of them, the conflict will disappear once they merge — wait for that, then remove and re-add the `needs-backport` label to re-run this workflow.

For test snapshots (browser_tests/**/*-snapshots/), accept PR version if
changed in original PR, else keep target. For package.json versions, keep
target branch. For pnpm-lock.yaml, regenerate with pnpm install.
Ask user for non-obvious conflicts.
Create PR titled "[backport cloud/1.55] <original title>" with label "backport".
See .github/workflows/pr-backport.yaml for workflow details.

cc @dante01yoon

@dante01yoon dante01yoon removed needs-backport Fix/change that needs to be cherry-picked to the current feature freeze branch core/1.55 Backport PRs for core 1.55 cloud/1.55 Backport PRs for cloud 1.55 labels Sep 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk:xhigh PR risk grade (advisory shadow check; grader-owned)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants