Skip to content

refactor(billing): simplify handoff test lifecycle - #23361

Merged
DrJKL merged 1 commit into
1.61-billing-handoff/local-billing-tabfrom
fix/pr23315-test-lifecycle
Nov 13, 2026
Merged

DrJKL merged 1 commit into
1.61-billing-handoff/local-billing-tabfrom
fix/pr23315-test-lifecycle

Conversation

@DrJKL

@DrJKL DrJKL commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

Summary

Follow-up to #23315, stacked so the original branch stays untouched. Fixes the retained test-lifecycle and cleanup findings without changing billing policy or the local handoff. I withdrew the component-inlining finding after the actual maintainability check rejected that change.

Rationale and review references
  • One owner for store cleanup. Shared test setup creates a fresh Pinia and returns cleanup for that exact instance. Pinia disposes its child effect scopes, so a second store registry adds ownership without a separate guarantee. Remove the registry, retrieval wrapper and import alias together. Preserve Desktop-session shutdown and the explicit mid-test disposal that creates the late-response regression scenario. Review references: registry, alias, teardown.
  • Restore previous global state. Assigning a Desktop marker and deleting it afterward assumes the property was originally absent. vi.stubGlobal saves its previous descriptor, and the configured unstubGlobals restores it. Keep the separate module-ref reset because global restoration does not own that state. Apply the same replacement to the billing-tab cases in the original PR. This is isolation cleanup, not a demonstrated production defect. Review references: setup, restoration.
  • Use the existing reactive-value helper. Replace the custom availability getter with Vue's toValue, retaining both reads around the asynchronous settings request. My earlier direct .value suggestion failed no-unnecessary-condition: TypeScript retains the first property's narrowing across await. toValue permits the live re-read without a custom wrapper or suppression. Caching the first result would change behavior, so the existing switch-during-request case remains important. Review references: reads, getter.
  • Withdraw the component deletion. Inlining the paragraph loop and conditional tooltip passed the runtime tests and produced identical captures, but the pre-push Fallow gate rejected the card template at cognitive complexity 17. Removing repeated optional class accesses lowered cyclomatic complexity, not the failing nesting metric. Keep the original component boundary rather than weaken the check or broaden this cleanup into a card rewrite. The final diff has no UI changes. Review reference.
  • Keep useful API contracts, remove narration. Remove descriptions that repeat a short predicate and the store description displaced above its internal generation counter. Retain the useful readonly flag contract. Curt exported-API JSDoc is permitted; this is not a blanket deletion rule. Review references: surface, predicate, store description response.
  • Keep distinguishing tests. The existing status table already checks the flag-off card, including text, action, destination and telemetry. The existing failure-copy and payment-link cases already cover the available banner. Retain the unavailable regressions and remove their duplicate positive rows. The author intentionally kept adjacent rollback pairs for readability; the owner has now requested this cleanup. Mutation checks establish that the smaller suites still reject both always-hidden and always-visible actions. Review references: card, banner.

For future changes, identify lifecycle ownership before adding cleanup, preserve evaluation timing when removing aliases, and name the existing test that protects every deleted assertion. Judge an abstraction by the responsibility it hides. Distinguish demonstrated failures from maintenance costs and unverified hypotheses when assigning severity.

Verification

  • pnpm test:unit on the affected billing, host, feature-flag and BillingTab suites, with --retry=0 --no-fsModuleCache: 8 files passed, 382 tests passed on the final commit.
  • Normal commit/pre-push hooks passed, including type-aware lint, application typechecking, dependency audit, Knip, generated-client checks and Fallow. No checks were bypassed.
  • Temporary mutations forcing each legacy availability guard always true or always false all fail the remaining tests. No permanent tests were added for framework behavior.
  • The attempted component move had identical Storybook normal/action-hidden captures and paragraph DOM, but failed the maintainability gate and was reverted. No component or styling change remains.
  • Shuffled execution exposes pre-existing auth-window failures in the feature-flag suite. The same failures reproduce with the original published test source. The full unshuffled suite passes; scoped shuffled runs and hook results are recorded in the follow-up evidence.

