Validation & Business Rules
Detailed architecture of validation and business rule enforcement in the Engine.
The Engine provides five core functional areas that work together to manage the complete lifecycle of package revisions:
Enforces package lifecycle state machine and business rules through:
For detailed architecture and process flows, see Lifecycle Management.
Validates operations and enforces business rules to ensure correctness through:
For detailed architecture and process flows, see Validation & Business Rules.
Orchestrates the draft-commit pattern for all package revision modifications through:
For detailed architecture and process flows, see Draft-Commit Workflow Orchestration.
Coordinates task execution by delegating to the Task Handler through:
exec_path), and pod evaluatorFor detailed architecture and process flows, see Task Coordination.
Owns the function runtime chain used by both the v1alpha1 Task Handler and the v1alpha2 PackageRevision controller renderer:
exec_path) → pod evaluatorFor the runtime chain, see Function Evaluation. For pods, see Pod Lifecycle Management. For registries, see Image and Registry Management.
┌─────────────────────────────────────────────────────────┐
│ Engine │
│ │
│ ┌──────────────────┐ ┌──────────────────┐ │
│ │ Validation & │ │ Lifecycle │ │
│ │ Business Rules │ ───> │ Management │ │
│ │ │ │ │ │
│ │ • Lifecycle │ │ • Transitions │ │
│ │ • Tasks │ │ • Constraints │ │
│ │ • Workspace │ │ • Enforcement │ │
│ │ • Clone/Upgrade │ │ │ │
│ │ • Path Overlap │ │ │ │
│ │ • Opt. Locking │ │ │ │
│ └──────────────────┘ └──────────────────┘ │
│ │ │ │
│ └────────┬────────────────┘ │
│ ↓ │
│ ┌──────────────────┐ ┌──────────────────┐ │
│ │ Draft-Commit │ │ Task │ │
│ │ Orchestration │ ───> │ Coordination │ │
│ │ │ │ │ │
│ │ • Open Draft │ │ • ApplyTask │ │
│ │ • Apply Changes │ │ • DoPRMutations │ │
│ │ • Close Draft │ │ • DoPRResource │ │
│ │ • Rollback │ │ Mutations │ │
│ └──────────────────┘ └──────────────────┘ │
└─────────────────────────────────────────────────────────┘
Integration flow:
Each functional area is documented in detail on its own page with architecture diagrams, process flows, and implementation specifics.
The Engine does not implement package/package revision CRUD operations - it delegates to repository adapters:
Delegation operations:
repo.ListPackageRevisionsrepo.ListPackagesrepo.CreatePackagerepo.DeletePackagerepo.DeletePackageRevisionThese are thin wrappers that open the repository through the cache and delegate to repository adapters. The actual storage operations (Git commits, tags, branches) are handled by repository adapters, not the Engine.
The Engine’s real work is orchestration, validation, lifecycle enforcement, task coordination, and function evaluation - not storage operations.
Detailed architecture of validation and business rule enforcement in the Engine.
Detailed architecture of the draft-commit workflow pattern and rollback mechanisms.
Detailed architecture of package revision lifecycle state machine and enforcement.
Detailed architecture of task handler integration and coordination.
Detailed architecture of function evaluation strategies and execution patterns.
Detailed architecture of pod cache management, lifecycle operations, and garbage collection.
Detailed architecture of image metadata caching, registry authentication, and secret management.