hackbot: bug-fix silently drops `comment` on a plain run, so there is no way to pass extra instructions
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 70/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Tranquilo
- Stack tecnológico
- python, typescript
Línea de trabajo
Comienza con services/hackbot-api/app/schemas.py y agents/bug-fix/hackbot_agents/bug_fix/main.py; después, sigue el recorrido por agent.py y el prompt triage-and-fix.md. Revisa TriggerForm.tsx para encontrar la entrada opcional y compara su gestión con la de los campos textarea existentes. La tarea está terminada cuando las instrucciones llegan a las ejecuciones normales de bug-fix como INSTRUCTIONS, aparecen de forma segura en el prompt cuando se establecen y siguen ausentes cuando no se establecen.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Problem
BugFixInputs.comment is only honored on the Phabricator follow-up path. agents/bug-fix/hackbot_agents/bug_fix/agent.py:117-126 renders prompts/follow-up.md with {comment} when revision_id is set, and otherwise renders prompts/triage-and-fix.md, which has no {comment} placeholder:
Bug to work on: {bug_id}
Task: Triage and fix the bug, and verify the fix
The rules in {rules_path} are available if the task calls for them, but the task above is your primary directive and overrides the default triage workflow.
The AgentInputs validator only enforces the other direction (revision_id ⇒ comment), and BugFixInputs ignores unknown fields, so POST /agents/bug-fix/runs with {"bug_id": 1234567, "comment": "start from the regression range in comment 4"} is accepted, stored on the run, passed to the container as COMMENT, and then silently dropped. Nothing tells the caller their instructions went nowhere.
The consequence is that there is no way to say anything to a plain bug-fix run beyond the bug id — not from the API, not from TriggerForm.tsx (which collects only bug_id, model, max_turns, effort), and not from a Slack action button.
Change
A new optional instructions on BugFixInputs (services/hackbot-api/app/schemas.py:79-88) and on the agent's AgentInputs (agents/bug-fix/hackbot_agents/bug_fix/__main__.py:8-45) — it reaches the job as INSTRUCTIONS for free through model_to_env — plus an {instructions} slot in triage-and-fix.md: empty when unset, and otherwise framed as guidance that does not override the rules, in the <...>-tag style follow-up.md already uses for untrusted comment text. The str.format safety argument at agent.py:47-55 covers it: substituted values are inserted verbatim and not re-scanned, so an untrusted instructions cannot break out of its placeholder.
Reusing comment instead would make one field mean two different things depending on whether revision_id is set, and would leave the follow-up path's revision semantics (phabricator_update_patch / phabricator_add_comment, config.py:30-36) entangled with a plain "focus here" hint. A separate field is cheaper to reason about.
Worth a <textarea> in TriggerForm.tsx alongside it, the way AutowebcompatReproInputs.bug_data and TestPlanGeneratorInputs.feature_description already have one.
Why this is filed on its own
It came up as the second half of a Slack action-button request: one button that triggers a bug-fix run on the triaged bug, and a second that triggers it with an accompanying prompt. The second one is not possible today, and it also needs a Slack modal (views.open + view_submission, with private_metadata carrying the message identity so the trigger claim still applies), which is receiver work on a different schedule.
Keeping that separate lets this input land whenever it lands. The silent drop of comment on a plain run is worth fixing on its own merits even if a second Slack button never ships.
- Lenguaje dominante
- Python
- Estrellas
- 572
- Forks
- 358
- Merge medio
- 2 d 15 h
- PR fusionados (30 d)
- 98
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de mozilla/bugbug
-
hackbot
Dificultad 2/5 1-3 horas Aptitud para principiantes 73/100
Los mantenedores suelen responder en 1 día
-
hackbot
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
mozilla/bugbug#7046 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
-
Drop redundant `hackbot_ui_url` field from Hackbot API settingsPosiblemente ocupada @RizgarOzan la tomó hace 6 días. Abiertogood-first-bug hackbot
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
hackbot
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
Los mantenedores suelen responder en 1 día
-
Fix ASYNC109 Ruff violationsPosiblemente ocupada @reginaldalfret la tomó hace 9 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
mozilla/bugbug#6987 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de mozilla/bugbug
Issues similares
-
area: agents area: docs good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
openapi/gknowledge#23 ·
-
get() for StrEnumPosiblemente ocupada @FeJo5952 la tomó hoy. Abiertogood first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
collective/icalendar#1921 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Improvement Python Spans
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
getsentry/sentry-python#7994 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
alphagov/notifications-api#5004 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
equinor/radix-flux#3922 ·
Los mantenedores suelen responder en 1 día