Heuristic:1jehuang Jcode Coverage Honesty
| Knowledge Sources | |
|---|---|
| Domains | Diagnostics, Reliability |
| Last Updated | 2026-10-18 00:00 GMT |
Overview
Lighter validation tiers record skipped checks as skipped (not passed), ensuring coverage reports never claim false coverage.
Description
The Coverage_Honesty heuristic ensures that when a validation tier cannot perform a check (e.g., no API key, no network), it records the check as skipped rather than passed. Only the DoctorTier::Full tier (which has a key and spends balance) can earn strict coverage. The lighter tiers (Offline, Catalog) explicitly document what they cannot validate, preventing false confidence in provider health.
Usage
Use this heuristic when designing tiered validation systems. When a tier cannot perform a check due to missing prerequisites, record it as skipped, not passed. This prevents the coverage ledger from over-reporting what was actually validated.
The Insight (Rule of Thumb)
- Action: Record skipped checks as
skipped, never aspassed. - Value: Only
DoctorTier::Fullcan earn strict coverage; lighter tiers must mark unavailable checks as skipped. - Trade-off: Lower tiers report less coverage, but the coverage they do report is trustworthy.
- Compatibility: Three tiers:
Offline(no key, no network),Catalog(no key, network OK),Full(key + spend).
Reasoning
If lighter tiers recorded unavailable checks as "passed," the coverage ledger would over-report actual coverage, giving false confidence that a provider is healthy when critical checks were never run. By honestly recording skipped checks, the ledger remains a trustworthy indicator of what was actually validated.
Code Evidence
Tier definitions from crates/jcode-provider-doctor/src/provider_e2e.rs:7-17:
//! Three tiers trade off safety vs. coverage:
//! - [`DoctorTier::Offline`]: no API key, no network, no spend. Validates jcode's
//! own wiring (catalog reload, picker rendering, fallback labeling, model-switch
//! routing, auth-lifecycle transcript) against a synthetic catalog.
//! ...
//! - [`DoctorTier::Full`]: needs a key, spends balance. Everything in catalog plus a
//! non-streaming completion, a streaming completion, and a tool-call loop.
//!
//! Only the [`DoctorTier::Full`] tier can earn strict coverage; the lighter tiers