Expand description
Versioned envelope types shared between the public fallow CLI and the
closed-source fallow-cov production-coverage sidecar.
The public CLI builds a Request from its static analysis output, spawns
the sidecar, writes the request to stdin, and reads a Response from
stdout. Both sides depend on this crate to guarantee contract alignment.
§Versioning
The top-level protocol_version field is a full semver string. Major
bumps indicate breaking changes; consumers MUST reject mismatched majors.
Minor bumps add optional fields; consumers MUST forward-accept unknown
fields and SHOULD map unknown enum variants to Feature::Unknown,
ReportVerdict::Unknown, or Verdict::Unknown rather than erroring.
§0.2 overview
This is the first production-shaped contract. The top-level
ReportVerdict (previously Verdict) is unchanged in meaning but was
renamed to avoid colliding with per-finding Verdict. Each
Finding and HotPath now carries a deterministic finding_id /
hot_path_id hash, a full Evidence block, and — for findings — a
per-function verdict and nullable invocation count. Confidence
gained VeryHigh and None variants to match the decision table in
.internal/spec-production-coverage.md.
StaticFunction::static_used and StaticFunction::test_covered are
intentionally required (no #[serde(default)]) — a silent default would
hide every safe_to_delete finding, so 0.1-shape requests must fail
deserialization instead of parsing into a wrong answer.
Structs§
- Action
- Machine-readable next-step hint for AI agents.
- Capture
Quality - Capture-quality telemetry surfaced alongside the aggregate summary.
- Diagnostic
Message - Error / warning surfaced by the sidecar.
- Evidence
- Supporting evidence for a
Finding. Mirrors the rows of the decision table in.internal/spec-production-coverage.mdso the CLI can render the “why” behind each verdict without re-deriving it. - Finding
- A per-function finding combining static analysis and runtime coverage.
- HotPath
- A function the sidecar identified as a hot path in the current dump.
- License
- The license material the sidecar should validate.
- Options
- Runtime knobs. All fields are optional so new options can be added without a breaking change.
- Request
- Sent by the public CLI to the sidecar via stdin.
- Response
- Emitted by the sidecar to stdout.
- Static
File - Static analysis results for a single source file.
- Static
Findings - Static analysis output the public CLI already produced.
- Static
Function - Static analysis results for a single function within a
StaticFile. - Summary
- Aggregate statistics describing the observed coverage dump.
Enums§
- Confidence
- Confidence the sidecar attaches to a
Finding::verdict. - Coverage
Source - A single coverage artifact on disk.
- Feature
- Feature flags present in the license JWT’s
featuresclaim. - Report
Verdict - Top-level report verdict (was
Verdictin 0.1). Summarises the overall state of the run; per-finding verdicts live onFinding::verdict. Unknown variants are forward-mapped toReportVerdict::Unknown. - Verdict
- Per-finding verdict. Replaces the 0.1
CallStateenum. - Watermark
- What to render in the human output when the license is in the grace window.
Constants§
- PROTOCOL_
VERSION - Current protocol version. Bumped per the semver rules above.
Functions§
- finding_
id - Compute the deterministic
Finding::idfor a production-coverage finding. - hot_
path_ id - Compute the deterministic
HotPath::idfor a hot-path finding. Uses the same canonical order asfinding_idwith kind"hot", emittingfallow:hot:<hash>.