Skip to main content

Module executor

Module executor 

Source
Expand description

Sync Executor - Domain logic for ggen sync command

This module contains the business logic for the sync pipeline, extracted from the CLI layer to maintain separation of concerns.

The executor handles:

  • Manifest parsing and validation
  • Validate-only mode
  • Dry-run mode
  • Full sync pipeline execution

§Architecture

The CLI verb function should be thin (complexity <= 5):

  1. Parse CLI args into SyncOptions
  2. Call SyncExecutor::execute(options)
  3. Return result

All business logic lives here in the executor.

Structs§

BehaviorFlags
Behavioral modifier flags (≤3 bools)
ModeFlags
Execution mode flags — mutually exclusive sync behaviors (≤3 bools)
SyncExecutor
Executes the sync pipeline with given options
SyncFlags
Combined sync flags (groups mode and behavior sub-structs)
SyncOptions
Options for sync execution
SyncResult
Result of sync execution - returned to CLI layer
SyncedFileInfo
Individual file info in sync result
ValidationCheck
Validation check result

Enums§

OutputFormat
Output format for sync results