The hosted recovery-route concern remains unverified and nonblocking. This follow-up changes no routing on that hypothesis.

@DrJKL
DrJKL requested a review from a team as a code owner November 13, 2026 18:24
@coderabbitai

coderabbitai Bot commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

⚡ Performance: ⏳ Performance tests in progress…

🎭 Playwright: ✅ 3290 passed, 0 failed · 5 flaky

📊 Browser Reports
  • chromium: View Report (✅ 2382 / ❌ 0 / ⚠️ 3 / ⏭️ 0)
  • chromium-2x: View Report (✅ 3 / ❌ 0 / ⚠️ 0 / ⏭️ 0)
  • chromium-0.5x: View Report (✅ 2 / ❌ 0 / ⚠️ 0 / ⏭️ 0)
  • cloud: View Report (✅ 863 / ❌ 0 / ⚠️ 2 / ⏭️ 0)
  • desktop: View Report (✅ 17 / ❌ 0 / ⚠️ 0 / ⏭️ 0)
  • mobile-chrome: View Report (✅ 19 / ❌ 0 / ⚠️ 0 / ⏭️ 0)
  • mobile-safari: View Report (✅ 4 / ❌ 0 / ⚠️ 0 / ⏭️ 0)

🎨 Storybook: ✅ Built — View Storybook

Details

⏰ Completed at: 11/13/2026, 06:26:25 PM UTC

Links

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

No verdict is available. Open the workflow run to confirm the check was intentionally skipped, or fix the collection failure and re-run it.

Findings and check details

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.

The matrix runs on same-repository version-bump PRs with relevant changes, main-branch pushes, and manual dispatches. This candidate does not qualify, so every expensive stage was skipped.

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

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

🌾 Fallow: ✅ Passed

Findings and check details

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.

Full docs: ADR-DEVEX-LINT-0015

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

🏛️ Architecture: ✅ Passed

Findings and check details

