aws-samples / aws-samples/sample-autonomous-cloud-coding-agents
feat(github): post final status comments with cost, turns, and duration
- Vorherrschende Sprache
- TypeScript
- Sterne
- 143
- Forks
- 46
- Ø Merge
- 3 T. 9 Std.
- Gemergte PRs (30 T.)
- 20
Beschreibung
## 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.
Beitragsleitfaden
Rechercherichtung
Beginne damit, die vorhandene CDK-Fanout-Logik, den GitHub-Kommentar-Helper und die Implementierung des finalen Status für Linear/Jira zu lokalisieren; führe anschließend die Fanout-Tests aus. Als erledigt gilt die Aufgabe, wenn aus GitHub-Issues stammende Tasks einen einzigen idempotenten abschließenden Kommentar erhalten, der Ergebnis, Kosten, Durchläufe, Dauer, task id und den relevanten PR oder den Grund für den Abbruch abdeckt, während Retries und Nicht-GitHub-Tasks dem angegebenen Verhalten folgen.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- aws, github, typescript
- Bereich
- backend, devops
- Issue-Typ
- Feature
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Ruhig
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 52/100