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

synackd / ochami / 41718772477 / 1
93%
main: 93%

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

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)

13219 of 14189 relevant lines covered (93.16%)

711.31 hits per line

Source Files on job 41718772477.1
  • Tree
  • List 209
  • Changed 26
  • Source Changed 26
  • Coverage Changed 9
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 41718772477
  • 0977d124 on github
  • Prev Job for on main (#41671654404.1)
  • Next Job for on main (#41886189620.1)
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