execute method

  1. @override
Future<CelmRunHandle> execute(
  1. CelmGoalRef goal, {
  2. CelmConstraints? constraints,
  3. AnalysisActor? actor,
})
override

Start goal. Returns once the run has an id; the outcome arrives on the handle.

A goal the pack does not define, or one the caller's constraints make unsatisfiable, is answered with a handle whose outcome is CelmRefused — the id exists so the refusal is on record.

Implementation

@override
Future<CelmRunHandle> execute(
  CelmGoalRef goal, {
  CelmConstraints? constraints,
  AnalysisActor? actor,
}) async {
  final runId = 'stub-run-${++_seq}';
  final outcome = CelmCompleted(runId, budget: _emptyBudget);
  _runs[runId] = CelmProgress(
    runId: runId,
    currentStep: '',
    budget: _emptyBudget,
    outcome: outcome,
  );
  return CelmRunHandle(runId: runId, outcome: Future.value(outcome));
}