feat(process): bound a finalization interval before forced capture timeout
Add optional finalization_ms to keep observing a captured root after SIGTERM, record the actual finalizer exit and each signal attempt, and escalate once when needed. Bind the initial root identity to captured ownership and preserve observations through cleanup uncertainty. Fixes #1253. Co-authored-by: Mykola Dementiev <16836724+nikolay-dementiev@users.noreply.github.com> Co-authored-by: N0zoM1z0 <161784452+N0zoM1z0@users.noreply.github.com>
This commit is contained in:
co-authored by
Mykola Dementiev
N0zoM1z0
parent
1e51c732bb
commit
c1efa6467d
@@ -109,3 +109,31 @@ export const EMPTY_PROCESS_CAPTURE_EXAMPLE = {
|
||||
temporary_root: "removed",
|
||||
},
|
||||
} satisfies JsonValue;
|
||||
|
||||
const finalizedScenario = { ...scenario, finalization_ms: 1_500 };
|
||||
const finalizedComparisonContract = { finalization_ms: 1_500 };
|
||||
|
||||
/** Valid capture of a timeout that finalized: SIGTERM delivered, exit observed. */
|
||||
export const FINALIZED_PROCESS_CAPTURE_EXAMPLE = {
|
||||
...EMPTY_PROCESS_CAPTURE_EXAMPLE,
|
||||
manifest: {
|
||||
...EMPTY_PROCESS_CAPTURE_EXAMPLE.manifest,
|
||||
scenario: finalizedScenario,
|
||||
comparison_contract: finalizedComparisonContract,
|
||||
full_scenario_sha256: digestProcessCommitment(finalizedScenario),
|
||||
comparison_contract_sha256: digestProcessCommitment(
|
||||
finalizedComparisonContract,
|
||||
),
|
||||
},
|
||||
exit: {
|
||||
code: null,
|
||||
signal: 0,
|
||||
reason: "timeout",
|
||||
finalization: {
|
||||
requested_ms: 1_500,
|
||||
elapsed_ms: 12,
|
||||
exit_code: 0,
|
||||
signals: [{ signal: "SIGTERM", sent_at_ms: 0, delivery: "signaled" }],
|
||||
},
|
||||
},
|
||||
} satisfies JsonValue;
|
||||
|
||||
Reference in New Issue
Block a user