From ab47c970a7bdbcda8df9e54242c05fce8b068d02 Mon Sep 17 00:00:00 2001 From: Saim Mehmood Date: Thu, 22 Oct 2026 11:16:12 -0400 Subject: [PATCH] fix(process): name the fixed finalization delivery grace An unsettled finalization signal delivery reported a bare millisecond figure, without saying whether that grace is adjustable. An agent could infer that raising the caller-selected finalization_ms would extend it. PROCESS_FINALIZATION_DELIVERY_GRACE_MS is module-private with no runtime control, and is independent of finalization_ms (the SIGTERM-to-SIGKILL interval). State both in the reason, keeping the lowercase fragment register used by the sibling reasons on this field. Relates to #5910. --- src/process/capture/ProcessCaptureLifecycle.test.ts | 6 ++++-- src/process/capture/ProcessCaptureLifecycle.ts | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/process/capture/ProcessCaptureLifecycle.test.ts b/src/process/capture/ProcessCaptureLifecycle.test.ts index 4a41321212..f645c45852 100644 --- a/src/process/capture/ProcessCaptureLifecycle.test.ts +++ b/src/process/capture/ProcessCaptureLifecycle.test.ts @@ -379,7 +379,8 @@ it("stops waiting for a hung delivery once the exit is observed", async () => { { signal: "SIGTERM", delivery: "unverified", - reason: "delivery did not settle within 1000 ms", + reason: + "delivery did not settle within REA's fixed 1000 ms signal-delivery grace; this release has no runtime override and a larger finalization_ms does not extend it", }, ]); expect(exit.signal, "the observed exit is kept").toBe(0); @@ -464,7 +465,8 @@ it("stops waiting when the escalation delivery never settles and no exit arrives ).toMatchObject({ signal: "SIGKILL", delivery: "unverified", - reason: "delivery did not settle within 1000 ms", + reason: + "delivery did not settle within REA's fixed 1000 ms signal-delivery grace; this release has no runtime override and a larger finalization_ms does not extend it", }); expect(result.finalization).toMatchObject({ elapsed_ms: null, diff --git a/src/process/capture/ProcessCaptureLifecycle.ts b/src/process/capture/ProcessCaptureLifecycle.ts index c6df725dd5..51f9fc4be3 100644 --- a/src/process/capture/ProcessCaptureLifecycle.ts +++ b/src/process/capture/ProcessCaptureLifecycle.ts @@ -931,7 +931,7 @@ export const awaitTerminalExit = async ({ PROCESS_FINALIZATION_DELIVERY_GRACE_MS, { delivery: "unverified" as const, - reason: `delivery did not settle within ${String(PROCESS_FINALIZATION_DELIVERY_GRACE_MS)} ms`, + reason: `delivery did not settle within REA's fixed ${String(PROCESS_FINALIZATION_DELIVERY_GRACE_MS)} ms signal-delivery grace; this release has no runtime override and a larger finalization_ms does not extend it`, }, { ref: false,