Comfy-Org / Comfy-Org/ComfyUI_frontend

Missing model pipeline: OSS path does not re-check ancestor state after mid-flight container bypass

Open
#11,794 0 comments 0 reactions 1 assignee Claimed by @jaeone94 View on GitHub
area:models Potential Bug
Dominant language
TypeScript
Stars
2k
Forks
699
Avg merge
1d 7h
Merged PRs (30d)
490

Description

## Summary

In `src/platform/missingModel/missingModelPipeline.ts`, the three concurrent `void` promises (cloud verification, OSS `getFolderPaths`, and `fetchModelMetadata`) all share a single `controller.signal`. However, only the **cloud path** (inside `.then()` after `verifyAssetSupportedCandidates`) re-runs `isMissingCandidateActive` to filter out candidates whose ancestor container was bypassed during the async window.

The **OSS path** does not perform a symmetric re-check:
- In the `getFolderPaths().finally()` handler (~L200–218), `surfaceMissingModels` is called with the original `confirmedCandidates` snapshot without re-filtering by current ancestor state.
- In the `fetchModelMetadata` loop (~L222–230), file sizes are stored for candidates that may no longer be active.

If a user bypasses a container node **during** either of these async windows, the surfaced missing-model errors will not reflect the updated graph state.

## Affected code

File: `src/platform/missingModel/missingModelPipeline.ts`

- OSS `getFolderPaths().finally()` block (~L200–218): add a re-check of `isMissingCandidateActive` before calling `surfaceMissingModels` and `cacheModelCandidates`, mirroring the cloud path.
- `fetchModelMetadata` loop (~L222–230): guard file-size writes with an `isMissingCandidateActive` check (or skip silently since the error won't be surfaced anyway).

## Notes

- This risk was flagged by @DrJKL as pre-existing scope (before PR #11751) and is out of scope for that PR.
- The cloud path already handles this correctly; the fix should bring the OSS path to parity.
- The realtime mode-change path (`handleNodeModeChange → scanAndAddNodeErrors`) is responsible for surfacing errors after an un-bypass, so the window of inconsistency is bounded to the duration of the async operations.

## References

- PR: #11751
- Review comment: https://github.com/Comfy-Org/ComfyUI_frontend/pull/11751#discussion_r3171298824
- Requested by: @jaeone94

┆Issue is synchronized with this [Notion page](https://app.notion.com/p/Issue-11794-Missing-model-pipeline-OSS-path-does-not-re-check-ancestor-state-after-mid-flight-co-3536d73d36508168b5dae89f0dc22ed1) by [Unito](https://www.unito.io)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.