import { CommandResult } from "std/command/results"
/** Host-owned identities of every input surface read by a verification check. */
pub type VerificationInputState = {
revision: int,
workspace: string,
source: string,
dependencies: string,
environment: string,
}
/** Reuse is scoped to one check in one run; unknown inputs always execute. */
pub type VerificationReuse = {
scope: string,
inputs: fn() -> VerificationInputState?,
accept: fn(CommandResult) -> bool,
/** The caller attests that skipping this invocation omits no required effects. */
skip_effects_safe?: bool,
}
/** The supplied invocation and complete inputs observed around execution. */
pub type VerificationCheckBinding = {invocation: string, inputs: VerificationInputState}
pub type VerificationFileHashSnapshotEntry = {
path: string,
known: bool,
readable: bool,
hash: string?,
hash_source: "indexed" | "disk" | "missing",
size: int?,
mtime_ms: int?,
indexed_hash: string?,
indexed_mtime_ms: int?,
last_edit_seq: int,
}
pub type VerificationFileHashSnapshot = {
seq: int,
captured_at_ms: int,
algorithm: string,
snapshot: dict,
missing: list<string>,
files: list<VerificationFileHashSnapshotEntry>,
}
pub type VerificationCheckObservation = {
durationMs?: int,
warm: bool,
at?: string,
exit?: int,
failureSignature?: string,
snapshot?: dict,
}
pub type VerificationRecordedCheck = {
result: CommandResult,
observation: VerificationCheckObservation,
row: dict?,
snapshot: VerificationFileHashSnapshot?,
execution: "executed" | "reused" | "observed",
binding: VerificationCheckBinding?,
}
pub type VerificationStartedCheck = {
row_id: string,
started: CommandResult,
observation_options: dict,
snapshot: VerificationFileHashSnapshot?,
}
pub type VerificationToolchainFact = {
id: string,
name: string,
available: bool,
version?: string,
raw_version: string,
cache_identity: dict,
probe: dict,
}
pub type VerificationWarmStateFact = {
id: string,
name: string,
configured: bool,
available: bool,
ready: bool,
warm: bool,
timing_kind: string,
mode: string,
expected_warm_delta_ms?: int,
warm_ms?: int,
cold_ms?: int,
cache_identity: dict,
probe: dict,
}
pub type VerificationWarmStateLifecycleReceipt = {
id: unknown,
name: unknown,
status: string,
handle_id: unknown,
fact: VerificationWarmStateFact?,
row: dict<string, unknown>,
reused?: bool,
started?: unknown,
initial_fact?: VerificationWarmStateFact?,
cancelled?: bool,
cancel?: unknown,
teardown?: unknown,
}
pub type VerificationAffectedTarget = {
id: string,
label: unknown,
kind: unknown,
source: unknown,
files: unknown,
adapter_id?: string,
...dict<string, unknown>,
}
pub type VerificationAffectedAdapterFact = {
id: string,
parser_id: string,
status: string,
ok: bool,
target_count: int,
exit?: int,
error?: string,
}
pub type VerificationAffectedTargetsFact = {
changed_paths: list<string>,
targets: list<VerificationAffectedTarget>,
adapters: list<VerificationAffectedAdapterFact>,
fallback: dict,
}
pub type VerificationProfileMatch = {row: dict, specificity: int, index: int}
pub type VerificationLadderPlanEntry = {
row_id: string,
row: dict<string, unknown>,
rung: string,
rung_rank: int,
command: unknown,
runnable: bool,
granularity: unknown,
trust: unknown,
resource_class: string,
p95_ms: int,
timing_kind: string,
warm_state: unknown,
specificity: int,
index: int,
sort_key: list<int>,
background: unknown,
}
pub type VerificationLadderSkip = {
row_id: string,
reason: string,
specificity: unknown,
index: unknown,
}
pub type VerificationLadderCandidate = {
entry: VerificationLadderPlanEntry?,
skip: VerificationLadderSkip?,
}
pub type VerificationLadderPlan = {
schema: string,
query: dict,
matches: list<VerificationProfileMatch>,
selected: list<VerificationLadderPlanEntry>,
skipped: list<VerificationLadderSkip>,
fallback: bool,
reason: string,
}
pub type VerificationDiagnosticSnapshot = {
count: int,
complete: bool,
failure_count: int,
feedsGates: bool,
feeds_gates: bool,
signatures: list<string>,
}
pub type VerificationDiagnosticInfo = {
count: int,
complete: bool,
failure_count: int,
explicit_success: bool,
failed: bool,
feedsGates: bool,
feeds_gates: bool,
has_collection: bool,
signatures: list<string>,
}
pub type VerificationDiagnosticDelta = {
schema: string,
status: string,
progress_credit: bool,
feedsGates: bool,
feeds_gates: bool,
advisory: bool,
reason: string,
previous: VerificationDiagnosticSnapshot,
current: VerificationDiagnosticSnapshot,
removed: list<string>,
added: list<string>,
persisted: list<string>,
same_signature_set: bool,
normalization: dict<string, unknown>,
count_delta?: int,
}
pub type VerificationGateInput = {
schema: string,
status: string,
reason: string,
feedsGates: bool,
feeds_gates: bool,
advisory: bool,
progress_credit: bool,
no_progress: bool,
gate_bearing_failure: bool,
blocks_completion: bool,
stale: bool,
stale_files: unknown,
previous: {classification: dict<string, unknown>, value: dict<string, unknown>},
current: {classification: dict<string, unknown>, value: dict<string, unknown>},
delta: VerificationDiagnosticDelta,
}
pub type VerificationWarmStateTimings = {warm_ms: int?, cold_ms: int?}
pub type VerificationSnapshotStaleness = {
schema: string,
status: string,
stale: bool,
fresh: bool,
staleFiles: list<string>,
stale_files: list<string>,
changed_files: list<string>,
advisory: bool,
reason: string,
}
pub type VerificationHudEntry = {
row_id: unknown,
rung: unknown,
command: string,
label: string,
p95_ms: unknown,
p95: string,
timing_kind: unknown,
resource_class: unknown,
granularity: unknown,
trust: unknown,
row: unknown,
}
pub type VerificationHudLastCheck = {
rung: string,
verdict: string,
at_ms: int,
age_ms: int,
age: string,
freshness: VerificationSnapshotStaleness,
}
pub type VerificationHudModel = {
schema: string,
visible: bool,
reason: string,
lines?: list<string>,
dir?: string,
query?: dict<string, unknown>,
elapsed_ms?: int,
elapsed?: string,
since_last_edit_ms?: int?,
since_last_edit?: string?,
last_check?: VerificationHudLastCheck?,
next_check?: VerificationHudEntry?,
full_check?: VerificationHudEntry?,
plans?: {next: VerificationLadderPlan, full: VerificationLadderPlan},
}
pub type VerificationRawReference = {
warmMs?: unknown,
warm_ms?: unknown,
coldMs?: unknown,
cold_ms?: unknown,
p95?: unknown,
started?: unknown,
handle_id?: unknown,
classification?: unknown,
diagnostic?: unknown,
status?: unknown,
feedsGates?: unknown,
feeds_gates?: unknown,
data?: unknown,
label?: unknown,
name?: unknown,
background?: unknown,
record?: unknown,
...dict<string, unknown>,
}