Repository navigation
test(run): cover the branch where the service dies by signal - #284
Conversation
The exit-code branch is pinned by the wants-to-bind fixture; the branch where the process ends by signal was implemented and schema-checked but had no test, so a regression that reported a null code as an exit or lost the signal name would have passed. A fixture that signals itself covers it: the result must carry `exit_signal: "SIGTERM"` with a null `exit_code`, and the unknown must say the process was killed by the signal. Skipped on Windows with the reason in the title, because the platform has no POSIX signals and reports a code instead. Assisted-by: Claude Code (Antruly-dev-1)
The three readiness cases pushed the `launch and stop` describe's callback past the 150-line limit, which the static lane rejected. They are a coherent group of their own — what a run reports when the process ends before the probe answers — so they move to their own describe rather than being trimmed. No test changed. Assisted-by: Claude Code (Antruly-dev-1)
|
🤖 Antruly-dev-1 · AI Engineer 1 · agent:dev-ai-1 The first CI run found one real problem, now fixed at |
Review at
|
Filtering the runner to either readiness case spawned the manifest's default binary — `build/svc`, installed by the earlier refuses-to-bind case — instead of the fixture the case had just written, so `-t 'signal death'` failed with an ENOENT for a binary the case never created. Passing `binary: svc.path` makes each case self-contained, which is also why the silent-child case is fixed here: it had the same dependency. Assisted-by: Claude Code (Antruly-dev-1)
|
🤖 Antruly-dev-1 · AI Engineer 1 · agent:dev-ai-1 You were right about the isolation, and it was not only the signal case: the silent-child case had the same dependency on Evidence at |
Review at
|
|
🤖 Antruly-dev-1 · AI Engineer 1 · agent:dev-ai-1 Nothing has changed at |
|
Approved. Reviewed head
Merging with --match-head-commit. |
Summary
Adds the regression test for
uvp_run's signal-death branch, which #283 mergedwithout: a fixture that signals itself, asserting
exit_code: null,exit_signal: "SIGTERM", aprocess_exitunknown and the "was killed bySIGTERM before the probe answered" wording. Skipped on Windows with the reason
in the test title — the platform reports a code for a terminated process.
Refs #281
Why this is a separate PR
The owner's review of #283 noted the signal branch was implemented but untested
and suggested exactly this fixture. I wrote it, but the commit (
4839475) waspushed after the owner merged #283 at
a5ce0dd(5d0a3da), so it is on thePR branch and not on
main. A merged branch is not amended; this is thechange rebased onto
mainas its own branch, and the correction is recorded on#283.
Problem and expected behavior
A child that ends by signal produced
exit_code: nullwithexit_signalset.Nothing pinned that: the other two fixtures exit with a code, so a regression
that dropped the signal — or reported a null code as a code — would have passed.
Expected: the observed signal and the null code are both asserted, and the
unknown names the signal.
Change and scope
tests/conformance/fixtures/killsItselfWithSigterm.mjs— the self-signallingchild.
tests/conformance/handlers.test.ts— one case for it, skipped on Windows withthe reason in the title.
No source change: this is coverage for behaviour already on
main.Contract and boundary impact
Expected effects: none — this PR changes test files only and starts no service
outside the test process.
Evidence and regression coverage
mainas merged (5d0a3da) with thecase added:
npx vitest run tests/conformance/handlers.test.ts src/domain/unknown.test.ts→ 129 passed.resource_limitfails the exited-childcase; dropping
exitInfo()fails 2 cases (expected undefined to be 3,expected undefined to be null) — the second is this new one.npx vitest run tests/conformance/handlers.test.ts src/domain/unknown.test.tsthe title names.
For evidence-bearing changes:
unknown, notcomplete.undetermined, not a fabricated yes or no.Validation performed
npm run compile— exit 0.npx vitest run tests/conformance/handlers.test.ts src/domain/unknown.test.ts— 129 passed.npm run typecheck— exit 0;npm run lint— exit 0 (see below);npm run format:check— exit 0.Test isolation: both readiness cases now pass
binary: svc.path(b3bd315).Before, filtering to either case spawned
build/svc— the launcher an earliercase installed — and failed with an ENOENT unrelated to the case; observed by
the owner at
4adf419.-t "signal death"and-t "bound-bound"each passalone now, and the full file remains 108 passed.
The static lane's first run failed on
max-lines-per-functionintests/conformance/handlers.test.ts: the three readiness cases pushed thelaunch and stopcallback to 163 lines. Fixed at4adf419by moving them intotheir own
describe— no test changed, and the suite stayed at 108 passed.A template change was generated, built, and run against a real libuvcpp install.
Not applicable (no template or libuvcpp-facing change).
Compatibility, safety, and release
Author readiness
Human owner: @Antruly
Before merge
type(scope): outcome.🤖 Antruly-dev-1 · AI Engineer 1 · agent:dev-ai-1