Add raft scenarios for uncovered retirement and reconfiguration branches in raft.h

Cerrado
#8,464 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

@achamayou ya está trabajando en esto.

Desde el 5/10/2026.

  • #8507 de @achamayou — abierto

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
38/100
Tipo de issue
Nueva funcionalidad
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
cpp

Línea de trabajo

Start by reading src/consensus/raft/raft.h and the existing tests in tests/raft_scenarios/, especially scenarios added by #8433. Trace the three retirement, vote, and rollback branches and model the required multi-node interleavings. Done means scenarios cover all three branches and pass the CI trace validation against the TLA+ specification.

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

Descripción

NOTE: This type of issue is reserved for the project team. If you are not a member of the team, please use either the bug or feature templates.

What is the motivation for this task
#8433 adds negative-path raft_test cases for src/consensus/aft/raft.h. Its description lists three retirement and reconfiguration interleavings that are reachable, but whose branches are still not covered by raft_test or raft_scenario_test:

  • commit(): a node whose retirement is Signed commits an index below retirement_committable_idx, so idx >= retirement_committable is false.
  • recv_propose_request_vote(): a ProposeRequestVote reaches a node whose retirement is committed, so !is_retired_committed() is false.
  • rollback(): a rollback removes every configuration, so the configuration rollback loop ends because configurations is empty.

These need multi-node interleavings, so they are better written as scenarios in tests/raft_scenarios/, which CI also trace-validates against the TLA+ spec, than as more raft_test fixtures. This was raised in review of #8433 and deferred from it.

Dependencies
None blocking. Measuring the coverage gain is simplest once #8433 has merged.

Describe impact if task is not completed
These raft.h branches stay untested by the consensus unit and scenario tests, so a regression in them would not be caught there, and they keep counting as missed branches in raft.h coverage.

Lenguaje dominante
C++
Estrellas
876
Forks
264
Merge medio
1 d 12 h
PR fusionados (30 d)
107

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 microsoft/CCF

Todos los issues de microsoft/CCF

Issues similares

Más issues de C++

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.