Guardian asks child agents before PR feedback upkeep

Chiusa
#2,438 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Una pull request collegata è già stata integrata.

  • #2516 di @sentry-junior — integrata

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
30/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
typescript

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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]

Lingua principale
TypeScript
Stelle
385
Fork
42
Merge medio
9h 38m
PR unite (30g)
408

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di getsentry/junior

Tutte le issue di getsentry/junior

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.