hostcoverage

package
v0.32.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 24, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package hostcoverage is the machine-readable source of truth for the per-host lifecycle capture matrix used by doctor diagnostics and the bilingual host-coverage docs table.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StatusSymbol

func StatusSymbol(status Status) string

StatusSymbol is a convenience for diagnostics (not used in docs cells, which already embed the symbol in the summary).

Types

type EventCell

type EventCell struct {
	Status  Status    `json:"status"`
	Summary Localized `json:"summary"`
}

EventCell is one host cell for a lifecycle event.

type Host

type Host struct {
	ID                       string               `json:"id"`
	Package                  string               `json:"package"`
	Label                    Localized            `json:"label"`
	DoctorClient             string               `json:"doctor_client"`
	ExpectsSessionEnrichment bool                 `json:"expects_session_enrichment"`
	Events                   map[string]EventCell `json:"events"`
}

Host is one column of the coverage matrix.

type LifecycleEvent

type LifecycleEvent struct {
	ID           string    `json:"id"`
	Verification Localized `json:"verification"`
}

LifecycleEvent is one row of the coverage matrix.

type Localized

type Localized struct {
	EN string `json:"en"`
	JA string `json:"ja"`
}

Localized is a bilingual text pair.

type Matrix

type Matrix struct {
	SchemaVersion   int              `json:"schema_version"`
	LastVerified    string           `json:"last_verified"`
	Notes           Localized        `json:"notes"`
	LifecycleEvents []LifecycleEvent `json:"lifecycle_events"`
	Hosts           []Host           `json:"hosts"`
}

Matrix is the full host × lifecycle coverage document.

func Load

func Load() (Matrix, error)

Load returns the embedded host coverage matrix.

func MustLoad

func MustLoad() Matrix

MustLoad returns the matrix or panics. Reserved for init-time wiring where a missing matrix is a programming error.

func (Matrix) ExpectsSessionEnrichment

func (m Matrix) ExpectsSessionEnrichment(client string) bool

ExpectsSessionEnrichment reports whether doctor should judge prompt/transcript coverage for the host once a minimum sample of sessions is observed.

func (Matrix) HostByDoctorClient

func (m Matrix) HostByDoctorClient(client string) (Host, bool)

HostByDoctorClient returns the matrix host for a doctor --client value.

func (Matrix) RenderMatrixTable

func (m Matrix) RenderMatrixTable(lang string) string

RenderMatrixTable builds the Markdown table for language ("en" or "ja").

func (Matrix) WiredLifecycleEvents

func (m Matrix) WiredLifecycleEvents(client string) []string

WiredLifecycleEvents returns the lifecycle event IDs marked status=wired for the given doctor client.

type Status

type Status string

Status is the matrix cell classification for one host × lifecycle event.

const (
	// StatusWired means Traceary's packaged integration captures this event.
	StatusWired Status = "wired"
	// StatusAvailable means the host exposes a hook but Traceary does not wire it.
	StatusAvailable Status = "available"
	// StatusUnsupported means the host does not expose a usable signal.
	StatusUnsupported Status = "unsupported"
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL