Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

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

Open
#8,464 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
38/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
cpp

Research direction

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.

Written by the indexing model from the issue text.

Description

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.

Dominant language
C++
Stars
874
Forks
263
Avg merge
1d 14h
Merged PRs (30d)
157

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/CCF

All issues in microsoft/CCF

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.