Comfy-Org / Comfy-Org/ComfyUI_frontend
test: viewport-culling backstop and threshold coverage gaps found by mutation testing
- Dominant language
- TypeScript
- Stars
- 2k
- Forks
- 704
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 512
Description
### FU4 — Unit coverage gaps that mutation testing surfaced, three of them on round-2 fixes
> Twelve of twenty-four mutants survived the PR's unit suite, and three survivors are mechanisms
> added specifically to close round-2 findings. (a) Deleting the `refreshMountedNodes()` call from
> the backstop interval body, and dropping the pinned set out of the fingerprint, both leave all 74
> tests green; the pinning test at `useViewportCulling.test.ts:121` passes only because it also
> moves `camera.x`, so it exercises the camera watcher rather than the backstop. The backstop is the
> entire fix for "only 2 of 5 mounted-set inputs triggered recompute", and a future refactor can
> delete it silently. (b) `MIN_NODES_FOR_CULLING` 150 to `0` and to `Infinity` both stay green,
> because every unit test injects `minNodesForCulling` explicitly and `GraphCanvas.vue:363` (the
> only production caller) takes the default; `Infinity` surviving means the feature could be
> switched off entirely with green CI. (c) Deleting the `getAlwaysMountedIds` admission union stays
> green and no test passes `getAlwaysMountedIds` at all, so the extension opt-out contract in F9 is
> shown to be computed correctly but never shown to be honoured. (d) The zoom-deferral branch can be
> removed entirely with green CI; no test in the file ever changes `camera.z`. Separately on
> fixtures: `docs/adr/0008-entity-component-system.md:257` asks for no significant p95 frame-time
> regression on representative 200-node and 500-node workflows. `p95FrameDurationMs` is instrumented
> and compared (`scripts/perf-report.ts:74`) and the 200-node side is covered by
> `large-graph-workflow.json` (245 nodes, 294 links), but there is no 500-node workflow anywhere in
> `browser_tests/assets/`, and nothing measures near the 150 boundary in CI or locally.
---
Found during round 3 review of #15030. Filed as a follow-up so it is not lost when that PR merges.
Contributor guide
Assessment
This issue has not been assessed yet.