aws-samples / aws-samples/sample-autonomous-cloud-coding-agents

feat(github): include issue comments and supported attachments in task context

Abierto
#582 0 comentarios 0 reacciones 0 asignados Ver en GitHub
adapters agent-runtime enhancement
Lenguaje dominante
TypeScript
Estrellas
143
Forks
46
Merge medio
3 d 10 h
PR fusionados (30 d)
24

Descripción

## Component

CDK GitHub adapter, context hydration, attachment screening

## Describe the feature

GitHub issue-origin tasks should include practical issue context beyond the title/body: recent issue comments and supported markdown-linked attachments or URLs, screened through the existing ABCA input pipeline.

## Use case

GitHub issues often collect repro logs, screenshots, design links, and clarifications in comments after the original issue body. If ABCA only sees the title/body from the webhook payload, it may miss context the team already provided.

## Proposed solution

Add context enrichment for GitHub issue-triggered tasks:

- Fetch the issue body and recent human comments through the GitHub REST API after webhook verification.
- Include recent comments in the task description with attribution and ordering.
- Extract supported markdown image/URL attachments from issue body and selected comments.
- Route URL attachments through the existing URL attachment validation, SSRF protection, and Guardrail screening path.
- Skip bot comments and ABCA-authored comments to avoid self-feedback loops.
- Keep existing attachment limits and fail-closed behavior for blocked or unscreenable attachments.

## Acceptance criteria

- GitHub issues with recent comments include those comments in the task context.
- Supported markdown-linked images/URLs are passed as screened attachments.
- Unsupported, too-large, blocked, or unscreenable attachments do not reach the agent.
- Optional comment fetch failures are logged and produce clear behavior without silently corrupting task context.
- Linear, Jira, Slack, and API task context behavior is unaffected.

## Tests

- Processor/context tests cover comment fetching, bot-comment filtering, attachment extraction, and task payload construction.
- Attachment tests cover URL screening failures and successful URL attachment hydration.
- Docs describe what GitHub issue context is included.

## Out of scope

- Downloading arbitrary binary uploads from private GitHub issue comments unless already supported by the shared attachment pipeline.
- GitHub Discussions.
- Fetching every historical comment on long-running issues.
- GHES-specific URL handling.

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Empieza por la hidratación del contexto del adaptador de GitHub y por el flujo existente de validación de adjuntos URL, protección contra SSRF y evaluación de Guardrail. Usa las pruebas de processor/context y las pruebas de adjuntos descritas en el issue para cubrir la obtención, el filtrado, la extracción y la construcción del payload de los comentarios; estará terminado cuando se incluya el contexto compatible que haya pasado la evaluación, mientras que los adjuntos bloqueados y los fallos opcionales de fetch se comporten de forma clara sin afectar a las demás integraciones.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
github, typescript
Área
api, backend, security
Tipo de issue
Nueva funcionalidad
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Tranquilo
Claridad
Bastante claro
Aptitud para principiantes
45/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.