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

dcdpr / jp / 26625401120
66%

Build:
DEFAULT BRANCH: main
Ran 29 May 2026 08:01AM UTC
Jobs 1
Files 382
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

29 May 2026 07:54AM UTC coverage: 66.435% (+0.03%) from 66.408%
26625401120

push

github

web-flow
fix(printer): Strip ANSI sequences split across writes (#684)

`strip_ansi_escapes::strip_str` was called once per task, so a CSI
sequence emitted across multiple `write_str` calls (which is exactly
what `write!`/`writeln!` and crossterm do internally) was never seen as
a complete sequence. The escape introducer got dropped while the
parameter bytes survived, producing cruft like `38;5;11m1mgit_diff` in
non-pretty output modes.

Introduce `AnsiStripper<W>` in a new `ansi` module: a `Write` wrapper
that drives a `vte::Parser` over every byte written to it. Because the
parser state lives on the struct, escape sequences split across any
number of calls are correctly recognized and discarded. Only printable
characters and newlines are forwarded to the inner writer.

The `Worker` in `printer.rs` no longer holds a bare `O`/`E` writer pair.
Instead, each stream is wrapped in a new `Sink<W>` enum that is either
`Raw` (pretty formats, pass bytes through) or `Strip` (all other
formats, route through `AnsiStripper`). This means each stream owns its
own persistent parser state, so an open sequence on `out` can never
consume bytes destined for `err`.

Fixes #683

---------

Signed-off-by: Jean Mertz <git@jeanmertz.com>

45 of 47 new or added lines in 2 files covered. (95.74%)

1 existing line in 1 file now uncovered.

31988 of 48149 relevant lines covered (66.44%)

253.95 hits per line

Uncovered Changes

Lines Coverage ∆ File
1
96.43
crates/jp_printer/src/ansi.rs
1
87.56
1.05% crates/jp_printer/src/printer.rs

Coverage Regressions

Lines Coverage ∆ File
1
87.56
1.05% crates/jp_printer/src/printer.rs
Jobs
ID Job ID Ran Files Coverage
1 26625401120.1 29 May 2026 08:01AM UTC 382
66.44
GitHub Action Run
Source Files on build 26625401120
  • Tree
  • List 382
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #26625401120
  • e2db8c90 on github
  • Prev Build on main (#26625300837)
  • Next Build on main (#26627902919)
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