Make the offline lint failure message actionable and forbid hand-formatting
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
- 52/100
Direzione di ricerca
Start with scripts/lint.py around lines 171–173 and inspect the bootstrap behavior from #524, which this issue says must land first. Check the existing lint tests and add assertions for the offline failure text, exit code, and the distinct bootstrap failure message; confirm the --online path still prints its build command. Done means all listed validation criteria pass without recommending a network command for an offline run.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
What happened
When the hook cache is cold, scripts/lint.py exits 1 and prints a remedy that cannot work in the sandbox. The message at scripts/lint.py:171-173 says:
No network access is assumed for this run, so the missing revision(s) cannot be fetched. With network access, run:
The command it recommends is PRE_COMMIT_HOME="..." pre-commit install-hooks. That needs github.com. The sandbox has no github.com access.
Agents read the message as "formatting is optional". PR #496 then guessed ruff line wrapping by hand and failed CI. That failure started the fix loop that ended the PR.
Proposed change
Keep the fail-closed exit code 1. Change the message to state the consequence and the required behaviour:
- State that validation did not run.
- State that the agent must not commit.
- State that the agent must not hand-format code.
- State that the agent must list the skipped gates in the pull request body.
- Remove the
pre-commit install-hooksremedy when the run is offline.
Add a distinct message when the bootstrap from #524 ran but failed, so the agent can tell "no bootstrap" from "broken bootstrap".
Validation criteria
- With an empty
PRE_COMMIT_HOME,python3 scripts/lint.py --files AGENTS.mdexits 1 and prints the new text. - The output contains no command that needs network access.
- An automated test asserts the exit code and the required phrases.
- The
--onlinepath still prints the build command.
Related issues
- Blocked by #524. PR #532 rewrites this code, so this change must land after it. See also #550 for the hook conversion.
- The companion
AGENTS.mdrule is tracked separately.
(AI generated)
- Lingua principale
- Go
- Stelle
- 7
- Fork
- 9
- Merge medio
- 22h 37m
- PR unite (30g)
- 118
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
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 redhat-et/ProtoBot
-
bug component:validator triaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
redhat-et/ProtoBot#596 · 5 commenti · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
documentation triaged
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
redhat-et/ProtoBot#589 · 2 commenti · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
documentation risk/low triaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
redhat-et/ProtoBot#588 · 2 commenti · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
feature infra needs-human risk/low triaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
redhat-et/ProtoBot#579 · 6 commenti · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
blocked documentation infra risk/low triaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 63/100
redhat-et/ProtoBot#552 · 6 commenti · 2 reazioni ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di redhat-et/ProtoBot
Issue simili
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
sresarehumantoo/cc-artex#456 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
ollama/ollama#20021 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
factory:subtask
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 75/100
I maintainer di solito rispondono entro 1 giorno
-
release
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 75/100
github/gh-aw-mcpg#17603 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
tinygo-org/tinygo#6727 ·
I maintainer di solito rispondono entro 1 giorno