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

synackd / ochami / 41718772477
93%

Build:
DEFAULT BRANCH: main
Ran 03 Nov 2026 09:11PM UTC
Jobs 1
Files 209
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

03 Nov 2026 09:03PM UTC coverage: 93.164% (-0.1%) from 93.312%
41718772477

push

github

web-flow
fix: cancel command context on SIGINT and SIGTERM (#234)

* feat(cli): add exit codes for interrupted commands

A signal ends ochami through Go's default disposition today, so the
shell reports 130 for SIGINT and 143 for SIGTERM. Once the root command
cancels its context on those signals instead, the cancellation reaches
commands as an ordinary error, usually already coded (a request error
classified as CodeNetwork, or a prompt failure as CodeGeneric), and the
process would exit with that code.

Add CodeInterrupted (130) and CodeTerminated (143) to the exit code
contract so scripts keep seeing the statuses they see now, and document
them in ochami(1)'s EXIT STATUS table, which the conventions check
compares against CodeName.

Add InterruptError, the cancel cause that carries the signal, and
Interrupted, which replaces a cancellation error with that cause coded
with the signal's exit code. Mapping the code in one place keeps the
many commands that wrap request errors from each needing to recognize
cancellation.

Signed-off-by: Devon Bautista <17506592+synackd@users.noreply.github.com>

* fix(cli): cancel prompts and stdin reads with the command context

Confirmation prompts and stdin payload reads block in a Read of stdin
that nothing can interrupt: LoopYesNo scans until a line or end of
input, and the payload helpers read "-d @-" and stdin payloads to end
of input. Once Ctrl+C cancels the command's context instead of killing
the process, those reads would ignore it and Ctrl+C would appear to do
nothing.

Add IOStreams.InContext, a reader of stdin whose reads return ctx.Err()
once the context is done. Each underlying Read runs in a goroutine into
a private buffer, so an abandoned Read never writes into the caller's
memory, and its result is handed to the next Read so no input is lost.
It reads lazily, so payloads passed inline still never touch stdin.

LoopYesNo, ConfirmCreate, and Runtime.AskToCreate now take a context
and read through it. A cancelled... (continued)

179 of 213 new or added lines in 28 files covered. (84.04%)

13219 of 14189 relevant lines covered (93.16%)

711.31 hits per line

Uncovered Changes

Lines Coverage ∆ File
9
0.0
internal/cli/signal_unix.go
8
88.62
-1.86% cmd/discover/static/static.go
6
93.07
-0.95% pkg/client/rcs/rcs.go
4
84.62
internal/cli/signal.go
2
85.71
-1.21% cmd/bss/boot/image/set.go
2
92.62
-0.76% cmd/root.go
2
93.04
-1.6% cmd/smd/group/update.go
1
95.3
0.06% internal/cli/errors.go
Jobs
ID Job ID Ran Files Coverage
1 41718772477.1 03 Nov 2026 09:11PM UTC 209
93.16
GitHub Action Run
Source Files on build 41718772477
  • Tree
  • List 209
  • Changed 26
  • Source Changed 26
  • Coverage Changed 9
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #41718772477
  • 0977d124 on github
  • Prev Build on main (#41671654404)
  • Next Build on main (#41886189620)
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