Skip to content

Result Schema

The ProbeResult is the wire format returned by every Lace executor (specs/schemas/result.json, specification ยง9). For a guided tour see Result Format. Extension-defined fields appear under actions.{key} (arrays) and runVars (scalars with {extension_name}. prefix).

Spec version: 0.9.7

Top-Level Fields

Field Type Required Description
outcome "success" | "failure" | "timeout" Yes Overall run outcome. "timeout" means a call timed out; there is no run-level timeout.
startedAt string (ISO 8601 UTC) Yes Timestamp before the first call begins.
endedAt string (ISO 8601 UTC) Yes Timestamp after all chain methods complete or after cascade stops.
elapsedMs integer (>= 0) Yes Wall-clock elapsed time in milliseconds.
runVars object Yes Final state of all $$var assignments plus extension-emitted variables. Each $$var key appears at most once (write-once rule).
calls array of CallRecord Yes Ordered call records including skipped calls.
actions object Yes Free-form action map. actions.variables is the only typed section (writeback .store() entries), present when any write-back target exists. Other keys are extension-defined arrays. Absent entirely from executors declaring omit: actions.
validationWarnings array of object No Structured validator diagnostics (code, callIndex, chainMethod) emitted during pre-execution validation. Present only when the validator produced warnings. Separate from per-call warnings, which are plain runtime strings.

actions.variables

Field Type Description
variables object Writeback variables from .store() ($name and plain keys). The $ prefix is stripped. Values may be any JSON-serialisable shape. Present only when the script has write-back .store() targets.

CallRecord

Field Type Required Description
index integer (>= 0) Yes Zero-based call index in script order.
outcome "success" | "failure" | "timeout" | "skipped" Yes
startedAt string (ISO 8601) | null Yes Null for skipped calls.
endedAt string (ISO 8601) | null Yes Null for skipped calls.
request RequestRecord | null Yes Null for skipped calls.
response ResponseRecord | null Yes Null for skipped, timeout (no response received), or connection failure.
redirects array of string Yes Ordered URLs followed. Empty array when no redirects. Populated even when the call hard-fails for exceeding redirects.max (see Redirect tracking).
assertions array of ScopeAssertion or ConditionAssertion Yes All evaluated scopes and conditions in evaluation order. Empty for skipped calls.
config object Yes Resolved call config (after defaults applied). Extension-registered fields sit under an extensions sub-object of the owning object: config.timeout.extensions.*, config.redirects.extensions.*, config.security.extensions.*, and config.extensions.* for root-level fields.
warnings array of string Yes Warning strings from this call (null interpolations, TLS errors under rejectInvalidCerts: false, rejected extension emits). Empty array if none.
error string | null Yes Non-assertion failure detail (connection error, TLS, redirect limit, timeout). Null otherwise. An oversize body is not an error: it is a bodySize assertion failure plus bodyNotCapturedReason: "bodyTooLarge".

RequestRecord

Field Type Required Description
url string Yes Resolved URL after variable interpolation.
method "get" | "post" | "put" | "patch" | "delete" Yes
headers object (string values) Yes Resolved headers sent on the wire.

ResponseRecord

Field Type Required Description
status integer (100-599) Yes HTTP status code.
statusText string Yes HTTP status text.
headers object (string or string[] values) Yes Lower-cased header names. Multi-value headers as string arrays.
bodyPath string | null Yes Always present. Absolute path to the response body file when result.bodies.dir is a path; null otherwise.
bodyNotCapturedReason "bodyTooLarge" | "notRequested" | "timeout" No Present when bodyPath is null.
responseTimeMs integer (>= 0) Yes Total response time in ms.
dnsMs integer (>= 0) Yes DNS resolution time in ms.
connectMs integer (>= 0) Yes TCP connection time in ms.
tlsMs integer (>= 0) Yes TLS handshake time in ms. 0 for non-HTTPS calls.
ttfbMs integer (>= 0) Yes Time to first byte in ms.
transferMs integer (>= 0) Yes Body transfer time in ms.
sizeBytes integer (>= 0) Yes Response body size in bytes.
dns DnsMeta Yes DNS resolution metadata.
tls TlsMeta | null Yes TLS metadata for HTTPS calls; null for plain HTTP.

DnsMeta

DNS resolution metadata. The core executor populates these fields; extensions may interpret them.

Field Type Required Description
resolvedIps array of string Yes All addresses returned by the OS resolver, in order.
resolvedIp string | null Yes The address the executor actually connected to. Typically resolvedIps[0].

TlsMeta

TLS session metadata, populated on every HTTPS call (tls is null only for plain HTTP). Under rejectInvalidCerts: false the runtime often cannot expose the peer certificate, so certificate may be null -- the rest of the object is still populated.

Field Type Required Description
protocol string Yes Negotiated TLS protocol version (e.g. "TLSv1.3").
cipher string Yes Negotiated cipher suite name.
alpn string | null Yes Negotiated ALPN protocol (e.g. "h2") or null.
certificate CertificateMeta | null Yes Peer certificate. Null when the runtime cannot expose it (common under rejectInvalidCerts: false).

CertificateMeta

Field Type Required Description
subject object (cn: string, plus additional fields) Yes Certificate subject.
subjectAltNames array of string Yes SAN entries as DNS:name / IP:addr tokens.
issuer object (cn: string, plus additional fields) Yes Certificate issuer.
notBefore string (ISO 8601 UTC) Yes Certificate validity start.
notAfter string (ISO 8601 UTC) Yes Certificate validity end.

ScopeAssertion

Assertion record for .expect() and .check() scopes.

Field Type Required Description
method "expect" | "check" Yes Which chain method produced this assertion.
scope string Yes Scope name: status, body, headers, bodySize, totalDelayMs, dns, connect, tls, ttfb, transfer, size, redirects.
op "lt" | "lte" | "eq" | "neq" | "gte" | "gt" Yes Comparison operator used.
match "first" | "last" | "any" No Only present on redirects scope assertions. Selects which redirect URL is compared.
outcome "passed" | "failed" | "indeterminate" Yes
actual any Yes Observed value. Type depends on scope.
expected any Yes Expected value as written in source (after variable resolution).
options object | null Yes The options {} object from source, passed through opaquely. Null if no options block.

ConditionAssertion

Assertion record for .assert() conditions.

Field Type Required Description
method "assert" Yes Always "assert".
kind "expect" | "check" Yes Whether the condition is hard-fail or soft-fail.
index integer (>= 0) Yes Index within the assert array.
outcome "passed" | "failed" | "indeterminate" Yes
expression string Yes Condition rendered back to source form. It must re-parse: object-literal keys that are not bare identifiers are printed quoted ({"content-type": 1, "404": 2, ok: true}), never bare.
actualLhs any Yes Resolved left operand value.
actualRhs any Yes Resolved right operand value.
options object | null Yes The options {} object from source. Null if none.