Skip to content

test: use typed workflow fixtures and isolate malformed inputs - #23088

Open
DrJKL wants to merge 1 commit into
mainfrom
fix/front-3823-typed-workflow-fixtures
Open

DrJKL wants to merge 1 commit into
mainfrom
fix/front-3823-typed-workflow-fixtures

Conversation

@DrJKL

@DrJKL DrJKL commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes https://linear.app/comfyorg/issue/FRONT-3823

Use real workflow graph/canvas fixtures and the real subgraph guard. Give each test a fresh canvas so the missing-canvas case cannot leak into later tests.

Keep unsafe malformed-locator, null-canvas, and missing-subgraph-root inputs explicit, with their original assertions. Production signatures stay unchanged: callers pass branded locators, raw strings already have a parser, and optional canvas access already has its own API. The remaining fromAny calls exercise violations of those contracts and remain tracked by FRONT-3823.

Verification

  • Workflow store tests pass normally and shuffled with seeds 3823 and 3824, with one worker and retries disabled.
  • Commit hooks passed formatting, type-aware Oxlint, server-fact checks, and app typechecking.
  • Push hooks passed dependency, unused-code, generated-contract, and changed-code audits.
  • Test-only change; no production contract or shared helper edits.

@DrJKL
DrJKL requested a review from a team November 6, 2026 21:43
@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

🎨 Storybook: ✅ Built — View Storybook

Details

⏰ Completed at: 11/06/2026, 09:45:43 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 282276cb0d8d5e11b73f0ab66fe4724776abab46

🏛️ Architecture: ✅ Passed

Findings and check details

Warnings (371)

  • 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 321 more

Full docs: Frontend domain catalog

Reproduce locally
pnpm architecture:check

@coderabbitai

coderabbitai Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The workflow store tests replace hand-built graph and canvas mocks with LiteGraph fixtures. They add canvas, workflow-switching, and node-locator test cases for subgraphs.

Changes: Workflow store test fixtures and subgraph coverage

Layer / File(s) Summary
Graph and canvas test setup
src/platform/workflow/management/stores/workflowStore.test.ts
The tests use LiteGraph fixture helpers. Each test creates a root graph and canvas, assigns them to the app mock, and cleans up canvas events and its element.
Subgraph and node-locator scenarios
src/platform/workflow/management/stores/workflowStore.test.ts
Subgraph tests cover a null canvas, root graph, active subgraph, and workflow switch. Node-locator tests use graph fixtures and cover a missing root graph and a colon-bearing subgraph-host ID. The active-subgraph isSubgraph mock is removed.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Other

Possibly related PRs

Suggested reviewers: christian-byrne

Merge Risk: Minimal · up to f1913

The fixture changes appear mergeable after normal checks; no concrete issue remains identified.

Pre-merge checks: Passed 4 · Inconclusive 2

Failed Failed checks: 2 inconclusive

Check name Status Explanation Resolution
End-To-End Test Suggestion For User-Facing Changes Inconclusive The review context does not provide a changed-file list or diff. The title and commit subject alone cannot establish whether the PR changes application behavior. Provide the changed-file list and diff in the review context.
Adr Compliance For Entity/Litegraph Changes Inconclusive The changed workflow-store test covers nodes and subgraphs, so the check applies. The review context does not include the diff content, and the check prohibits shell commands. The ADR patterns cannot … Provide the PR diff content for the changed test file.
Passed Passed checks: 4 passed

Check name Status Explanation
Title check Passed The title describes the workflow fixtures and isolation of malformed inputs.
Description check Passed The description includes the required Summary and Verification sections. It explains the test changes, unchanged production contracts, and reported verification results.
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.
Full details: Adr Compliance For Entity/Litegraph Changes

Explanation

The changed workflow-store test covers nodes and subgraphs, so the check applies. The review context does not include the diff content, and the check prohibits shell commands. The ADR patterns cannot be assessed from the summary alone.

Resolution

Provide the PR diff content for the changed test file.

Finishing Touches

Generate docstrings

  • Commit to this branch
  • Create a new PR
Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 282276c and f19130f.

Files selected for processing: 1

  • src/platform/workflow/management/stores/workflowStore.test.ts

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

@github-actions github-actions Bot added the risk:high PR risk grade (advisory shadow check; grader-owned) label Nov 6, 2026
@codecov

codecov Bot commented Nov 6, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

@@            Coverage Diff             @@
##             main   #23088      +/-   ##
==========================================
- Coverage   87.62%   87.52%   -0.10%     
==========================================
  Files        3053     2946     -107     
  Lines      163915   160532    -3383     
  Branches    41768    42620     +852     
==========================================
- Hits       143625   140507    -3118     
+ Misses      19399    19293     -106     
+ Partials      891      732     -159     
Flag Coverage Δ
billing-web-unit ?
unit 86.79% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 108 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.

@DrJKL DrJKL assigned christian-byrne and unassigned jaeone94 Nov 6, 2026
@DrJKL
DrJKL enabled auto-merge November 6, 2026 22:06

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

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants