spec(daemon-registry): the stop requirement does not say what `daemon stop` prints when a stop fails

Abierto
#181 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
Medio día
Aptitud para principiantes
55/100
Tipo de issue
Documentación
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
go
Área
cli

Línea de trabajo

Start with the stop requirement and its existing scenarios in openspec/specs/daemon-registry/spec.md, then read the failure-path tests in internal/cli/daemon_test.go and internal/cli/tui/daemonpicker_test.go to see the printed output and exit codes they pin. Draft scenarios for a listing failure, a total stop failure and a partial stop failure, proposed through an OpenSpec change. Coordinate with #180, which also touches stopTargets. Done means the scenarios match what the tests already assert.

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

Descripción

chore priority:low spec-needed

Problem

The daemon-registry spec does not say what codegraph daemon stop and the codegraph daemon picker print when a stop fails.

The stop scenarios in openspec/specs/daemon-registry/spec.md cover only a stop that returns no error. An example is "Stop all with a malformed record under a live pid": stdout is no running daemons and the command exits 0. No scenario covers:

  • a registry listing that fails;
  • a stop where every per-target signal fails;
  • a stop that stops some daemons and then fails on another.

#179 (fixing #172) set this behavior as a fix, because the spec does not cover it:

  • The "no running daemons", "no running daemon for " and "nothing stopped" notices print only when the error is nil.
  • A failed stop prints the error, and any skipped registry files, on stderr, and exits non-zero.
  • A stop that fails part-way still prints a stopped pid N (<repo>) line for each daemon it stopped.

Tests in internal/cli/daemon_test.go and internal/cli/tui/daemonpicker_test.go pin this behavior. Because no spec states it, a later change can alter it without a spec delta.

Possible direction

  • Add scenarios for a listing failure, a total stop failure and a partial stop failure to the stop requirement, through an OpenSpec change.
  • #180 changes how stopTargets treats os.ErrProcessDone. One change could cover both.

Found by the impact lane of the suite review of #179, which noted that spec.md covers only the nil-error stop case.

🤖 Generated with Claude Code

https://claude.ai/code/session_01XFrTgTHsJM948TTYmCDjP5

Lenguaje dominante
Go
Estrellas
0
Forks
0
Merge medio
7 h 42 min
PR fusionados (30 d)
111

Preparar el entorno

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 seanb4t/codegraph-go

Todos los issues de seanb4t/codegraph-go

Issues similares

Más issues de Go

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.