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

prisma-risk / tsoracle / 26692240433
95%

Build:
DEFAULT BRANCH: main
Ran 30 May 2026 07:06PM UTC
Jobs 1
Files 93
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

30 May 2026 06:59PM UTC coverage: 95.248% (+0.02%) from 95.229%
26692240433

push

github

web-flow
fix(seq): re-validate SeqKey on serde deserialize and dense snapshot restore (#596)

`SeqKey` documents `try_new` as the single validation site, but the derived
`Deserialize` constructed the inner `String` directly and bypassed the
non-empty / `<= MAX_SEQ_KEY_LEN` invariant. A crafted or corrupted postcard
payload could therefore land an empty or oversized key in the openraft
`AdvanceDense` log command or the dense snapshot map.

Restore the guarantee fail-loud (matching the codebase's framed-codec
discipline), at both construction sites the honest serving path never reaches
but a malicious mTLS peer or on-disk corruption could:

- tsoracle-core: replace SeqKey's derived serde with hand-written impls that
  route `Deserialize` through `try_new` (mirroring `PeerEndpoint`). `Serialize`
  emits the bare string, so the wire/on-disk byte layout is unchanged for valid
  keys. This covers the log path: `AdvanceDense`'s embedded `SeqKey` now fails
  loud at `decode_entry`.
- tsoracle-driver-openraft: validate every dense key in `install_snapshot`
  before the active-write-version bump and persist, so a rejected install
  leaves store and in-memory state untouched. The snapshot stores raw `String`
  keys, which bypass SeqKey's validating `Deserialize`.

Regression tests cover empty and oversized keys at all three layers
(SeqKey postcard decode, AdvanceDense decode, install_snapshot) plus
valid round-trips. Closes #593.

Signed-off-by: Sebastian Thiebaud <sebastian@prismarisk.com>

125 of 129 new or added lines in 3 files covered. (96.9%)

15854 of 16645 relevant lines covered (95.25%)

349224.51 hits per line

Uncovered Changes

Lines Coverage ∆ File
2
96.75
-0.39% crates/tsoracle-core/src/seq.rs
2
93.27
0.31% crates/tsoracle-driver-openraft/src/log_entry.rs
Jobs
ID Job ID Ran Files Coverage
1 26692240433.1 30 May 2026 07:06PM UTC 93
95.25
GitHub Action Run
Source Files on build 26692240433
  • Tree
  • List 93
  • Changed 4
  • Source Changed 3
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #26692240433
  • e6a708e8 on github
  • Prev Build on main (#26684458745)
  • Next Build on main (#26693855777)
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