Repository navigation
stitchkit v0.106.0
·
155 commits
to master
since this release
⚠️ Breaking changes
Who must act: code passed to runNativeCommand's onLeaderSettled that treats
kind: 'error' as "the command was stopped" (a caller abort, timeoutMs, an exceeded output budget
or a failing sink).
stitchkit/process— a stopped leader settles as'stopped', with its exit.
NativeCommandSettlementgains{ kind: 'stopped', cause, exitCode, signal }: a stopped command
waits for the stop signals and the leader's exit, then settles with the stop'scauseand the
exit code and signal the kernel reported (SIGTERM, orSIGKILLonce the grace ended), which
were lost before.'error'now means only that no exit of the leader was observed (it could not
start, or its exit did not arrive withincleanupTimeoutMs);'exit'is unchanged. The hook
still runs once, after the stop sequence instead of beside it.
// before: onLeaderSettled: (e) => { if (e.kind === 'error') stopped(e.cause) }→
// after: onLeaderSettled: (e) => { if (e.kind === 'stopped') stopped(e.cause, e.signal) }
Who must act: code that handles a stop inkind === 'error'. See
migration. → ADR 0248
Added
stitchkit/process—runNativeCommandtakesstdio: 'inherit': the command gets the caller's
stdin, stdout and stderr, so a terminal stays a terminal (colour, prompts,isatty);capture,
onOutput,stdin,maxOutputBytesanddrainTimeoutMsare refused by name with it.stitchkit/process—runNativeCommandtakesgroup: 'caller': the command joins the caller's
process group, so a Ctrl-C at the terminal reaches it; only its leader is stopped (default stop
{ target: 'leader', signal: 'SIGTERM', graceMs: 100 }), anddescendantsand a group stop are
refused, since its group is the caller's. → ADR 0248