aws-samples / aws-samples/sample-autonomous-cloud-coding-agents
feat(github): post final status comments with cost, turns, and duration
- Ngôn ngữ chính
- TypeScript
- Star
- 146
- Fork
- 46
- Merge trung bình
- 3 ngày 10 giờ
- Pull request đã merge (30 ngày)
- 24
Mô tả
## Component
CDK fanout, GitHub adapter
## Describe the feature
GitHub issue-origin tasks should receive a deterministic final status comment with outcome, cost, turns, duration, task id, and PR link when relevant, matching Linear and the Jira parity issue.
The existing GitHub fanout machinery edits GitHub issue comments for task progress in other contexts, but the GitHub Issues channel needs the terminal status to land on the originating GitHub issue.
## Use case
A user who triggers ABCA from a GitHub issue should be able to see whether the task completed, failed, timed out, or shipped a PR but stopped early without switching to the CLI or logs.
## Proposed solution
Extend fanout for `channel_source: "github"` tasks created from GitHub Issues:
- Read GitHub issue metadata from task `channel_metadata`.
- Render the same outcome framing used for Linear/Jira final status comments.
- Include cost, turns/max-turns, duration, task id, and PR URL when needed.
- Post or edit a GitHub issue comment using the existing GitHub comment helper and token path.
- Persist an idempotency marker/comment id so stream retries do not create duplicate terminal comments.
- Keep progress comments and terminal fanout responsibilities clearly separated.
## Acceptance criteria
- GitHub issue-origin terminal tasks receive one final status comment with cost, turns, duration, and task id.
- A task that opens a PR but fails/stops later includes both the PR link and the stop reason.
- Agent crashes before agent-side completion still produce the platform-side final status comment.
- Retryable GitHub API failures trigger fanout retry; terminal auth/config failures are logged.
- Non-GitHub tasks are unaffected.
## Tests
- Fanout tests cover GitHub success, failure, PR-but-stopped, missing metadata, non-GitHub skip, idempotent retry, and retryable post failure.
- GitHub comment helper tests cover final status rendering if needed.
- Docs mention cost/turn/duration final comments in the GitHub Issues setup guide.
## Out of scope
- GitHub Projects status automation.
- Live streaming progress.
- PR review comments.
- Cost rollups across parent/sub-issues.
Hướng dẫn đóng góp
Hướng nghiên cứu
Bắt đầu bằng cách xác định cơ chế fanout CDK hiện có, helper bình luận GitHub và phần triển khai trạng thái cuối của Linear/Jira; sau đó chạy các bài kiểm thử fanout. Được xem là hoàn tất khi các task bắt nguồn từ issue GitHub nhận một bình luận terminal duy nhất, có tính idempotent, bao gồm kết quả, chi phí, số lượt, thời lượng, task id và PR liên quan hoặc lý do dừng; còn các retry và task không thuộc GitHub thì tuân theo hành vi đã nêu.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- aws, github, typescript
- Lĩnh vực
- backend, devops
- Loại issue
- Tính năng
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Ít trao đổi
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 52/100