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,30 @@
from __future__ import annotations
from pathlib import Path
from engine.devops_agent.spec import load_workflow_spec
from engine.devops_agent.validator import validate_workflow_spec
def test_validate_accepts_the_sample_workflow() -> None:
spec = load_workflow_spec(Path("workflows/gitea-issue-delivery.md"))
errors = validate_workflow_spec(spec)
assert errors == []
def test_validate_rejects_write_permissions_without_safe_outputs() -> None:
spec = load_workflow_spec(Path("tests/fixtures/specs/no_safe_outputs_for_write.md"))
errors = validate_workflow_spec(spec)
assert any("safe_outputs" in error for error in errors)
def test_validate_rejects_invalid_path_scope() -> None:
spec = load_workflow_spec(Path("tests/fixtures/specs/invalid_path_scope.md"))
errors = validate_workflow_spec(spec)
assert any("path_scope" in error for error in errors)