Documentation
¶
Index ¶
- Variables
- type ActionReport
- type Enumeration
- type Service
- func (s *Service) Activator() *mods.Activator
- func (s *Service) CancelTest(changes []mods.BatchStateChange)
- func (s *Service) ContinueSearch() (ActionReport, error)
- func (s *Service) Engine() *imcs.Engine
- func (s *Service) EnumerationState() *Enumeration
- func (s *Service) GetCombinedExecutionLog() []imcs.CompletedTest
- func (s *Service) GetCurrentExecutionLog() *imcs.ExecutionLog
- func (s *Service) GetCurrentState() imcs.SearchState
- func (s *Service) NeedsReconciliation() bool
- func (s *Service) PlanAndApplyNextTest() (plan *imcs.TestPlan, changes []mods.BatchStateChange, err error)
- func (s *Service) ReconcileState() (report ActionReport)
- func (s *Service) ResetSearch()
- func (s *Service) StateManager() *mods.StateManager
- func (s *Service) SubmitTestResult(result imcs.TestResult, changes []mods.BatchStateChange)
- func (s *Service) UndoLastStep() error
Constants ¶
This section is empty.
Variables ¶
var ErrNeedsReconciliation = errors.New("system state is inconsistent and needs reconciliation")
ErrNeedsReconciliation is returned by service methods that require a consistent state to operate, but detect that the state has been dirtied by user actions.
var ErrUndoStackEmpty = errors.New("cannot undo: undo stack is empty")
Functions ¶
This section is empty.
Types ¶
type ActionReport ¶ added in v1.0.1
type ActionReport struct {
ModsSetProblematic sets.Set
ModsSetUnresolvable sets.Set
HasChanges bool
}
ActionReport describes the outcome of a state-changing operation like reconciliation or advancing to the next search round.
type Enumeration ¶
type Enumeration struct {
FoundConflictSets []sets.Set
ArchivedExecutionLog *imcs.ExecutionLog
}
Enumeration holds the state for the entire process of finding multiple independent conflict sets.
func NewEnumeration ¶
func NewEnumeration() *Enumeration
NewEnumeration creates and initializes the state for a new enumeration process.
func (*Enumeration) AddFoundConflictSet ¶
func (e *Enumeration) AddFoundConflictSet(conflictSet sets.Set)
AddFoundConflictSet records a newly found conflict set and removes its members from the master candidate pool for future searches.
func (*Enumeration) AppendLog ¶
func (e *Enumeration) AppendLog(log *imcs.ExecutionLog)
AppendLog archives the history from a completed bisection run.
type Service ¶
type Service struct {
// The OnStateChange callback is now only for simple UI redraw notifications.
OnStateChange func()
// contains filtered or unexported fields
}
Service encapsulates the entire bisection business logic.
func NewService ¶
NewService creates a new bisect service from pre-loaded components.
func (*Service) CancelTest ¶
func (s *Service) CancelTest(changes []mods.BatchStateChange)
CancelTest reverts file changes and invalidates the current test plan.
func (*Service) ContinueSearch ¶
func (s *Service) ContinueSearch() (ActionReport, error)
ContinueSearch transitions the system to the next search round. It archives the last result, reconciles the candidate list, creates a new engine, and returns a report of the changes.
func (*Service) EnumerationState ¶
func (s *Service) EnumerationState() *Enumeration
func (*Service) GetCombinedExecutionLog ¶
func (s *Service) GetCombinedExecutionLog() []imcs.CompletedTest
GetCombinedExecutionLog returns a complete history of all test steps taken during the entire session, combining archived logs from previous enumeration runs with the log from the currently active bisection.
func (*Service) GetCurrentExecutionLog ¶
func (s *Service) GetCurrentExecutionLog() *imcs.ExecutionLog
GetCurrentExecutionLog returns the log of completed tests from the active engine.
func (*Service) GetCurrentState ¶
func (s *Service) GetCurrentState() imcs.SearchState
GetCurrentState returns a read-only snapshot of the engine's state.
func (*Service) NeedsReconciliation ¶ added in v1.0.1
NeedsReconciliation returns true if the system state may be inconsistent and a call to ReconcileState is required before performing major operations.
func (*Service) PlanAndApplyNextTest ¶
func (s *Service) PlanAndApplyNextTest() (plan *imcs.TestPlan, changes []mods.BatchStateChange, err error)
PlanAndApplyNextTest is the single entry point for the UI's "Step" action. It will fail if the system state is inconsistent.
func (*Service) ReconcileState ¶ added in v1.0.1
func (s *Service) ReconcileState() (report ActionReport)
ReconcileState checks for and resolves dependency inconsistencies. It is safe to call multiple times; it will do nothing if the state is already consistent. It returns a report of any mods whose state was changed.
func (*Service) ResetSearch ¶
func (s *Service) ResetSearch()
ResetSearch performs a hard reset of the entire bisection process.
func (*Service) StateManager ¶
func (s *Service) StateManager() *mods.StateManager
--- Direct Component Access ---
func (*Service) SubmitTestResult ¶
func (s *Service) SubmitTestResult(result imcs.TestResult, changes []mods.BatchStateChange)
SubmitTestResult processes the outcome of a test.
func (*Service) UndoLastStep ¶
UndoLastStep orchestrates a complete undo operation. It reverts the bisection engine to its previous state.