Principle:1jehuang Jcode Coverage Ledger
| Knowledge Sources | |
|---|---|
| Domains | Testing, Diagnostics |
| Last Updated | 2026-10-18 00:00 GMT |
Overview
A tracking system that records which provider/model checkpoints have been verified live, with tier-aware credit rules so lighter diagnostic tiers never over-credit API-dependent checkpoints in the ledger.
Description
The coverage ledger is a record of which strict checkpoints (auth credential loaded, model catalog live, non-streaming chat, streaming chat, tool-call parse) have been verified against a live provider API. Each checkpoint result has a status (Passed, Failed, Skipped) and is recorded in a structured LiveVerificationResult. The ledger tracks provider ID, model ID, and checkpoint status.
The problem solved is coverage ambiguity: without a ledger, it's unclear which provider/model combinations have been actually tested against a live API. A diagnostic run that only checks catalog wiring (offline tier) should not be credited as having verified live chat completions. The ledger's tier-aware rules ensure only DoctorTier::Full earns strict coverage credit; lighter tiers record API-dependent checkpoints as skipped.
Usage
Use this principle when a diagnostic system needs to track which capabilities have been verified live, with honest accounting of what was and wasn't tested. The trigger is: "the system needs to know which provider/model pairs are verified working." It is appropriate for: CI provider gates, release readiness checks, and provider onboarding validation.
Theoretical Basis
The ledger has three concepts:
- Checkpoint: A named verification point (e.g.,
AUTH_CREDENTIAL_LOADED,NON_STREAMING_CHAT) with aLiveVerificationStageStatus(Passed, Failed, Skipped). - Tier-aware credit: Only
DoctorTier::Fullearns strict coverage credit.OfflineandCatalogtiers record API-dependent checkpoints asSkipped, so the ledger never over-credits. - Result recording: Each diagnostic run produces a
LiveVerificationResultwith a vector ofLiveVerificationEvententries, which are recorded in the coverage ledger.
Pseudo-code logic:
# Abstract algorithm (NOT real implementation)
def record_coverage(doctor_report, tier, provider_id, model_id):
for check in doctor_report.checks:
event = LiveVerificationEvent(
stage=check.checkpoint,
status=check.status,
provider=provider_id,
model=model_id,
)
if tier != DoctorTier.Full:
# API-dependent checks are skipped, not passed
if check.checkpoint in API_DEPENDENT:
event.status = LiveVerificationStageStatus.Skipped
ledger.record(event)