comfygit-core 0.3.22__tar.gz → 0.4.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- comfygit_core-0.4.0/AGENTS.md +122 -0
- comfygit_core-0.4.0/CLAUDE.md +122 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/PKG-INFO +3 -3
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/pyproject.toml +4 -4
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/analyzers/node_classifier.py +19 -1
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/analyzers/status_scanner.py +22 -2
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/analyzers/workflow_dependency_parser.py +5 -2
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/caching/workflow_cache.py +39 -25
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/clients/civitai_client.py +182 -6
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/clients/github_client.py +35 -16
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/constants.py +2 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/core/environment.py +296 -88
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/core/workspace.py +194 -3
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/factories/environment_factory.py +71 -6
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/factories/uv_factory.py +11 -3
- comfygit_core-0.4.0/src/comfygit_core/lifecycle/__init__.py +51 -0
- comfygit_core-0.4.0/src/comfygit_core/lifecycle/comfyui_readiness.py +163 -0
- comfygit_core-0.4.0/src/comfygit_core/lifecycle/switch_observer.py +249 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/managers/export_import_manager.py +11 -2
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/managers/git_manager.py +4 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/managers/node_manager.py +223 -14
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/managers/pyproject_manager.py +259 -30
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/managers/uv_project_manager.py +8 -5
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/managers/workflow_manager.py +172 -198
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/models/__init__.py +26 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/models/civitai.py +18 -4
- comfygit_core-0.4.0/src/comfygit_core/models/dependency_resolution.py +73 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/models/exceptions.py +18 -3
- comfygit_core-0.4.0/src/comfygit_core/models/manifest.py +344 -0
- comfygit_core-0.4.0/src/comfygit_core/models/materialization.py +41 -0
- comfygit_core-0.4.0/src/comfygit_core/models/readiness.py +90 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/models/shared.py +35 -2
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/models/workflow.py +65 -10
- comfygit_core-0.4.0/src/comfygit_core/models/workflow_contract.py +448 -0
- comfygit_core-0.4.0/src/comfygit_core/models/workflow_execution.py +78 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/models/workspace_config.py +6 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/repositories/model_repository.py +50 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/repositories/workspace_config_repository.py +32 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/services/__init__.py +18 -1
- comfygit_core-0.4.0/src/comfygit_core/services/dependency_resolution_preview.py +368 -0
- comfygit_core-0.4.0/src/comfygit_core/services/environment_readiness.py +361 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/services/import_analyzer.py +20 -2
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/services/model_downloader.py +70 -47
- comfygit_core-0.4.0/src/comfygit_core/services/model_source_lookup.py +158 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/services/node_lookup_service.py +43 -24
- comfygit_core-0.4.0/src/comfygit_core/services/workflow_analysis_service.py +611 -0
- comfygit_core-0.4.0/src/comfygit_core/services/workflow_execution.py +409 -0
- comfygit_core-0.4.0/src/comfygit_core/services/workflow_input.py +79 -0
- comfygit_core-0.4.0/src/comfygit_core/services/workflow_resolution_service.py +228 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/utils/git.py +119 -9
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/integration/test_dev_node_git_references.py +31 -5
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/integration/test_export_import.py +13 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/integration/test_optional_dependency_groups.py +13 -4
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/integration/test_pyproject_batch_writes.py +123 -2
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/integration/test_registry_git_fallback.py +15 -28
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/integration/test_workflow_deletion_cleanup.py +129 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/unit/clients/test_civitai_client.py +56 -1
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/unit/clients/test_civitai_parsing.py +17 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/unit/clients/test_github_releases.py +28 -1
- comfygit_core-0.4.0/tests/unit/core/test_import_download_failures.py +112 -0
- comfygit_core-0.4.0/tests/unit/core/test_sync_node_dependency_provisioning.py +121 -0
- comfygit_core-0.4.0/tests/unit/core/test_workspace_model_delete.py +89 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/unit/factories/test_environment_factory_manager_install.py +2 -1
- comfygit_core-0.4.0/tests/unit/lifecycle/test_comfyui_readiness.py +41 -0
- comfygit_core-0.4.0/tests/unit/managers/test_git_manager_gitignore.py +50 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/unit/managers/test_node_manager.py +132 -13
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/unit/managers/test_pyproject_manager.py +372 -4
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/unit/managers/test_pytorch_injection.py +43 -0
- comfygit_core-0.4.0/tests/unit/models/test_workflow_dependencies.py +30 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/unit/models/test_workflow_roundtrip.py +48 -0
- comfygit_core-0.4.0/tests/unit/services/test_dependency_resolution_preview.py +336 -0
- comfygit_core-0.4.0/tests/unit/services/test_environment_readiness.py +300 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/unit/services/test_import_analyzer.py +15 -2
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/unit/services/test_model_downloader.py +141 -0
- comfygit_core-0.4.0/tests/unit/services/test_model_source_lookup.py +84 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/unit/services/test_node_lookup_api_first.py +76 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/unit/services/test_node_lookup_version_fallback.py +9 -16
- comfygit_core-0.4.0/tests/unit/services/test_workflow_analysis_service.py +135 -0
- comfygit_core-0.4.0/tests/unit/services/test_workflow_execution.py +362 -0
- comfygit_core-0.4.0/tests/unit/services/test_workflow_input.py +123 -0
- comfygit_core-0.4.0/tests/unit/services/test_workflow_resolution_service.py +92 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/unit/test_dev_node_rename_detection.py +97 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/unit/test_external_uv_cache.py +1 -2
- comfygit_core-0.4.0/tests/unit/test_github_auth_config.py +69 -0
- comfygit_core-0.4.0/tests/unit/test_headless_import.py +34 -0
- comfygit_core-0.4.0/tests/unit/test_materialization.py +141 -0
- comfygit_core-0.4.0/tests/unit/test_model_repository_cleanup.py +45 -0
- comfygit_core-0.4.0/tests/unit/utils/test_git.py +210 -0
- comfygit_core-0.3.22/AGENTS.md +0 -61
- comfygit_core-0.3.22/CLAUDE.md +0 -86
- comfygit_core-0.3.22/src/comfygit_core/models/manifest.py +0 -131
- comfygit_core-0.3.22/tests/unit/utils/test_git.py +0 -62
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/.gitignore +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/.python-version +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/LICENSE.txt +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/README.md +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/docs/architecture-deep-dive.md +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/docs/architecture.md +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/docs/knowledge/comfyui-node-loader-base-directories.md +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/docs/knowledge/model-tracking-system.md +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/docs/knowledge/node-resolution-behavior.md +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/docs/layer-hierarchy.md +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/docs/plans/uv-overlay-system.md +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/__init__.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/analyzers/__init__.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/analyzers/config_comparison.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/analyzers/custom_node_scanner.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/analyzers/git_change_parser.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/analyzers/model_scanner.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/analyzers/node_git_analyzer.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/analyzers/ref_diff_analyzer.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/caching/__init__.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/caching/api_cache.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/caching/base.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/caching/comfyui_cache.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/caching/custom_node_cache.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/clients/__init__.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/clients/registry_client.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/configs/__init__.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/configs/comfyui_builtin_nodes.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/configs/comfyui_models.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/configs/model_config.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/configs/package_config.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/core/__init__.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/data/overlays/stock/sageattention.toml +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/data/overlays/stock/triton.toml +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/data/overlays/stock/xformers.toml +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/factories/__init__.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/factories/workspace_factory.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/infrastructure/__init__.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/infrastructure/sqlite_manager.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/integrations/__init__.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/integrations/uv_command.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/logging/__init__.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/logging/logging_config.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/managers/__init__.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/managers/environment_git_orchestrator.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/managers/environment_model_manager.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/managers/model_download_manager.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/managers/model_symlink_manager.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/managers/overlay_manager.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/managers/pytorch_backend_manager.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/managers/system_node_symlink_manager.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/managers/user_content_symlink_manager.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/merging/__init__.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/merging/atomic_executor.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/merging/merge_validator.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/merging/semantic_merger.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/models/comfyui_builtin_versions.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/models/commit.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/models/environment.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/models/merge_plan.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/models/node_mapping.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/models/overlay.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/models/protocols.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/models/ref_diff.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/models/registry.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/models/sync.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/models/system.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/py.typed +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/repositories/__init__.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/repositories/comfyui_builtin_versions_repository.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/repositories/migrate_paths.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/repositories/node_mappings_repository.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/repositories/workflow_repository.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/resolvers/__init__.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/resolvers/global_node_resolver.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/resolvers/model_resolver.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/services/huggingface_url.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/services/registry_data_manager.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/strategies/__init__.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/strategies/auto.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/strategies/confirmation.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/utils/__init__.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/utils/builtin_extractor.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/utils/comfyui_ops.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/utils/common.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/utils/conflict_analyzer.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/utils/conflict_parser.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/utils/dependency_parser.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/utils/dependency_probe.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/utils/download.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/utils/environment_cleanup.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/utils/environment_lock.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/utils/filesystem.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/utils/folder_paths_extractor.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/utils/input_signature.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/utils/model_categories.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/utils/pytorch.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/utils/pytorch_prober.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/utils/requirements.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/utils/retry.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/utils/symlink_utils.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/utils/system_detector.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/utils/uuid.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/utils/uv_error_handler.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/utils/version.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/utils/workflow_hash.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/validation/__init__.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/src/comfygit_core/validation/resolution_tester.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/README.md +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/caching/TEST_REDUCTION_SUMMARY.md +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/caching/__init__.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/caching/test_workflow_cache.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/caching/test_workflow_cache_context_hash.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/conftest.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/fixtures/models/test_models.json +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/fixtures/workflows/checkpoint_loader_with_missing_model.json +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/fixtures/workflows/kjnodes_workflow.json +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/fixtures/workflows/simple_txt2img.json +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/fixtures/workflows/with_custom_node.json +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/fixtures/workflows/with_missing_model.json +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/fixtures/workflows/workflow_with_duplicates.json +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/fixtures/workflows/workflow_with_properties.json +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/fixtures/workflows/workflow_without_properties.json +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/helpers/__init__.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/helpers/model_index_builder.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/helpers/pyproject_assertions.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/helpers/workflow_builder.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/integration/test_atomic_semantic_merge.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/integration/test_auto_model_index_sync.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/integration/test_branch_workflow_preservation.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/integration/test_cache_invalidation_on_model_deletion.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/integration/test_cache_node_version_invalidation.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/integration/test_checkout_b_with_modified_workflow.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/integration/test_commit_git_changes.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/integration/test_commit_git_changes_SUMMARY.md +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/integration/test_commit_history.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/integration/test_context_aware_node_resolution.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/integration/test_create_with_version_spec.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/integration/test_custom_node_path_preservation.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/integration/test_deferred_model_downloads.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/integration/test_deleted_model_download_intent.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/integration/test_dependency_group_removal.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/integration/test_dev_node_improvements.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/integration/test_download_cleanup.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/integration/test_download_intent_cache_invalidation.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/integration/test_environment_basic.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/integration/test_environment_branching.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/integration/test_environment_create_progress.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/integration/test_git_branching.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/integration/test_git_import.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/integration/test_git_pull_push.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/integration/test_git_remote.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/integration/test_git_subdirectory_import.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/integration/test_import_auto_remote.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/integration/test_import_comfyui_version_bug.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/integration/test_import_preview.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/integration/test_model_category_mismatch_detection.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/integration/test_model_directory_switch.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/integration/test_model_download_integration.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/integration/test_model_index_mismatch_bug_SUMMARY.md +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/integration/test_model_path_sync_detection.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/integration/test_model_resolution_stale_directory.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/integration/test_model_show_command.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/integration/test_model_source_management.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/integration/test_model_source_preservation.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/integration/test_model_source_preservation_SUMMARY.md +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/integration/test_model_source_removal.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/integration/test_multiple_optional_group_failures.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/integration/test_node_prune.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/integration/test_node_version_replacement.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/integration/test_opencv_conflict_resolution.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/integration/test_overlay_e2e.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/integration/test_overlay_git_integration.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/integration/test_overlay_system_integration.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/integration/test_package_config.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/integration/test_per_environment_manager.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/integration/test_pytorch_reconfiguration.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/integration/test_registry_node_update_empty_download_url.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/integration/test_repair_completion_marker.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/integration/test_repair_model_download.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/integration/test_repair_node_removal.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/integration/test_repair_workflow.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/integration/test_requirements_inline_comments_bug.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/integration/test_runtime_restart_workflow_preservation.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/integration/test_status_abstraction.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/integration/test_status_uninstalled_nodes.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/integration/test_workflow_caching_integration.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/integration/test_workflow_commit_flow.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/integration/test_workflow_model_criticality_update.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/integration/test_workflow_path_update_after_interactive_resolution.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/integration/test_workflow_resolution_cleanup.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/integration/test_workflow_resolution_pipeline.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/integration/test_workflow_resolve_install.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/integration/test_workflow_subgraph_resolution.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/test_public_api.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/unit/analyzers/test_config_comparison.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/unit/analyzers/test_custom_node_scanner.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/unit/analyzers/test_ref_diff_analyzer.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/unit/analyzers/test_status_scanner_disabled_nodes.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/unit/analyzers/test_workflow_dependency_parser.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/unit/caching/test_cache_base.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/unit/caching/test_comfyui_cache.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/unit/caching/test_custom_node_cache_refactor.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/unit/caching/test_workspace_relative_caching.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/unit/configs/__init__.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/unit/configs/test_package_config.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/unit/core/test_environment_operation_locking.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/unit/core/test_environment_uninstalled_nodes.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/unit/core/test_import_no_manager.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/unit/core/test_reserved_environment_names.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/unit/managers/test_export_import_overlays.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/unit/managers/test_git_manager_log_refs.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/unit/managers/test_model_index_manager.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/unit/managers/test_model_short_hash.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/unit/managers/test_node_conflict_detection.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/unit/managers/test_overlay_fuzz.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/unit/managers/test_overlay_injection.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/unit/managers/test_overlay_manager.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/unit/managers/test_pyproject_schema_version.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/unit/managers/test_pytorch_backend_manager.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/unit/managers/test_pytorch_stripping.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/unit/managers/test_sqlite_manager.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/unit/managers/test_uv_no_build_isolation.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/unit/managers/test_workflow_manager.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/unit/managers/test_workflow_node_cleanup.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/unit/managers/test_workflow_status.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/unit/merging/__init__.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/unit/merging/test_atomic_executor.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/unit/merging/test_merge_validator.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/unit/merging/test_semantic_merger.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/unit/models/test_comfyui_builtin_versions.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/unit/models/test_overlay.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/unit/models/test_ref_diff.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/unit/models/test_workflow_subgraph.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/unit/resolvers/test_global_node_resolver_v2.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/unit/resolvers/test_model_resolver.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/unit/services/test_global_node_resolver.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/unit/services/test_huggingface_url.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/unit/services/test_registry_data_manager.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/unit/services/test_scan_requirements_substitution.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/unit/test_add_dependencies_substitution.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/unit/test_auto_strategies.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/unit/test_builtin_extractor.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/unit/test_environment_py_dependencies.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/unit/test_folder_paths_extractor.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/unit/test_github_url_installation.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/unit/test_minimal_schema_compatibility.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/unit/test_model_config_dynamic_loading.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/unit/test_model_downloader_errors.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/unit/test_model_symlink_manager.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/unit/test_node_callbacks.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/unit/test_node_conflict_context.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/unit/test_node_mappings_repository.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/unit/test_node_resolution_context.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/unit/test_unified_node_search.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/unit/test_user_content_symlink_manager.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/unit/test_uv_error_handling.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/unit/test_uv_error_parser.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/unit/test_workflow_manager_deduplication.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/unit/test_workspace_config_resilience.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/unit/utils/test_conflict_analyzer.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/unit/utils/test_conflict_parser.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/unit/utils/test_dependency_parser.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/unit/utils/test_dependency_probe.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/unit/utils/test_environment_cleanup.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/unit/utils/test_input_signature.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/unit/utils/test_pytorch.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/unit/utils/test_pytorch_prober.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/unit/utils/test_requirements.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/unit/utils/test_symlink_utils.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/unit/utils/test_uuid.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/unit/utils/test_version.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/utils/__init__.py +0 -0
- {comfygit_core-0.3.22 → comfygit_core-0.4.0}/tests/utils/test_workflow_hash.py +0 -0
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
<!-- NOTE: packages/core/AGENTS.md and packages/core/CLAUDE.md must stay in sync. -->
|
|
2
|
+
|
|
3
|
+
# ComfyGit Core Agent Guide
|
|
4
|
+
|
|
5
|
+
`packages/core` is the UI-agnostic library package. It owns workspace and
|
|
6
|
+
environment state, manifest semantics, sync/materialization behavior, model and
|
|
7
|
+
node metadata, git orchestration, and callback/protocol contracts used by CLI,
|
|
8
|
+
manager, deploy, and future runtime tooling.
|
|
9
|
+
|
|
10
|
+
## Active Truth Layer
|
|
11
|
+
|
|
12
|
+
Read root truth-layer docs before changing core behavior:
|
|
13
|
+
|
|
14
|
+
- `../../docs/contracts/core/CONTRACT.md` - active core contract and invariants.
|
|
15
|
+
- `../../docs/specs/environment-manifest-model.md` - tracked manifest semantics.
|
|
16
|
+
- `../../docs/specs/environment-sync-lifecycle.md` - sync/run/git lifecycle.
|
|
17
|
+
- `../../docs/specs/dependency-criticality.md` - model/node required vs optional behavior.
|
|
18
|
+
- `../../docs/spec-driven-development.md` - clause syntax and validation rules.
|
|
19
|
+
|
|
20
|
+
Package docs are supporting reference:
|
|
21
|
+
|
|
22
|
+
- `docs/architecture.md` - core layer overview.
|
|
23
|
+
- `docs/layer-hierarchy.md` - package-local layering reference.
|
|
24
|
+
- `docs/knowledge/` - topic-specific behavior notes.
|
|
25
|
+
- `docs/plans/` - planning docs; verify against truth-layer clauses before treating as current.
|
|
26
|
+
|
|
27
|
+
## Core Boundaries
|
|
28
|
+
|
|
29
|
+
- Keep core independent of CLI, manager UI, and ComfyUI panel rendering.
|
|
30
|
+
- Avoid normal-use `print()` and `input()` in core; expose callbacks,
|
|
31
|
+
strategies, protocols, return values, and exceptions so callers own UX.
|
|
32
|
+
- Prefer `Workspace` and `Environment` as public entry points. Keep direct manager
|
|
33
|
+
access for internal composition, tests, and package-local advanced behavior.
|
|
34
|
+
- Do not put service-specific deployment policy into core. Core should
|
|
35
|
+
write/read portable manifest semantics that runtime adapters can consume.
|
|
36
|
+
|
|
37
|
+
## Source Map
|
|
38
|
+
|
|
39
|
+
| Path | Purpose |
|
|
40
|
+
| --- | --- |
|
|
41
|
+
| `src/comfygit_core/core/` | Public `Workspace` and `Environment` APIs. |
|
|
42
|
+
| `src/comfygit_core/managers/` | Stateful orchestration for pyproject, uv, git, nodes, workflows, models, overlays, and symlinks. |
|
|
43
|
+
| `src/comfygit_core/models/` | Dataclasses, protocols, exceptions, manifest/workflow/sync types. |
|
|
44
|
+
| `src/comfygit_core/resolvers/` | Node and model resolution logic. |
|
|
45
|
+
| `src/comfygit_core/services/` | Stateless business logic, registry/model lookup, downloads, workflow services. |
|
|
46
|
+
| `src/comfygit_core/repositories/` | SQLite-backed caches and persistent indexes. |
|
|
47
|
+
| `src/comfygit_core/analyzers/` | Workflow, git, config, model, and custom-node analysis. |
|
|
48
|
+
| `src/comfygit_core/integrations/` | External command integrations such as uv. |
|
|
49
|
+
| `src/comfygit_core/utils/` | Low-level filesystem, git, dependency, PyTorch, retry, and parsing helpers. |
|
|
50
|
+
|
|
51
|
+
Check existing managers/services before adding new abstractions.
|
|
52
|
+
|
|
53
|
+
## Key Managers
|
|
54
|
+
|
|
55
|
+
| Manager | File | Main responsibility |
|
|
56
|
+
| --- | --- | --- |
|
|
57
|
+
| `PyprojectManager` | `managers/pyproject_manager.py` | Manifest CRUD and temporary uv/PyTorch injection. |
|
|
58
|
+
| `UVProjectManager` | `managers/uv_project_manager.py` | uv sync/add/remove operations. |
|
|
59
|
+
| `OverlayManager` | `managers/overlay_manager.py` | Overlay loading and legacy `.local-uv-config` migration. |
|
|
60
|
+
| `PyTorchBackendManager` | `managers/pytorch_backend_manager.py` | `.pytorch-backend`, GPU probing, torch source config. |
|
|
61
|
+
| `NodeManager` | `managers/node_manager.py` | Custom node install/remove/update. |
|
|
62
|
+
| `WorkflowManager` | `managers/workflow_manager.py` | Workflow tracking, node/model resolution, contract metadata. |
|
|
63
|
+
| `EnvironmentModelManager` | `managers/environment_model_manager.py` | Environment-level model status and metadata aggregation. |
|
|
64
|
+
| `GitManager` | `managers/git_manager.py` | Environment repo git operations. |
|
|
65
|
+
| `ExportImportManager` | `managers/export_import_manager.py` | Portable environment import/export. |
|
|
66
|
+
|
|
67
|
+
## Manifest And Local State
|
|
68
|
+
|
|
69
|
+
Tracked portable truth lives in each environment repo's `pyproject.toml`.
|
|
70
|
+
Runtime/materialized state lives under environment runtime directories such as
|
|
71
|
+
`.cec/`, virtualenvs, ComfyUI checkouts, symlinks, caches, and local SQLite DBs.
|
|
72
|
+
|
|
73
|
+
Machine-local sync inputs are not portable manifest truth:
|
|
74
|
+
|
|
75
|
+
- `.pytorch-backend` stores local torch backend choice and generated source pins.
|
|
76
|
+
- Local uv overrides now flow through overlays, with legacy `.local-uv-config`
|
|
77
|
+
migrated by `OverlayManager`.
|
|
78
|
+
|
|
79
|
+
`PyprojectManager.uv_injection_context()` temporarily merges local overlays and
|
|
80
|
+
PyTorch backend config into `pyproject.toml` for uv operations, then restores the
|
|
81
|
+
tracked manifest in a `finally` path. Preserve that invariant.
|
|
82
|
+
|
|
83
|
+
## Dependency Criticality
|
|
84
|
+
|
|
85
|
+
Current model criticality supports required, flexible, and optional. Required
|
|
86
|
+
unresolved models are reproducibility blockers; optional unresolved models are
|
|
87
|
+
warnings.
|
|
88
|
+
|
|
89
|
+
Custom node criticality is planned as explicit manifest metadata:
|
|
90
|
+
|
|
91
|
+
- Supported values should start as `required` and `optional`.
|
|
92
|
+
- Missing criticality reads as `required`.
|
|
93
|
+
- Optional unresolved nodes warn instead of blocking build readiness.
|
|
94
|
+
- Workflow graph usage can inform UI messaging, but must not silently downgrade
|
|
95
|
+
user-declared custom node criticality.
|
|
96
|
+
|
|
97
|
+
## Testing
|
|
98
|
+
|
|
99
|
+
Run tests from the repo root with uv:
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
uv run pytest packages/core/tests/ -v
|
|
103
|
+
uv run pytest packages/core/tests/unit/managers/test_pyproject_manager.py -v
|
|
104
|
+
uv run pytest packages/core/tests/ -k "injection" -v
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
Core tests should usually exercise core APIs and fixtures rather than subprocess
|
|
108
|
+
CLI calls. See `tests/README.md` for fixture details:
|
|
109
|
+
|
|
110
|
+
- `test_workspace` creates an isolated workspace.
|
|
111
|
+
- `test_env` creates a minimal environment without cloning ComfyUI.
|
|
112
|
+
- `test_models` creates indexed model stubs.
|
|
113
|
+
- `tests/helpers/` has workflow builders and pyproject assertions.
|
|
114
|
+
|
|
115
|
+
## Style
|
|
116
|
+
|
|
117
|
+
- Keep orchestration methods scannable; extract complex decision logic.
|
|
118
|
+
- Prefer guard clauses over nested branches.
|
|
119
|
+
- Avoid state-tracking boolean flags when the actual state can be checked.
|
|
120
|
+
- Keep compatibility/fallback code only when it protects real current behavior.
|
|
121
|
+
- Add focused tests for main paths and important edge cases; avoid large matrices
|
|
122
|
+
for low-risk changes.
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
<!-- NOTE: packages/core/AGENTS.md and packages/core/CLAUDE.md must stay in sync. -->
|
|
2
|
+
|
|
3
|
+
# ComfyGit Core Agent Guide
|
|
4
|
+
|
|
5
|
+
`packages/core` is the UI-agnostic library package. It owns workspace and
|
|
6
|
+
environment state, manifest semantics, sync/materialization behavior, model and
|
|
7
|
+
node metadata, git orchestration, and callback/protocol contracts used by CLI,
|
|
8
|
+
manager, deploy, and future runtime tooling.
|
|
9
|
+
|
|
10
|
+
## Active Truth Layer
|
|
11
|
+
|
|
12
|
+
Read root truth-layer docs before changing core behavior:
|
|
13
|
+
|
|
14
|
+
- `../../docs/contracts/core/CONTRACT.md` - active core contract and invariants.
|
|
15
|
+
- `../../docs/specs/environment-manifest-model.md` - tracked manifest semantics.
|
|
16
|
+
- `../../docs/specs/environment-sync-lifecycle.md` - sync/run/git lifecycle.
|
|
17
|
+
- `../../docs/specs/dependency-criticality.md` - model/node required vs optional behavior.
|
|
18
|
+
- `../../docs/spec-driven-development.md` - clause syntax and validation rules.
|
|
19
|
+
|
|
20
|
+
Package docs are supporting reference:
|
|
21
|
+
|
|
22
|
+
- `docs/architecture.md` - core layer overview.
|
|
23
|
+
- `docs/layer-hierarchy.md` - package-local layering reference.
|
|
24
|
+
- `docs/knowledge/` - topic-specific behavior notes.
|
|
25
|
+
- `docs/plans/` - planning docs; verify against truth-layer clauses before treating as current.
|
|
26
|
+
|
|
27
|
+
## Core Boundaries
|
|
28
|
+
|
|
29
|
+
- Keep core independent of CLI, manager UI, and ComfyUI panel rendering.
|
|
30
|
+
- Avoid normal-use `print()` and `input()` in core; expose callbacks,
|
|
31
|
+
strategies, protocols, return values, and exceptions so callers own UX.
|
|
32
|
+
- Prefer `Workspace` and `Environment` as public entry points. Keep direct manager
|
|
33
|
+
access for internal composition, tests, and package-local advanced behavior.
|
|
34
|
+
- Do not put service-specific deployment policy into core. Core should
|
|
35
|
+
write/read portable manifest semantics that runtime adapters can consume.
|
|
36
|
+
|
|
37
|
+
## Source Map
|
|
38
|
+
|
|
39
|
+
| Path | Purpose |
|
|
40
|
+
| --- | --- |
|
|
41
|
+
| `src/comfygit_core/core/` | Public `Workspace` and `Environment` APIs. |
|
|
42
|
+
| `src/comfygit_core/managers/` | Stateful orchestration for pyproject, uv, git, nodes, workflows, models, overlays, and symlinks. |
|
|
43
|
+
| `src/comfygit_core/models/` | Dataclasses, protocols, exceptions, manifest/workflow/sync types. |
|
|
44
|
+
| `src/comfygit_core/resolvers/` | Node and model resolution logic. |
|
|
45
|
+
| `src/comfygit_core/services/` | Stateless business logic, registry/model lookup, downloads, workflow services. |
|
|
46
|
+
| `src/comfygit_core/repositories/` | SQLite-backed caches and persistent indexes. |
|
|
47
|
+
| `src/comfygit_core/analyzers/` | Workflow, git, config, model, and custom-node analysis. |
|
|
48
|
+
| `src/comfygit_core/integrations/` | External command integrations such as uv. |
|
|
49
|
+
| `src/comfygit_core/utils/` | Low-level filesystem, git, dependency, PyTorch, retry, and parsing helpers. |
|
|
50
|
+
|
|
51
|
+
Check existing managers/services before adding new abstractions.
|
|
52
|
+
|
|
53
|
+
## Key Managers
|
|
54
|
+
|
|
55
|
+
| Manager | File | Main responsibility |
|
|
56
|
+
| --- | --- | --- |
|
|
57
|
+
| `PyprojectManager` | `managers/pyproject_manager.py` | Manifest CRUD and temporary uv/PyTorch injection. |
|
|
58
|
+
| `UVProjectManager` | `managers/uv_project_manager.py` | uv sync/add/remove operations. |
|
|
59
|
+
| `OverlayManager` | `managers/overlay_manager.py` | Overlay loading and legacy `.local-uv-config` migration. |
|
|
60
|
+
| `PyTorchBackendManager` | `managers/pytorch_backend_manager.py` | `.pytorch-backend`, GPU probing, torch source config. |
|
|
61
|
+
| `NodeManager` | `managers/node_manager.py` | Custom node install/remove/update. |
|
|
62
|
+
| `WorkflowManager` | `managers/workflow_manager.py` | Workflow tracking, node/model resolution, contract metadata. |
|
|
63
|
+
| `EnvironmentModelManager` | `managers/environment_model_manager.py` | Environment-level model status and metadata aggregation. |
|
|
64
|
+
| `GitManager` | `managers/git_manager.py` | Environment repo git operations. |
|
|
65
|
+
| `ExportImportManager` | `managers/export_import_manager.py` | Portable environment import/export. |
|
|
66
|
+
|
|
67
|
+
## Manifest And Local State
|
|
68
|
+
|
|
69
|
+
Tracked portable truth lives in each environment repo's `pyproject.toml`.
|
|
70
|
+
Runtime/materialized state lives under environment runtime directories such as
|
|
71
|
+
`.cec/`, virtualenvs, ComfyUI checkouts, symlinks, caches, and local SQLite DBs.
|
|
72
|
+
|
|
73
|
+
Machine-local sync inputs are not portable manifest truth:
|
|
74
|
+
|
|
75
|
+
- `.pytorch-backend` stores local torch backend choice and generated source pins.
|
|
76
|
+
- Local uv overrides now flow through overlays, with legacy `.local-uv-config`
|
|
77
|
+
migrated by `OverlayManager`.
|
|
78
|
+
|
|
79
|
+
`PyprojectManager.uv_injection_context()` temporarily merges local overlays and
|
|
80
|
+
PyTorch backend config into `pyproject.toml` for uv operations, then restores the
|
|
81
|
+
tracked manifest in a `finally` path. Preserve that invariant.
|
|
82
|
+
|
|
83
|
+
## Dependency Criticality
|
|
84
|
+
|
|
85
|
+
Current model criticality supports required, flexible, and optional. Required
|
|
86
|
+
unresolved models are reproducibility blockers; optional unresolved models are
|
|
87
|
+
warnings.
|
|
88
|
+
|
|
89
|
+
Custom node criticality is planned as explicit manifest metadata:
|
|
90
|
+
|
|
91
|
+
- Supported values should start as `required` and `optional`.
|
|
92
|
+
- Missing criticality reads as `required`.
|
|
93
|
+
- Optional unresolved nodes warn instead of blocking build readiness.
|
|
94
|
+
- Workflow graph usage can inform UI messaging, but must not silently downgrade
|
|
95
|
+
user-declared custom node criticality.
|
|
96
|
+
|
|
97
|
+
## Testing
|
|
98
|
+
|
|
99
|
+
Run tests from the repo root with uv:
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
uv run pytest packages/core/tests/ -v
|
|
103
|
+
uv run pytest packages/core/tests/unit/managers/test_pyproject_manager.py -v
|
|
104
|
+
uv run pytest packages/core/tests/ -k "injection" -v
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
Core tests should usually exercise core APIs and fixtures rather than subprocess
|
|
108
|
+
CLI calls. See `tests/README.md` for fixture details:
|
|
109
|
+
|
|
110
|
+
- `test_workspace` creates an isolated workspace.
|
|
111
|
+
- `test_env` creates a minimal environment without cloning ComfyUI.
|
|
112
|
+
- `test_models` creates indexed model stubs.
|
|
113
|
+
- `tests/helpers/` has workflow builders and pyproject assertions.
|
|
114
|
+
|
|
115
|
+
## Style
|
|
116
|
+
|
|
117
|
+
- Keep orchestration methods scannable; extract complex decision logic.
|
|
118
|
+
- Prefer guard clauses over nested branches.
|
|
119
|
+
- Avoid state-tracking boolean flags when the actual state can be checked.
|
|
120
|
+
- Keep compatibility/fallback code only when it protects real current behavior.
|
|
121
|
+
- Add focused tests for main paths and important edge cases; avoid large matrices
|
|
122
|
+
for low-risk changes.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: comfygit-core
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.4.0
|
|
4
4
|
Summary: ComfyGit Core - Git-based ComfyUI environment manager
|
|
5
5
|
Project-URL: Documentation, https://docs.comfygit.org/
|
|
6
6
|
Project-URL: Repository, https://github.com/comfygit-ai/comfygit
|
|
@@ -10,10 +10,10 @@ Requires-Python: >=3.10
|
|
|
10
10
|
Requires-Dist: blake3>=0.3.3
|
|
11
11
|
Requires-Dist: huggingface-hub>=0.11.0
|
|
12
12
|
Requires-Dist: packaging>=16.2
|
|
13
|
-
Requires-Dist: requests>=2.
|
|
13
|
+
Requires-Dist: requests>=2.33.0
|
|
14
14
|
Requires-Dist: requirements-parser>=0.11.0
|
|
15
15
|
Requires-Dist: tomlkit>=0.11.0
|
|
16
|
-
Requires-Dist: uv>=0.
|
|
16
|
+
Requires-Dist: uv>=0.11.8
|
|
17
17
|
Requires-Dist: xxhash>=2.0.0
|
|
18
18
|
Description-Content-Type: text/markdown
|
|
19
19
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "comfygit-core"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.4.0"
|
|
4
4
|
description = "ComfyGit Core - Git-based ComfyUI environment manager"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
requires-python = ">=3.10"
|
|
@@ -8,10 +8,10 @@ dependencies = [
|
|
|
8
8
|
"blake3>=0.3.3",
|
|
9
9
|
"huggingface_hub>=0.11.0",
|
|
10
10
|
"packaging>=16.2",
|
|
11
|
-
"requests>=2.
|
|
11
|
+
"requests>=2.33.0",
|
|
12
12
|
"requirements-parser>=0.11.0",
|
|
13
13
|
"tomlkit>=0.11.0",
|
|
14
|
-
"uv>=0.
|
|
14
|
+
"uv>=0.11.8",
|
|
15
15
|
"xxhash>=2.0.0",
|
|
16
16
|
]
|
|
17
17
|
|
|
@@ -30,5 +30,5 @@ packages = ["src/comfygit_core"]
|
|
|
30
30
|
|
|
31
31
|
[dependency-groups]
|
|
32
32
|
dev = [
|
|
33
|
-
"pytest>=
|
|
33
|
+
"pytest>=9.0.3",
|
|
34
34
|
]
|
|
@@ -38,7 +38,8 @@ class NodeClassifier:
|
|
|
38
38
|
def __init__(
|
|
39
39
|
self,
|
|
40
40
|
cec_path: Path | None = None,
|
|
41
|
-
builtin_versions_repository: ComfyUIBuiltinVersionsRepository | None = None
|
|
41
|
+
builtin_versions_repository: ComfyUIBuiltinVersionsRepository | None = None,
|
|
42
|
+
version_agnostic: bool = False,
|
|
42
43
|
):
|
|
43
44
|
"""
|
|
44
45
|
Initialize node classifier with environment-specific or global builtins.
|
|
@@ -48,11 +49,28 @@ class NodeClassifier:
|
|
|
48
49
|
If provided, loads from .cec/comfyui_builtins.json.
|
|
49
50
|
If None or file missing, falls back to global config.
|
|
50
51
|
builtin_versions_repository: Optional repository for version-indexed builtins.
|
|
52
|
+
version_agnostic: If True, treat ALL known builtins as present regardless
|
|
53
|
+
of version. Used for standalone/web analysis where we're
|
|
54
|
+
not tied to a specific ComfyUI installation.
|
|
51
55
|
"""
|
|
52
56
|
self.builtin_versions_repository = builtin_versions_repository
|
|
57
|
+
self.version_agnostic = version_agnostic
|
|
53
58
|
self.builtin_nodes, detected_version = self._load_builtin_nodes(cec_path)
|
|
54
59
|
self.comfyui_version = detected_version or self._load_comfyui_version_from_pyproject(cec_path)
|
|
55
60
|
|
|
61
|
+
# In version-agnostic mode, expand builtin_nodes to include ALL known builtins
|
|
62
|
+
# so they classify as "builtin" rather than "version_gated"
|
|
63
|
+
if self.version_agnostic and self.builtin_versions_repository:
|
|
64
|
+
db = self.builtin_versions_repository.database
|
|
65
|
+
if db:
|
|
66
|
+
extra = set(db.builtins.keys()) - self.builtin_nodes
|
|
67
|
+
if extra:
|
|
68
|
+
logger.debug(
|
|
69
|
+
"Version-agnostic mode: adding %d version-indexed builtins to known set",
|
|
70
|
+
len(extra),
|
|
71
|
+
)
|
|
72
|
+
self.builtin_nodes = self.builtin_nodes | extra
|
|
73
|
+
|
|
56
74
|
def _load_builtin_nodes(self, cec_path: Path | None) -> tuple[set[str], str | None]:
|
|
57
75
|
"""Load builtin nodes from environment or global fallback."""
|
|
58
76
|
if cec_path:
|
|
@@ -5,6 +5,8 @@ import subprocess
|
|
|
5
5
|
from pathlib import Path
|
|
6
6
|
from typing import TYPE_CHECKING
|
|
7
7
|
|
|
8
|
+
from packaging.version import InvalidVersion, Version
|
|
9
|
+
|
|
8
10
|
from comfygit_core.constants import CUSTOM_NODES_BLACKLIST
|
|
9
11
|
|
|
10
12
|
from ..logging.logging_config import get_logger
|
|
@@ -25,6 +27,20 @@ if TYPE_CHECKING:
|
|
|
25
27
|
logger = get_logger(__name__)
|
|
26
28
|
|
|
27
29
|
|
|
30
|
+
def _versions_match(actual: str | None, expected: str | None) -> bool:
|
|
31
|
+
"""Compare node versions using package-version semantics when possible."""
|
|
32
|
+
if actual == expected:
|
|
33
|
+
return True
|
|
34
|
+
|
|
35
|
+
if not actual or not expected:
|
|
36
|
+
return False
|
|
37
|
+
|
|
38
|
+
try:
|
|
39
|
+
return Version(actual) == Version(expected)
|
|
40
|
+
except InvalidVersion:
|
|
41
|
+
return False
|
|
42
|
+
|
|
43
|
+
|
|
28
44
|
class StatusScanner:
|
|
29
45
|
"""Scans environment to get current state."""
|
|
30
46
|
|
|
@@ -359,12 +375,16 @@ class StatusScanner:
|
|
|
359
375
|
if expected_node.source == 'development':
|
|
360
376
|
continue
|
|
361
377
|
|
|
362
|
-
|
|
378
|
+
actual_version = current_node.version
|
|
379
|
+
if expected_node.source == "git" and current_node.git_commit:
|
|
380
|
+
actual_version = current_node.git_commit
|
|
381
|
+
|
|
382
|
+
if expected_node.version and not _versions_match(actual_version, expected_node.version):
|
|
363
383
|
comparison.version_mismatches.append(
|
|
364
384
|
{
|
|
365
385
|
"name": name,
|
|
366
386
|
"expected": expected_node.version,
|
|
367
|
-
"actual":
|
|
387
|
+
"actual": actual_version,
|
|
368
388
|
}
|
|
369
389
|
)
|
|
370
390
|
|
|
@@ -34,11 +34,13 @@ class WorkflowDependencyParser:
|
|
|
34
34
|
workflow_name: str | None = None,
|
|
35
35
|
model_config: ModelConfig | None = None,
|
|
36
36
|
cec_path: Path | None = None,
|
|
37
|
-
builtin_versions_repository: ComfyUIBuiltinVersionsRepository | None = None
|
|
37
|
+
builtin_versions_repository: ComfyUIBuiltinVersionsRepository | None = None,
|
|
38
|
+
version_agnostic: bool = False,
|
|
38
39
|
):
|
|
39
40
|
self.model_config = model_config or ModelConfig.load()
|
|
40
41
|
self.cec_path = cec_path
|
|
41
42
|
self.builtin_versions_repository = builtin_versions_repository
|
|
43
|
+
self.version_agnostic = version_agnostic
|
|
42
44
|
|
|
43
45
|
# Accept either Workflow object or Path
|
|
44
46
|
if isinstance(workflow, Path):
|
|
@@ -67,7 +69,8 @@ class WorkflowDependencyParser:
|
|
|
67
69
|
# Create classifier with environment-specific builtins
|
|
68
70
|
classifier = NodeClassifier(
|
|
69
71
|
self.cec_path,
|
|
70
|
-
builtin_versions_repository=self.builtin_versions_repository
|
|
72
|
+
builtin_versions_repository=self.builtin_versions_repository,
|
|
73
|
+
version_agnostic=self.version_agnostic,
|
|
71
74
|
)
|
|
72
75
|
|
|
73
76
|
# Analyze and resolve models and nodes
|
|
@@ -88,6 +88,20 @@ class WorkflowCacheRepository:
|
|
|
88
88
|
# Ensure schema exists
|
|
89
89
|
self._ensure_schema()
|
|
90
90
|
|
|
91
|
+
def _get_current_models_sync_time(self) -> str | None:
|
|
92
|
+
"""Return the model-index sync timestamp that affects resolution caches."""
|
|
93
|
+
if not self.workspace_config_manager:
|
|
94
|
+
return None
|
|
95
|
+
|
|
96
|
+
try:
|
|
97
|
+
config = self.workspace_config_manager.load()
|
|
98
|
+
if config.global_model_directory and config.global_model_directory.last_sync:
|
|
99
|
+
return config.global_model_directory.last_sync
|
|
100
|
+
except Exception as e:
|
|
101
|
+
logger.warning(f"Failed to check current model sync time: {e}")
|
|
102
|
+
|
|
103
|
+
return None
|
|
104
|
+
|
|
91
105
|
def _ensure_schema(self) -> None:
|
|
92
106
|
"""Create database schema if needed."""
|
|
93
107
|
# Create schema info table
|
|
@@ -209,10 +223,22 @@ class WorkflowCacheRepository:
|
|
|
209
223
|
logger.warning(f"Failed to stat workflow file {workflow_path}: {e}")
|
|
210
224
|
return None
|
|
211
225
|
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
226
|
+
pyproject_mtime_for_session = 0.0
|
|
227
|
+
if pyproject_path and pyproject_path.exists():
|
|
228
|
+
try:
|
|
229
|
+
pyproject_mtime_for_session = pyproject_path.stat().st_mtime
|
|
230
|
+
except OSError as e:
|
|
231
|
+
logger.debug(f"Could not stat pyproject for session cache key; using default mtime: {e}")
|
|
232
|
+
current_models_sync_time = self._get_current_models_sync_time()
|
|
233
|
+
|
|
234
|
+
# Phase 1: Check session cache. Include every external state value that
|
|
235
|
+
# can change resolution while workflow bytes stay the same. Long-running
|
|
236
|
+
# Manager/serve processes otherwise keep stale model resolutions after
|
|
237
|
+
# pyproject writes or model-index syncs.
|
|
238
|
+
session_key = (
|
|
239
|
+
f"{env_name}:{workflow_name}:{mtime}:{size}:"
|
|
240
|
+
f"{pyproject_mtime_for_session}:{current_models_sync_time}"
|
|
241
|
+
)
|
|
216
242
|
|
|
217
243
|
if session_key in self._session_cache:
|
|
218
244
|
elapsed = (time.perf_counter() - start_time) * 1000
|
|
@@ -297,15 +323,7 @@ class WorkflowCacheRepository:
|
|
|
297
323
|
if pyproject_mtime == cached_pyproject_mtime:
|
|
298
324
|
# Check if model index has changed since cache was created
|
|
299
325
|
cached_sync_time = cached_row.get('models_sync_time')
|
|
300
|
-
current_sync_time =
|
|
301
|
-
|
|
302
|
-
if self.workspace_config_manager:
|
|
303
|
-
try:
|
|
304
|
-
config = self.workspace_config_manager.load()
|
|
305
|
-
if config.global_model_directory and config.global_model_directory.last_sync:
|
|
306
|
-
current_sync_time = config.global_model_directory.last_sync
|
|
307
|
-
except Exception as e:
|
|
308
|
-
logger.warning(f"Failed to check current model sync time: {e}")
|
|
326
|
+
current_sync_time = current_models_sync_time
|
|
309
327
|
|
|
310
328
|
# Compare sync times (both might be None, which is fine)
|
|
311
329
|
if cached_sync_time != current_sync_time:
|
|
@@ -418,8 +436,8 @@ class WorkflowCacheRepository:
|
|
|
418
436
|
if pyproject_path and pyproject_path.exists():
|
|
419
437
|
try:
|
|
420
438
|
pyproject_mtime = pyproject_path.stat().st_mtime
|
|
421
|
-
except OSError:
|
|
422
|
-
|
|
439
|
+
except OSError as e:
|
|
440
|
+
logger.debug(f"Could not stat pyproject for persistent cache metadata; using default mtime: {e}")
|
|
423
441
|
|
|
424
442
|
# Compute resolution context hash
|
|
425
443
|
resolution_context_hash = ""
|
|
@@ -430,14 +448,7 @@ class WorkflowCacheRepository:
|
|
|
430
448
|
)
|
|
431
449
|
|
|
432
450
|
# Get models_sync_time for cache invalidation check
|
|
433
|
-
models_sync_time =
|
|
434
|
-
if self.workspace_config_manager:
|
|
435
|
-
try:
|
|
436
|
-
config = self.workspace_config_manager.load()
|
|
437
|
-
if config.global_model_directory and config.global_model_directory.last_sync:
|
|
438
|
-
models_sync_time = config.global_model_directory.last_sync
|
|
439
|
-
except Exception:
|
|
440
|
-
pass
|
|
451
|
+
models_sync_time = self._get_current_models_sync_time()
|
|
441
452
|
|
|
442
453
|
# Serialize data
|
|
443
454
|
dependencies_json = self._serialize_dependencies(dependencies)
|
|
@@ -460,8 +471,11 @@ class WorkflowCacheRepository:
|
|
|
460
471
|
dependencies_json, resolution_json, cached_at)
|
|
461
472
|
)
|
|
462
473
|
|
|
463
|
-
# Update session cache
|
|
464
|
-
session_key =
|
|
474
|
+
# Update session cache with all state that can affect resolution.
|
|
475
|
+
session_key = (
|
|
476
|
+
f"{env_name}:{workflow_name}:{workflow_mtime}:{workflow_size}:"
|
|
477
|
+
f"{pyproject_mtime}:{models_sync_time}"
|
|
478
|
+
)
|
|
465
479
|
self._session_cache[session_key] = CachedWorkflowAnalysis(
|
|
466
480
|
dependencies=dependencies,
|
|
467
481
|
resolution=resolution,
|