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

OpenCHAMI / ochami / 40724230526
93%

Build:
DEFAULT BRANCH: main
Ran 28 Oct 2026 04:20PM UTC
Jobs 1
Files 207
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

28 Oct 2026 04:15PM UTC coverage: 92.638% (+0.003%) from 92.635%
40724230526

push

github

web-flow
fix(rcs): send the console close frame with WriteControl (#224)

* fix(rcs): send the console close frame with WriteControl

The interactive console forwards stdin to the websocket from its own
goroutine with conn.WriteMessage. When SIGINT or SIGTERM arrives from
outside the terminal (kill -INT, kill -TERM, a supervisor stopping the
process), the session goroutine sent the close frame with WriteMessage
too, while the input goroutine could still be inside its own call.
gorilla/websocket supports only one concurrent WriteMessage caller, so
this could panic with "concurrent write to websocket connection" or
interleave frames. A Ctrl+C typed in raw mode was not affected, since
the input goroutine returns before the close frame is sent; piped input
and external signals were.

Send the close frame with conn.WriteControl instead, which gorilla
documents as safe to call concurrently with all other methods: it waits
for an in-progress write to finish and then writes the frame, within a
one-second deadline that covers both. Add WriteControl to the
messageWriter interface and to the test fakes, which now record control
frames apart from data frames so the interrupt tests can assert the
close frame never takes the data path.

Fixes #185

Signed-off-by: Volodymyr Shyshkovskyi <5412942+shyshkov@users.noreply.github.com>

* test(rcs): verify the close frame never overlaps an input write

Add a messageWriter fake whose WriteMessage blocks until released and
reports any second WriteMessage that overlaps it, mirroring the
single-writer contract of gorilla/websocket. The test holds the
buffered (piped stdin) input goroutine inside WriteMessage, delivers
SIGTERM on the signal channel, and asserts that the close frame goes
out through WriteControl with a real deadline while that write is
still in progress, with WriteMessage called exactly once. Against the
previous WriteMessage close path the test fails immediately with the
overlap report.

Signed-off-by: Volodymyr Shyshk... (continued)

8 of 8 new or added lines in 1 file covered. (100.0%)

12961 of 13991 relevant lines covered (92.64%)

556.48 hits per line

Jobs
ID Job ID Ran Files Coverage
1 40724230526.1 28 Oct 2026 04:20PM UTC 207
92.64
GitHub Action Run
Source Files on build 40724230526
  • Tree
  • List 207
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #40724230526
  • 22735bbc on github
  • Prev Build on main (#40386220238)
  • Next Build on main (#40742646346)
  • Delete
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