Skip to content

feat(runtime): local workflow orchestration (closes #23)#57

Merged
leo-aa88 merged 1 commit into
mainfrom
issue/23-local-runtime
Apr 12, 2026
Merged

feat(runtime): local workflow orchestration (closes #23)#57
leo-aa88 merged 1 commit into
mainfrom
issue/23-local-runtime

Conversation

@leo-aa88
Copy link
Copy Markdown
Member

Summary

Implements issue #23: MVP local runtime that loads YAML from a project root, applies Environment overrides, validates workflow input before persisting a run, then drives engine.Executor.

API

Environment overrides (MVP)

  • Agents: optional model; constraints merged with non-zero / explicit flags (timeout, iterations, temperature, structured output).
  • Policies: execution limits merged (wall clock, cost ceiling, structured output flag).

Unknown agent/policy names in an environment override return an error.

Engine change

  • Exported engine.ValidateWorkflowInput so the runtime can reject invalid input before StartRun (malformed JSON is rejected earlier in the local runner).

Tests

  • SQLite: full demo workflow (tool + mock agent) with EnvironmentName: staging; asserts succeeded run, trace includes run.started / run.finished.
  • Invalid JSON: no runs row.
  • Invalid schema (valid JSON, wrong shape): no runs row.
  • ApplyEnvironment: reviewer timeoutSeconds = 99.
  • Auto run ID when RunID omitted.

Verification

  • make fmt
  • make vet
  • make test (-race)

Follow-ups

  • Wire agentctl run --project to local.Runtime.
  • Richer policy merge / override semantics if specs evolve.

Closes #23

Made with Cursor

- Add runtime.WorkflowRunner + WorkflowRunOptions; local.Runtime loads project,
  applies Environment overrides (agents/policies), validates JSON + input schema
  before StartRun, runs engine, appends run.started/run.finished trace events
- util.NewRunID via google/uuid
- Export engine.ValidateWorkflowInput for preflight validation
- Tests: SQLite run+trace, invalid JSON/schema skip persistence, env merge, auto run id

Closes #23

Made-with: Cursor
@leo-aa88 leo-aa88 merged commit d00df71 into main Apr 12, 2026
4 checks passed
@leo-aa88 leo-aa88 deleted the issue/23-local-runtime branch April 12, 2026 00:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[MVP] Local runtime orchestration (internal/runtime/local)

1 participant