Warnings (516)

  • billing path matches no source files: src/platform/billing/composables/activateBillingScope.testUtils.ts. Remove or update it in docs/architecture/domains/records/billing.domain.json.
  • error-handling path matches no source files: src/utils/errorUtil.ts. Remove or update it in docs/architecture/domains/records/error-handling.domain.json.
  • graph-model path matches no source files: src/types/linkTopology.ts. Remove or update it in docs/architecture/domains/records/graph-model.domain.json.
  • graph-model path matches no source files: src/types/nodeState.ts. Remove or update it in docs/architecture/domains/records/graph-model.domain.json.
  • job-queue path matches no source files: src/platform/remote/comfyui/jobs/**. Remove or update it in docs/architecture/domains/records/job-queue.domain.json.
  • linear-mode path matches no source files: src/utils/appMode.ts. Remove or update it in docs/architecture/domains/records/linear-mode.domain.json.
  • link-connection path matches no source files: src/lib/litegraph/src/infrastructure/LinkConnectorEventMap.ts. Remove or update it in docs/architecture/domains/records/link-connection.domain.json.
  • node-widgets path matches no source files: src/types/widgetState.ts. Remove or update it in docs/architecture/domains/records/node-widgets.domain.json.
  • subgraphs path matches no source files: src/lib/litegraph/src/infrastructure/SubgraphEventMap.ts. Remove or update it in docs/architecture/domains/records/subgraphs.domain.json.
  • vue-node-widgets path matches no source files: src/types/positionConfig.ts. Remove or update it in docs/architecture/domains/records/vue-node-widgets.domain.json.
  • workspace path matches no source files: src/platform/workspace/fixtures/**. Remove or update it in docs/architecture/domains/records/workspace.domain.json.
  • packages/api-client/src/abortSignal.test.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • packages/api-client/src/abortSignal.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • packages/api-client/src/fetchRouteTemplate.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • packages/api-client/src/fetchWithRetry.test.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • packages/api-client/src/fetchWithRetry.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • packages/api-client/src/retryPolicy.test.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • packages/api-client/src/retryPolicy.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • packages/api-client/src/statusRetryTelemetry.test.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • packages/api-client/src/statusRetryTelemetry.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • packages/comfyui-api-types/src/generated/index.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • packages/comfyui-api-types/src/generated/types.gen.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • packages/comfyui-api-types/src/index.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • packages/shared-frontend-utils/src/formatUtil.test.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • packages/shared-frontend-utils/src/formatUtil.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • packages/shared-frontend-utils/src/geometry.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • packages/shared-frontend-utils/src/loadExternalScript.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • packages/shared-frontend-utils/src/networkUtil.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • packages/shared-frontend-utils/src/telemetry.test.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • packages/shared-frontend-utils/src/telemetry.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • packages/shared-frontend-utils/src/urlSafety.test.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • packages/shared-frontend-utils/src/urlSafety.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • packages/tailwind-utils/src/index.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/components/TopbarActions.vue is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/components/searchbox/v2/filterChip.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/components/videoConcat/VideoConcatClipStrip.vue is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/components/videoConcat/VideoConcatClipTile.vue is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/components/videoConcat/VideoConcatPanel.test.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/components/videoConcat/VideoConcatPanel.vue is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/components/videoConcat/VideoConcatPlaybackBar.vue is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/components/videoConcat/WidgetVideoConcat.test.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/components/videoConcat/WidgetVideoConcat.vue is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/components/videoConcat/__fixtures__/clipTiles.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/components/widgetHistory/WidgetHistoryButtons.test.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/components/widgetHistory/WidgetHistoryButtons.vue is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/composables/graph/menuOption.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/composables/useAgentExtensionActions.test.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/composables/useAgentExtensionActions.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/composables/useAgentExtensionNotices.test.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/composables/useAgentExtensionNotices.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • …and 466 more

Full docs: Frontend domain catalog

Reproduce locally
pnpm architecture:check

@dante01yoon dante01yoon left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Reviewed ac9cddf against its stacked base. No blocking findings; Gates 1–3 are not tripped by this behavior-preserving cleanup.

Confirmed shared setup owns disposal of its exact Pinia instance, while Desktop-session teardown and the explicit mid-test disposal regression remain. The Desktop marker now uses configured global restoration. Both live availability reads remain on either side of the settings await through toValue. The removed positive card/banner rows are covered by the existing served-status table and payment-link/failure-copy cases; unavailable regressions remain. The final diff preserves the component boundary and adds no UI or billing-policy change.

Validation: code, configuration, existing tests and discussion inspection only; no tests, builds or CI reruns were run, as requested. Refreshed head and discussion before posting. Current CI: 44 successful, 21 skipped, 1 neutral and 28 in progress; no failing check observed. Pending checks are not claimed as passed.

@dante01yoon dante01yoon assigned DrJKL and unassigned dante01yoon Nov 13, 2026
@DrJKL
DrJKL merged commit f49213c into 1.61-billing-handoff/local-billing-tab Nov 13, 2026
95 checks passed
@DrJKL
DrJKL deleted the fix/pr23315-test-lifecycle branch November 13, 2026 18:33
@github-actions github-actions Bot added the risk:xhigh PR risk grade (advisory shadow check; grader-owned) label Nov 13, 2026
@codecov

codecov Bot commented Nov 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

@@                            Coverage Diff                             @@
##           1.61-billing-handoff/local-billing-tab   #23361      +/-   ##
==========================================================================
- Coverage                                   87.97%   87.89%   -0.08%     
==========================================================================
  Files                                        3168     3054     -114     
  Lines                                      169439   165828    -3611     
  Branches                                    43919    44701     +782     
==========================================================================
- Hits                                       149066   145757    -3309     
+ Misses                                      19403    19269     -134     
+ Partials                                      970      802     -168     
Flag Coverage Δ
billing-web-unit ?
unit 87.43% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...form/billing/composables/useAutoTopUpSetupOffer.ts 100.00% <100.00%> (ø)
src/platform/billing/localBillingWebEnabled.ts 100.00% <ø> (ø)
...latform/billing/stores/localBillingWebFlagStore.ts 100.00% <ø> (ø)

... and 115 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.

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.

2 participants