doctor

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package doctor diagnoses the seamark installation: binary, git, the index database's schema and integrity, policy and effect-catalogue compilation, hook wiring, agent and gh availability, and gitignore sanity. Every check is read-only and offline — doctor reports exact corrective actions and changes nothing. Semantic health (coverage, confidence, freshness) is `seamark status`'s job; doctor asks whether seamark can run at all.

Index

Constants

View Source
const (
	StateOK   = "ok"
	StateInfo = "info"
	StateWarn = "warn"
	StateFail = "fail"
)

Check states, from healthy to broken. Info is a fact that needs no action; warn degrades a feature; fail means seamark cannot do its job.

Variables

This section is empty.

Functions

func Print

func Print(w io.Writer, r *Report)

Print renders the report; one aligned line per check, fixes indented.

Types

type Check

type Check struct {
	Name   string `json:"name"`
	State  string `json:"state"`
	Detail string `json:"detail"`
	// Fix is the exact corrective action; empty when none is needed.
	Fix string `json:"fix,omitempty"`
}

Check is one diagnostic finding.

type Report

type Report struct {
	Checks []Check `json:"checks"`
	Warns  int     `json:"warns"`
	Fails  int     `json:"fails"`
}

Report is a full doctor run.

func Run

func Run(root, dbPath, version string) *Report

Run executes every check against the workspace root. dbPath is the resolved index location; version identifies the binary.

Jump to

Keyboard shortcuts

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