feat: add gitea agentic runtime control plane

This commit is contained in:
2026-03-13 15:34:18 +08:00
parent 6f6acdb0e6
commit ae540c7890
58 changed files with 1851 additions and 1 deletions

View File

@@ -0,0 +1,29 @@
from __future__ import annotations
from pathlib import Path
import pytest
from engine.devops_agent.spec import WorkflowSpecError, load_workflow_spec
def test_load_workflow_spec_splits_frontmatter_and_body() -> None:
spec = load_workflow_spec(Path("tests/fixtures/specs/valid_workflow.md"))
assert spec.name == "issue-delivery"
assert spec.provider == "gitea"
assert spec.frontmatter["safe_outputs"]["add_comment"]["max"] == 2
assert "Read the selected issue" in spec.body
def test_load_workflow_spec_rejects_missing_provider() -> None:
with pytest.raises(WorkflowSpecError, match="provider"):
load_workflow_spec(Path("tests/fixtures/specs/invalid_missing_provider.md"))
def test_sample_workflow_spec_exists_and_loads() -> None:
spec = load_workflow_spec(Path("workflows/gitea-issue-delivery.md"))
assert spec.name == "gitea-issue-delivery"
assert spec.provider == "gitea"
assert "add_comment" in spec.frontmatter["safe_outputs"]