scan.Run should always end with exactly one EventDone
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 65/100
Línea de trabajo
Start in internal/scan/runner.go: read scan.Run, its early-exit paths, and the EventError documentation. Add coverage for each listed early exit and check that each produces exactly one EventDone; then review the CLI, TUI, and pkg/subenum consumers named in the issue. Done means all tests pass and no consumer handles a channel closing without EventDone.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Why it matters
scan.Run has two shapes of ending, and every consumer has to know both. Three consumers now each handle it separately: the CLI (main.go), the TUI (internal/tui/model.go, scan_view.go), and pkg/subenum, which adds an extra KindDone so its callers see one shape.
Evidence
- On five early-exit paths,
scan.RunsendsEventErrorand returns withoutEventDone: an out-of-scope domain, the recursion ceiling, a failed preflight, a failed wildcard check, and a wildcard zone without-force(internal/scan/runner.go, about lines 434–495). Only the deferredclose(events)runs. EventErroris documented as "non-fatal error message" (runner.go:345). In practice, five of its six uses stop the scan. The sixth, the reliability guard at line 877, is followed byEventDone.- The CLI comment says "Early errors such as wildcard detection close the channel without EventDone". The TUI has a
closedflag for "the scan ended without EventDone".
Suggested approach
- Have
scan.Runalways send exactly oneEventDone, withStats(all zero when nothing was scanned), even after an earlyEventError. - Fix the
EventErrordoc comment to say it usually means the scan stopped. - Then remove the special cases: the CLI drain comment, the TUI
closedpath, and the synthesized event inpkg/subenum'sRun.
Done when
scan.Run always ends with one EventDone, a test covers each early-exit path, and none of the three consumers has to handle a channel that closes without one.
- Lenguaje dominante
- Go
- Estrellas
- 1
- Forks
- 1
- Merge medio
- 5 d 2 h
- PR fusionados (30 d)
- 3
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Incluye un Dockerfile o un archivo de Docker Compose
- Tiene una 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 TMHSDigital/subenum
-
area: cli enhancement good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
TMHSDigital/subenum#136 ·
Los mantenedores suelen responder en 1 día
-
community documentation good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
TMHSDigital/subenum#135 ·
Los mantenedores suelen responder en 1 día
-
area: dns enhancement good first issue
Dificultad 2/5 Menos de una hora Aptitud para principiantes 90/100
TMHSDigital/subenum#134 ·
Los mantenedores suelen responder en 1 día
-
community marketing priority: low
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
TMHSDigital/subenum#132 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
feature priority: low
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
TMHSDigital/subenum#131 ·
Los mantenedores suelen responder en 1 día
Todos los issues de TMHSDigital/subenum
Issues similares
-
[schema-coverage] elasticstack_kibana_security_detection_rulePosiblemente ocupada @github-actions la tomó hoy. Abiertoacceptance-tests phase-coding schema-coverage testing triaged
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
elastic/terraform-provider-elasticstack#5186 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
jaegertracing/jaeger#9830 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
apache/rocketmq-dashboard#6318 ·
Los mantenedores suelen responder en 5 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
GoogleCloudPlatform/opentelemetry-operations-collector#710 ·
Los mantenedores suelen responder en 1 día