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

prisma-risk / tsoracle / 26436390842
95%

Build:
DEFAULT BRANCH: main
Ran 26 May 2026 06:40AM UTC
Jobs 1
Files 88
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

26 May 2026 06:33AM UTC coverage: 95.444% (-0.02%) from 95.461%
26436390842

push

github

web-flow
fix(driver-openraft): enforce lower-bound on format activation target (#479)

* fix(driver-openraft): enforce lower-bound on format activation target

The all-members activation gate previously checked only
`max_readable_version >= target`, accepting any target a member could read
but not enforcing that the target was at least `MIN_READABLE_VERSION` of
the local binary. With MIN==MAX==4 today, an operator call to
`initiate_format_activation(0..=3)` passed the gate, committed a
`SetFormatVersion` raft entry, and flipped `ActiveWriteVersion` to a value
the encode/decode codec arms reject — wedging subsequent log appends and
snapshot builds.

Add `target_in_local_readable_range` and a new
`FormatActivationError::TargetOutOfRange { target, min, max }` variant.
`run_activation_gate` short-circuits before any peer RPC so an
out-of-range target is rejected fast and unambiguously, regardless of
peer capabilities. The same `rejected_by_gate` counter records the
rejection.

Defense-in-depth at apply: the `SetFormatVersion` arm independently
refuses to flip the cell to a target outside the local binary's range
and emits the new `ApplyOutcome::FormatActivationTargetOutOfRange`
variant plus a distinct `noop_target_out_of_range` counter. This guards
two paths the gate cannot — a fixed binary replaying a log committed by
an older buggy binary, and a protocol-violating peer somehow committing
such an entry. The arm uses only entry data plus the binary's
compile-time constants, so replay is deterministic for any single
binary.

`classify_activation_outcome` maps the new outcome back to
`FormatActivationError::TargetOutOfRange` so the operator-facing surface
is uniform regardless of whether the gate or the apply arm fired.

Tests: new unit tests pin the helper and error message; new apply-arm
tests pin the no-op behavior for target=0, target<MIN, target>MAX, and
the replay-determinism contract for an OOR bump. The existing
`set_format_version_subset_match_sets_cell`, `... (continued)

279 of 285 new or added lines in 5 files covered. (97.89%)

8 existing lines in 1 file now uncovered.

13261 of 13894 relevant lines covered (95.44%)

430995.61 hits per line

Uncovered Changes

Lines Coverage ∆ File
2
96.63
-0.2% crates/tsoracle-driver-openraft/src/capabilities.rs
2
93.62
-4.04% crates/tsoracle-driver-openraft/src/standalone.rs
2
96.15
0.42% crates/tsoracle-driver-openraft/src/state_machine.rs

Coverage Regressions

Lines Coverage ∆ File
8
93.62
-4.04% crates/tsoracle-driver-openraft/src/standalone.rs
Jobs
ID Job ID Ran Files Coverage
1 26436390842.1 26 May 2026 06:40AM UTC 88
95.44
GitHub Action Run
Source Files on build 26436390842
  • Tree
  • List 88
  • Changed 5
  • Source Changed 5
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #26436390842
  • f27354e5 on github
  • Prev Build on main (#26435733703)
  • Next Build on main (#26436749231)
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