spackle bench lists and accepts flags it ignores, and passes --pr into corpus scans

Abierto
#132 0 comentarios 0 reacciones 0 asignados Ver en GitHub

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
Activo
Stack tecnológico
go
Área
cli

Línea de trabajo

Start in internal/cli/bench.go where g.register(fs) registers the full shared flag set, then compare it with the flag groups in internal/cli/flags.go. Check internal/bench/run.go to see which config fields it reads, and confirm that cfg.Fix.PR reaches engine.Run. Done means spackle bench --help lists only the flags bench reads, unknown flags are rejected, bench never opens a pull request, and docs/config.md matches. Run go test ./internal/cli ./internal/bench to check.

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

Descripción

documentation good first issue severity: low

Summary

spackle bench registers the full shared flag set, so its help lists, and it accepts, --authorize, --fail-on, --fail-on-confidence and --format, none of which it reads. --pr is passed through into every corpus fixture scan. docs/config.md:106 says "scan and bench take all of them", and the CHANGELOG says commands "now accept only the flags they read".

Where

  • internal/cli/bench.go:29-30 (g.register(fs))
  • internal/cli/bench.go:139 (returns ExitOK without checking fail_on)
  • internal/bench/run.go:100-110 (touches only cfg.Output.Dir; cfg.Fix.PR reaches engine.Run)
  • docs/config.md:106, CHANGELOG.md:46

Impact

Low, because bench is a maintainer command hidden from the main help. Still, spackle bench --fail-on high looks like a CI gate and always exits 0, --format does nothing, and --pr (or [fix] pr = true in a config) sends "push the fix branch and open a pull request" into scans of the corpus fixtures.

Steps to reproduce

  1. spackle bench --help lists --fail-on-confidence.
  2. spackle bench --fail-on low --format json exits 0 and prints the plain-text summary.

Suggested fix

Register only the groups bench reads, for example g.registerGroups(fs, flagsConfig|flagsModel|flagsBudget|flagsOffline|flagsOutput|flagsYes|flagsExclude), keeping --out for the results directory. Force cfg.Fix.PR = false in bench.Run. List bench's flags separately in docs/config.md:106.

Acceptance criteria

  • spackle bench --help lists only flags bench reads, and the others are rejected as unknown.
  • Bench never opens a pull request, whatever the config says.
  • docs/config.md lists bench's flags accurately.

Getting started

  • Relevant files: internal/cli/bench.go, internal/cli/flags.go, internal/bench/run.go, docs/config.md
  • How to run tests: go test ./internal/cli ./internal/bench

Related: #47 (narrowed the flags of report, verify, doctor and debug)


Filed by repo-audit/full-audit at fffef43. Severity: low. Effort: S. audit-key: documentation|internal/cli/bench.go|runBench-flags

Lenguaje dominante
Go
Estrellas
0
Forks
1
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

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 TMHSDigital/Spackle

Todos los issues de TMHSDigital/Spackle

Issues similares

Más issues de Go

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.