mirror of
https://github.com/hanzoui/workflow-templates-broken-zap-2026-06-08.git
synced 2026-10-30 20:44:35 +00:00
CI/CD System Overview
Package Architecture
hanzo-studio-workflow-templates/ # Meta package (depends on all others)
├── hanzo-studio-workflow-templates-core # Manifest + core logic
├── hanzo-studio-workflow-templates-media-api # API templates
├── hanzo-studio-workflow-templates-media-video # Video templates
├── hanzo-studio-workflow-templates-media-image # Image templates
├── hanzo-studio-workflow-templates-media-other # Other templates
└── hanzo-studio-subgraph-blueprints # Subgraph blueprints
Workflow Pipeline
Template Added → Version Check → Package Bump → Publish → PyPI + GitHub Release
1. Template Addition (PR)
- Add template files to
templates/ - MUST add template IDs to appropriate bundle in
bundles.json - CI auto-bumps affected package versions + updates meta dependencies
2. Version Detection (ci_version_manager.py)
- Analyzes git history since last package tag
- Bumps packages with template changes
- Updates meta package dependencies (exact pinning
==x.y.z)
3. Publishing (publish.yml)
- Triggers on
pyproject.tomlchanges (main branch) - Builds packages in dependency order (subpackages → meta)
- Recovery mode: publishes any packages newer than PyPI
Critical Files
bundles.json- Template→package mapping (REQUIRED for new templates)pyproject.toml- Meta package with exact dependenciespackages/*/pyproject.toml- Individual package versions- Template manifests auto-generated by
sync_bundles.py
Key Scripts
Core Logic
scripts/ci_version_manager.py- Version detection/bumping logicscripts/sync_bundles.py- Template validation + manifest generationscripts/validate_manifests.py- SHA256 + file consistency checksscripts/sync_custom_nodes.py- Auto-populate requiresCustomNodes from workflow JSONscripts/validate_thumbnails.py- Thumbnail presence and variant validationscripts/check_input_assets.py- Input asset validation
CI Utilities
scripts/ci/validate_bundles.sh- Bundle assignment validation (shared)scripts/ci/get_pypi_version.sh- Robust PyPI version fetching (shared)scripts/ci/get_version.sh- Consistent pyproject.toml version extraction (shared)
Validation Rules
- All templates in
templates/*.jsonMUST be assigned inbundles.json - Template assets MUST match manifest SHA256 hashes
- Package versions MUST use semantic versioning
- Meta dependencies MUST use exact pinning (
==x.y.z)