Use the shared command supervisor for installation probes and retain exact process cleanup owners through doctor, profile resolution, and session health. Preserve exit status, bounded captured output, cancellation reasons, and live cleanup facts. Block subsequent inspection until retained cleanup is retried. Generalize the existing inspection resource scope and migrate its consumers, including verifier scripts; remove the verifier's duplicate raw version probe. Validation: 116 distinct focused tests passed, including built CLI doctor with inherited output, cancellation/finalization, cleanup retry, and fake-provider verifier workflows. Build, check:fast, and test discovery passed. No real Kuna distribution or analysis target was executed. Synthetic Darwin inspection timing: first-call median 707ms versus 5.79ms; same-process repeat 37.9ms versus 3.08ms. First use includes ownership-helper preparation. Family CPU and actual peak family memory remain unmeasured. Fixes #5557
14 lines
630 B
TypeScript
14 lines
630 B
TypeScript
import type { ArtifactResourceScope } from "../../src/artifacts/ArtifactResourceScope.js";
|
|
import type { RetainedResourceScope } from "../../src/application/AnalysisProvider.js";
|
|
|
|
/** Complete a prerequisite operation, including retained cleanup on failure. */
|
|
export function withVerifierResourceOwner<T>(
|
|
operation: (owner: RetainedResourceScope) => Promise<T>,
|
|
): Promise<T>;
|
|
|
|
/** Hash one verifier input and transfer failed-close ownership to its scope. */
|
|
export function hashVerifierFile(
|
|
path: string,
|
|
resources: Pick<ArtifactResourceScope, "retain">,
|
|
): Promise<{ readonly bytes: number; readonly sha256: string }>;
|