Documentation menu

JSON and exit codes

This page describes source-scan schema 1.0.0 at product 524fa07e. Other subcommands have separate report contracts; do not deserialize them as source-scan reports.

Report fields#

Report fields
FieldInterpretation
kindswift-analyzer.source-scan identifies this report type
schemaVersion1.0.0 for the documented source-scan report
maturityexperimental; independent of the documentation's pre-prod channel
statuscomplete, degraded or unavailable
requestedConditionsSelected condition IDs, not a finding list
conditionsPer-condition requested/executed state, coverage, observations and counts
familiesFamily-level coverage, observations, findings, reasons and evidence payload
reasonsMachine-readable limitations or acquisition reasons
admittedSourceCountSources admitted to the analysis, not all files on disk
snapshotAdmitted snapshot identity, or null when unavailable
sourceInputDigestIdentity of discovered input, when available

Additional discovery/admission counters distinguish authored, generated, Swift and native inputs. Read them alongside reasons; discovered inputs are not necessarily admitted. Fields may be absent when their acquisition stage did not finish.

Condition coverage#

A condition row includes conditionID, ruleID, requested, executed, coverage, observationCount, unknownObservationCount, findingCount, notApplicableCount and observationIDs. Coverage values are not-run, no-observations, degraded and completed. Understand results explains their use.

Exit codes#

Exit codes
CodeMeaning
0Operation completed; a configured gate passed where applicable
1An explicitly configured findings gate failed
2Invalid CLI, schema, manifest or configuration input
3Requested definitive analysis lacks sufficient quality or capability
4Acquisition, source, index or toolchain failure
5Internal invariant or serialization failure
130Cancelled; do not treat output as a complete result

These are the shared analyzer outcome codes. Argument parsing and the separate experimental preview can report errors through their own command error path; preserve stderr and do not infer source-scan coverage from those failures. Source-scan returns 3 when degraded, even if useful findings are present. It has no findings-gate option.

Streams and stability#

Execution proof anchors are pairs such as ["Sources/Example/Execution.swift", 67]: the logical source path followed by a zero-based UTF-8 byte offset from the start of that file. The number is not a line number or a character index. Open the matching source snapshot; non-ASCII characters can occupy several bytes. Other report payloads may use separate line/column or range fields, so interpret each named field according to its report contract.

JSON is written to stdout after validation and serialization. Timing is written to stderr. Preserve the process result separately from JSON. Snapshot IDs, evidence IDs and timings are not expected to match across differently located or rebuilt inputs. Do not parse human-readable output as a stable schema.

Follow one recorded finding walks from a catalog condition through observation IDs to the actual family-specific proof and source locations. It also explains a remaining unknown in the edited control.

Product 524fa07e · Historical catalog 4558458d
Experimental · Owner-provided checkout · Verified 2026-09-11

Read as MarkdownPage JSON

Report a documentation issue