aws-samples / aws-samples/sample-autonomous-cloud-coding-agents
feat(github): post final status comments with cost, turns, and duration
- Lingua principale
- TypeScript
- Stelle
- 143
- Fork
- 46
- Merge medio
- 3g 9h
- PR unite (30g)
- 20
Descrizione
## 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.
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia individuando il meccanismo di fanout esistente di CDK, l’helper per i commenti di GitHub e l’implementazione dello stato finale di Linear/Jira; quindi esegui i test di fanout. Il lavoro è completato quando le attività originate da issue di GitHub ricevono un unico commento terminale idempotente che copra esito, costo, turni, durata, task id e la PR pertinente o il motivo dell’interruzione, mentre i retry e le attività non GitHub seguono il comportamento indicato.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- aws, github, typescript
- Ambito
- backend, devops
- Tipo di issue
- Funzionalità
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Tranquilla
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 52/100