Documentation
¶
Index ¶
- Constants
- Variables
- func RegisteredCodes() []string
- type CheckResult
- type DetectedProject
- type DiagnosticCheck
- type Finding
- type ManualSessionNameProjectMismatchCheck
- type ProjectReclassifyAction
- type Registry
- type RepairCounts
- type RepairMode
- type RepairPlan
- type RepairSkip
- type Report
- type Runner
- type SQLiteLockContentionCheck
- type Scope
- type SessionProjectDirectoryMismatchCheck
- type Summary
- type SyncMutationRequiredFieldsCheck
Constants ¶
View Source
const ( CheckSessionProjectDirectoryMismatch = "session_project_directory_mismatch" CheckManualSessionNameProjectMismatch = "manual_session_name_project_mismatch" CheckSyncMutationRequiredFields = "sync_mutation_required_fields" CheckSQLiteLockContention = "sqlite_lock_contention" )
View Source
const ( StatusOK = "ok" StatusWarning = "warning" StatusBlocked = "blocked" StatusError = "error" SeverityInfo = "info" SeverityWarning = "warning" SeverityError = "error" SeverityBlocking = "blocking" )
Variables ¶
View Source
var ErrInvalidCheck = errors.New("invalid diagnostic check")
Functions ¶
func RegisteredCodes ¶
func RegisteredCodes() []string
Types ¶
type CheckResult ¶
type CheckResult struct {
CheckID string `json:"check_id"`
Result string `json:"result"`
Severity string `json:"severity"`
ReasonCode string `json:"reason_code"`
Message string `json:"message"`
Why string `json:"why"`
Evidence json.RawMessage `json:"evidence"`
SafeNextStep string `json:"safe_next_step"`
RequiresConfirmation bool `json:"requires_confirmation"`
Findings []Finding `json:"findings,omitempty"`
}
type DetectedProject ¶
type DiagnosticCheck ¶
type Finding ¶
type Finding struct {
CheckID string `json:"check_id"`
Severity string `json:"severity"`
ReasonCode string `json:"reason_code"`
Message string `json:"message"`
Why string `json:"why"`
Evidence json.RawMessage `json:"evidence"`
SafeNextStep string `json:"safe_next_step"`
RequiresConfirmation bool `json:"requires_confirmation"`
}
type ManualSessionNameProjectMismatchCheck ¶
type ManualSessionNameProjectMismatchCheck struct{}
func (ManualSessionNameProjectMismatchCheck) Code ¶
func (ManualSessionNameProjectMismatchCheck) Code() string
func (ManualSessionNameProjectMismatchCheck) Run ¶
func (c ManualSessionNameProjectMismatchCheck) Run(ctx context.Context, scope Scope) (CheckResult, error)
type ProjectReclassifyAction ¶
type ProjectReclassifyAction struct {
SessionID string `json:"session_id"`
FromProject string `json:"from_project"`
ToProject string `json:"to_project"`
ReasonCode string `json:"reason_code"`
EvidenceSource string `json:"evidence_source,omitempty"`
EvidencePath string `json:"evidence_path,omitempty"`
}
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
func DefaultRegistry ¶
func DefaultRegistry() Registry
func NewRegistry ¶
func NewRegistry(checks ...DiagnosticCheck) Registry
func (Registry) Checks ¶
func (r Registry) Checks() []DiagnosticCheck
type RepairCounts ¶
type RepairCounts struct {
SessionsPlanned int64 `json:"sessions_planned"`
ObservationsPlanned int64 `json:"observations_planned"`
PromptsPlanned int64 `json:"prompts_planned"`
SessionsApplied int64 `json:"sessions_applied"`
ObservationsApplied int64 `json:"observations_applied"`
PromptsApplied int64 `json:"prompts_applied"`
}
type RepairMode ¶
type RepairMode string
const ( RepairModePlan RepairMode = "plan" RepairModeDryRun RepairMode = "dry_run" RepairModeApply RepairMode = "apply" )
type RepairPlan ¶
type RepairPlan struct {
Project string `json:"project"`
Check string `json:"check"`
Mode RepairMode `json:"mode"`
Status string `json:"status"`
Actions []ProjectReclassifyAction `json:"actions"`
Skipped []RepairSkip `json:"skipped,omitempty"`
Counts RepairCounts `json:"counts"`
BackupPath string `json:"backup_path,omitempty"`
}
func BuildRepairPlan ¶
func BuildRepairPlan(ctx context.Context, scope Scope, report Report, check string, mode RepairMode) (RepairPlan, error)
type RepairSkip ¶
type Report ¶
type Report struct {
Status string `json:"status"`
Project string `json:"project,omitempty"`
Summary Summary `json:"summary"`
Checks []CheckResult `json:"checks"`
}
func ErrorReport ¶
type Runner ¶
type Runner struct {
// contains filtered or unexported fields
}
func NewRunnerWithRegistry ¶
type SQLiteLockContentionCheck ¶
type SQLiteLockContentionCheck struct{}
func (SQLiteLockContentionCheck) Code ¶
func (SQLiteLockContentionCheck) Code() string
func (SQLiteLockContentionCheck) Run ¶
func (c SQLiteLockContentionCheck) Run(ctx context.Context, scope Scope) (CheckResult, error)
type SessionProjectDirectoryMismatchCheck ¶
type SessionProjectDirectoryMismatchCheck struct{}
func (SessionProjectDirectoryMismatchCheck) Code ¶
func (SessionProjectDirectoryMismatchCheck) Code() string
func (SessionProjectDirectoryMismatchCheck) Run ¶
func (c SessionProjectDirectoryMismatchCheck) Run(ctx context.Context, scope Scope) (CheckResult, error)
type SyncMutationRequiredFieldsCheck ¶
type SyncMutationRequiredFieldsCheck struct{}
func (SyncMutationRequiredFieldsCheck) Code ¶
func (SyncMutationRequiredFieldsCheck) Code() string
func (SyncMutationRequiredFieldsCheck) Run ¶
func (c SyncMutationRequiredFieldsCheck) Run(ctx context.Context, scope Scope) (CheckResult, error)
Click to show internal directories.
Click to hide internal directories.