• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

prisma-risk / tsoracle / 26202009235
95%

Build:
DEFAULT BRANCH: main
Ran 21 May 2026 02:35AM UTC
Jobs 1
Files 30
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

21 May 2026 02:33AM UTC coverage: 92.174% (+0.6%) from 91.525%
26202009235

push

github

web-flow
feat: openraft-backed ConsensusDriver (#17)

* feat(tsoracle-driver-openraft): scaffold crate with type config and log entry

Adds a new workspace crate that will host the openraft-backed
ConsensusDriver. This first commit covers the data-plane primitives only:

- RaftTypeConfig declared via the toolkit's declare_raft_types_ext!
  macro, with OpenraftPeer as the Node and HighWaterApplied as the apply
  response.
- HighWaterCommand log entry (a single Bump { target } variant)
  implementing AppData via the openraft-required Display + Debug impls.
- Cargo.toml wired into both members and default-members of the
  workspace root.

The state machine and the ConsensusDriver impl land in follow-up
commits so each step keeps the tree green.

* feat(tsoracle-driver-openraft): add HighWaterStateMachine

In-memory RaftStateMachine over a single u64 counter, plus
RaftSnapshotBuilder backed by a bincode-encoded
HighWaterStateMachineSnapshot. The mutable core sits behind an
Arc<parking_lot::Mutex<...>> so cloning the state machine hands out
another handle pointing at the same state — required for openraft's
SnapshotBuilder = Self contract and for the driver's read-side
accessor.

apply() handles the three EntryPayload variants:
- Blank: bumps last_applied only.
- Normal(Bump { target }): current_value = max(current_value, target).
- Membership: records last_membership at the new log_id.

A pub async current_value() accessor lets the driver read the latest
apply-pipeline value without going through Raft. Snapshot install
replaces the full core plus stores the meta + bytes for future
get_current_snapshot calls.

* feat(tsoracle-driver-openraft): implement OpenraftDriver bridging openraft to ConsensusDriver

OpenraftDriver wraps a pre-built Raft<TypeConfig, HighWaterStateMachine>
plus a clone of the state machine and implements the
tsoracle_consensus::ConsensusDriver trait.

leadership_events streams the toolkit's LeadershipState through a
KeepAlive adapter that owns ... (continued)

620 of 659 new or added lines in 7 files covered. (94.08%)

2391 of 2594 relevant lines covered (92.17%)

207309.66 hits per line

Uncovered Changes

Lines Coverage ∆ File
27
75.68
crates/openraft-toolkit/src/test_fakes/mem_network.rs
6
98.16
crates/tsoracle-driver-openraft/src/state_machine.rs
3
95.59
crates/openraft-toolkit/src/test_fakes/partition.rs
3
95.89
crates/tsoracle-driver-openraft/src/driver.rs
Jobs
ID Job ID Ran Files Coverage
1 26202009235.1 21 May 2026 02:35AM UTC 30
92.17
GitHub Action Run
Source Files on build 26202009235
  • Tree
  • List 30
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #26202009235
  • 8c223da9 on github
  • Prev Build on main (#26195519507)
  • Next Build on main (#26203182911)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc