initial impl

This commit is contained in:
2026-07-19 12:21:26 +02:00
commit e9b895366d
64 changed files with 4113 additions and 0 deletions
+27
View File
@@ -0,0 +1,27 @@
from agentci.adapters.gitea_models import CommentInfo, IssueInfo
from agentci.workflows.context import ContextBuilder
class FakeGitea:
async def issue(self, *_args):
return IssueInfo(number=2, title="Broken widget", body="It fails.", state="open")
async def issue_comments(self, *_args):
return [
CommentInfo(1, "alice", "Details", "2026-01-01"),
CommentInfo(2, "agentci", "Agent job queued", "2026-01-02"),
]
class FakeStorage:
async def operational_comment_ids(self, *_args):
return {2}
async def test_issue_context_excludes_operational_comments() -> None:
builder = ContextBuilder(FakeGitea(), FakeStorage()) # type: ignore[arg-type]
context = await builder.issue_context("org", "repo", 2)
assert "Broken widget" in context
assert "Details" in context
assert "Agent job queued" not in context