Files
Assistant/modules/commit/ports/executor.go
2026-08-31 16:28:57 +03:00

29 lines
771 B
Go

package ports
import (
"git.cin.su/m/Assistant/contracts/authority"
"git.cin.su/m/Assistant/contracts/commit"
)
// Executor is the only commit-owned port permitted to reach an external world.
// Its implementation belongs in an isolated adapter/runtime, never in domain.
type Executor interface {
Execute(commit.AuthorizedAction) ExecutionResult
}
// Reconciler verifies an ambiguous effect without applying it again.
type Reconciler interface {
Reconcile(commit.AuthorizedAction) ExecutionResult
}
type ExecutionResult struct {
Succeeded bool
Known bool
Receipt *commit.ExecutionReceipt
}
// AuthorityValidator is the remote-capable boundary to the Authority owner.
type AuthorityValidator interface {
Validate(authority.AuthorizationContext) error
}