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

prisma-risk / tsoracle / 26299252624
95%

Build:
DEFAULT BRANCH: main
Ran 22 May 2026 04:30PM UTC
Jobs 1
Files 53
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

22 May 2026 04:20PM UTC coverage: 96.261% (-0.01%) from 96.272%
26299252624

push

github

web-flow
feat: add opt-in bt cargo feature for error backtraces (#120)

* feat: add opt-in bt cargo feature for error backtraces

Add a workspace-wide `bt` Cargo feature that wraps
`std::backtrace::Backtrace` in a tiny `Bt` newtype embedded inline in
selected error variants. Without the feature, `Bt` is a ZST and
`Bt::capture()` is a no-op — embedding it in an enum variant costs
zero bytes. With the feature on, capture still respects
`RUST_BACKTRACE` / `RUST_LIB_BACKTRACE` at runtime, so symbol
resolution stays opt-in at runtime even when compiled in.

`tsoracle-client`, `tsoracle-consensus`, `tsoracle-server`, and
`tsoracle-driver-file` each expose a `bt` feature that forwards to
`tsoracle-core/bt`. The `tsoracle` binary aggregates them so a single
`--features bt` lights up the whole stack.

First instrumented variant is `ServerError::WatchPanic`, whose
semantics ("watch task panicked — programming bug") fit backtrace
capture cleanly. `tsoracle-openraft-toolkit` is deliberately not
wired in: it has no direct `tsoracle-core` dependency and no current
variant that wants a backtrace, so opting in would mean adding a
fresh crate-edge for no current consumer.

* test(core): cover Bt Display Captured branch

Coverage runs use `--all-features`, so the `#[cfg(not(feature = "bt"))]`
arms are excluded entirely from instrumentation. The remaining gap was
the `BacktraceStatus::Captured` branch of `Display::fmt`, which only
fires when `RUST_BACKTRACE` is set — and CI does not set it.

Add a test that constructs `Bt` directly from `Backtrace::force_capture`
to drive the `write!` branch unconditionally, independent of env vars.

34 of 36 new or added lines in 2 files covered. (94.44%)

6874 of 7141 relevant lines covered (96.26%)

80094.61 hits per line

Uncovered Changes

Lines Coverage ∆ File
2
92.59
crates/tsoracle-core/src/bt.rs
Jobs
ID Job ID Ran Files Coverage
1 26299252624.1 22 May 2026 04:30PM UTC 53
96.26
GitHub Action Run
Source Files on build 26299252624
  • Tree
  • List 53
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #26299252624
  • 0786901d on github
  • Prev Build on main (#26299074447)
  • Next Build on main (#26300061678)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc