feat: add gitea agentic runtime control plane
This commit is contained in:
26
tests/unit/test_compiler.py
Normal file
26
tests/unit/test_compiler.py
Normal file
@@ -0,0 +1,26 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
from engine.devops_agent.compiler import compile_workflow
|
||||
from engine.devops_agent.spec import load_workflow_spec
|
||||
|
||||
|
||||
def test_compile_emits_normalized_lock_payload() -> None:
|
||||
spec = load_workflow_spec(Path("workflows/gitea-issue-delivery.md"))
|
||||
|
||||
lock = compile_workflow(spec)
|
||||
|
||||
assert lock["version"] == 1
|
||||
assert lock["workflow_name"] == "gitea-issue-delivery"
|
||||
assert lock["provider"] == "gitea"
|
||||
assert lock["triggers"] == [
|
||||
{
|
||||
"event": "issue_comment",
|
||||
"commands": ["@devops-agent"],
|
||||
}
|
||||
]
|
||||
assert lock["policy"]["path_scope"] == []
|
||||
assert lock["policy"]["require_human_merge"] is True
|
||||
assert lock["safe_outputs"]["add_comment"]["max"] == 3
|
||||
assert "issue_comment" in lock["required_evidence"]
|
||||
Reference in New Issue
Block a user