hosystem Engagements

ho-04.7 — sharibako run feedback (status line + signal-shutdown countdown)

created 2026-07-03
status complete
type ho-document
project sharibako
ho 04.7
kamae 5
shape ri
agent-tasks
  • Ho-04.7-AT-01.md

Give run a voice at the two moments it currently runs silent: startup and Ctrl-C shutdown. Feedback only — no change to what run does.

This is the CLI-polish the Phase 3 → Phase 4 called for. Driving run on real secrets surfaced one class of friction, and it is entirely about feedback, not behavior. Fixing it here keeps it out of the Workshop (Phase 4), where the same silence would have to be re-solved in a GUI idiom.

Out of scope:


Problem

run is silent where a developer wants to know what is happening. Two moments, both raised from real use:

  1. Startup is blank. run decrypts, injects, and spawns with no output of its own. The practitioner's read: "everything was fine just blah… it was just utilitarian." There is no confirmation of which scope resolved, how many secrets went in, or what is being launched — the first visible line is the child's own output.

  2. Ctrl-C shutdown is silent and feels slow. On a signal, ho-04.5's SignalForwarder forwards to the child, waits the 5-second grace, then sends SIGKILL — and prints nothing across that entire window. When a child dies instantly on the tty-delivered signal this is invisible; when a child drags or catches the signal, the terminal hangs with no indication that sharibako is waiting or about to escalate. The practitioner's read: "the Ctrl-C was slow with no feedback — it kind of sucked."

Both are feedback gaps, not defects. run does the right thing; it just does it wordlessly.


Solution

Add two stderr-only feedback surfaces to run, gated on stderr being a TTY so scripted and piped use sees nothing new. No behavioral change.

  1. Startup status line (before spawn): names the resolved scope, the count of secrets injected, and the command being launched. One line, to stderr. It subsumes the existing empty-scope note (a zero count says the same thing).

  2. Signal-shutdown feedback (on SIGINT/SIGTERM/SIGHUP): an immediate forwarding <signal> to child… line, then a plain integer countdown — one line per second across the existing 5-second grace (5, 4, 3, 2, 1), then child unresponsive — SIGKILL if the child outlives the window. New line per tick, no cursor control, so it survives scrollback. When the child dies promptly (the common terminal case) the countdown is cancelled the instant waitUntilExit() returns, so a fast exit shows only the forwarding… line and returns to the prompt.

Everything sharibako prints goes to stderr, never stdout — $(sharibako run …) and pipes stay byte-clean. Emission is gated: on when stderr is a TTY, off when it is not (piped/scripted) or when --json is set, forced on by --verbose (the escape hatch for capturing feedback in a log).

The feedback logic — line formatting, countdown strings, the TTY/flag gate — sits behind an injectable sink, mirroring run's existing RunOutcome / lineReader seams, so it is unit-tested without a live process or a real terminal. The live signal plumbing in SignalForwarder stays coverage-excluded as it already is; only the message strings it emits become testable.


Changes

Single — the work is one bounded conversation across RunCommand, its feedback helper, and SignalForwarder. → /agent-tasks/Ho-04.7-AT-01.md


Results

Shipped in 93b9bc8 (Ho-04.7-AT-01). Build clean, 375 tests green (+13 new), both linters strict-clean. Dogfooded against the real diary scope through the signed install and a real terminal — startup line, stdout-clean-under-pipe, and the live SIGINT countdown all confirmed by the practitioner ("all good").

What the showed:

Two decisions worth recording against the shipped behavior:

Done means:

Flagged to the practitioner (not built here):


Authored: 2026-07-03. Executed and closed: 2026-07-03. Commit: 93b9bc8.

Rendered from the corpus, verbatim · source on GitHub →

ingested: sharibako @ a97b22af9b61 · ho-system @ 79e96b801a13 · the glossary · the colophon