Guardian asks child agents before PR feedback upkeep

Cerrado
#2,438 2 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Ya se ha fusionado un pull request relacionado.

  • #2516 de @sentry-junior — fusionado

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
30/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
typescript

Línea de trabajo

Start by reading packages/junior/src/chat/guardian/reviewer.ts, policy.ts, and packages/junior/src/chat/agent/index.ts, then review the discussion and related issue #2258 to understand the two proposed approaches. Check the Guardian eval coverage; done means the chosen behavior is implemented and covered for child-agent upkeep and parent turns started by child results.

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

Descripción

When Junior hands PR review feedback to a child agent, Guardian returns ask for the child's github_updatePullRequestFeedback (👍) and github_resolvePullRequestReviewThread calls. The child reports the action as blocked, and the parent then asks the user to confirm in Slack. When the root run does the same work itself, Guardian allows these calls.

  • Cause: CHILD_AGENT_RULES (packages/junior/src/chat/guardian/reviewer.ts) accept authorization only from root user: and automation: lines. The GitHub event that starts the work is an event: line, and the parent task text is not user intent. So the upkeep exception in policy.ts (marking or resolving feedback on a resource that the agent made) does not apply.
  • Parent turns too: when a child result starts a parent turn, action review uses the child result as the user intent (currentUserIntent in packages/junior/src/chat/agent/index.ts). That turn also logs ask or deny for these tools.
  • Evidence: Sentry sentry/junior spans show 9 ask/deny decisions for these two tools between Oct 28 and Oct 30, all in agent:* conversations. Root runs that do this work log allow.
  • When it started: #2265 (Oct 28) began delegating to child agents implicitly. The child rules come from #2147.
  • Coverage gap: no Guardian eval covers feedback upkeep by a child agent, or by a parent after a child result.

Proposed in discussion (two options):

  1. Parent does the upkeep (preferred). The child fixes the code and lists the comments it addressed. The parent adds 👍 and resolves. This needs a thread rule that treats this upkeep as allowed in a turn that a child result started. The child agent rules stay strict.
  2. Child does the upkeep. Treat 👍/resolve on feedback that the delegated work addressed, on a PR that Junior made, as upkeep in CHILD_AGENT_RULES. Keep it narrow, because the child rules block prompt injection from parent task text.

Related: #2258

via @szokeasaurusrex.

--

View Session [Sentry]

Lenguaje dominante
TypeScript
Estrellas
397
Forks
43
Merge medio
7 h 44 min
PR fusionados (30 d)
607

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de getsentry/junior

Todos los issues de getsentry/junior

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.