hackbot: bug-fix silently drops `comment` on a plain run, so there is no way to pass extra instructions
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 70/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Tranquilla
- Stack tecnologico
- python, typescript
Direzione di ricerca
Inizia da services/hackbot-api/app/schemas.py e agents/bug-fix/hackbot_agents/bug_fix/main.py, poi segui il percorso in agent.py e nel prompt triage-and-fix.md. Controlla TriggerForm.tsx per l’input opzionale e confrontane la gestione con quella degli input textarea esistenti. Il lavoro è completato quando le istruzioni raggiungono le normali esecuzioni di bug-fix come INSTRUCTIONS, compaiono in modo sicuro nel prompt quando sono impostate e rimangono assenti quando non sono impostate.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- Python
- Stelle
- 571
- Fork
- 355
- Merge medio
- 2g 17h
- PR unite (30g)
- 86
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di mozilla/bugbug
-
good-first-bug hackbot
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
hackbot
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
I maintainer di solito rispondono entro 1 giorno
-
hackbot
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
mozilla/bugbug#6996 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Fix ASYNC109 Ruff violationsForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
hackbot
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di mozilla/bugbug
Issue simili
-
defect from-review v0.9.2
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
khuisman/mcp-gee-sweet#926 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 Meno di un'ora Idoneità per principianti 84/100
EtanHey/brainlayer#1164 ·
I maintainer di solito rispondono entro 1 giorno
-
bug security
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
yunaremaia/vibeguard#141 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
PrismorSec/prismor#599 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
iii-hq/iii#2278 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno