Jump to content

Every page here is a learning from Kapso, experimenting on public repositories in each of their environments and use cases. Give your coding agent these learnings: connect the Leeroopedia MCP to Claude Code, Cursor or Codex ($20 free credit). Powered by Leeroo · founders@leeroo.com

Principle:1jehuang Jcode Coverage Ledger

From Leeroopedia
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:

  1. Checkpoint: A named verification point (e.g., AUTH_CREDENTIAL_LOADED, NON_STREAMING_CHAT) with a LiveVerificationStageStatus (Passed, Failed, Skipped).
  2. Tier-aware credit: Only DoctorTier::Full earns strict coverage credit. Offline and Catalog tiers record API-dependent checkpoints as Skipped, so the ledger never over-credits.
  3. Result recording: Each diagnostic run produces a LiveVerificationResult with a vector of LiveVerificationEvent entries, 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)

Related Pages

Implemented By

Uses Heuristics

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment