Documentation
¶
Overview ¶
Package doctor provides repository health checking and repair operations.
Index ¶
Constants ¶
View Source
const ( RepairCleanLocks = "clean_locks" RepairRebindWorkspacePaths = "rebind_workspace_paths" RepairCleanRuntimeTmp = "clean_runtime_tmp" RepairCleanRuntimeOperations = "clean_runtime_operations" RepairCleanRuntimeCleanupPlans = "clean_runtime_cleanup_plans" )
View Source
const ( ErrorCodeFormatVersionMissing = "E_FORMAT_VERSION_MISSING" ErrorCodeFormatVersionInvalid = "E_FORMAT_VERSION_INVALID" ErrorCodeFormatVersionUnsupported = "E_FORMAT_VERSION_UNSUPPORTED" ErrorCodeWorktreeListFailed = "E_WORKTREE_LIST_FAILED" ErrorCodeWorktreePayloadInvalid = "E_WORKTREE_PAYLOAD_INVALID" ErrorCodeWorktreePathBindingInvalid = "E_WORKTREE_PATH_BINDING_INVALID" ErrorCodeWorktreePayloadMissing = "E_WORKTREE_PAYLOAD_MISSING" ErrorCodeWorktreeHeadMissing = "E_WORKTREE_HEAD_MISSING" ErrorCodeWorktreeHeadInvalid = "E_WORKTREE_HEAD_INVALID" ErrorCodeWorktreeInvalidSnapshotID = "E_WORKTREE_INVALID_SNAPSHOT_ID" ErrorCodeWorktreeHeadLatestMismatch = "E_WORKTREE_HEAD_LATEST_MISMATCH" ErrorCodeDescriptorControlInvalid = "E_DESCRIPTOR_CONTROL_INVALID" ErrorCodeDescriptorFilenameInvalid = "E_DESCRIPTOR_FILENAME_INVALID" ErrorCodeLineageDescriptorListFailed = "E_LINEAGE_DESCRIPTOR_LIST_FAILED" ErrorCodeIntentControlInvalid = "E_INTENT_CONTROL_INVALID" ErrorCodeIntentOrphan = "E_INTENT_ORPHAN" ErrorCodeReadyControlInvalid = "E_READY_CONTROL_INVALID" ErrorCodeReadyInvalid = snapshot.PublishStateCodeReadyInvalid ErrorCodeReadyInvalidSnapshotID = "E_READY_INVALID_SNAPSHOT_ID" ErrorCodeReadyDescriptorInvalid = "E_READY_DESCRIPTOR_INVALID" ErrorCodeReadyDescriptorMissing = snapshot.PublishStateCodeReadyDescriptorMissing ErrorCodeReadyMissing = snapshot.PublishStateCodeReadyMissing ErrorCodeStrictVerifyFailed = "E_STRICT_VERIFY_FAILED" ErrorCodeTmpControlInvalid = "E_TMP_CONTROL_INVALID" ErrorCodeTmpOrphan = "E_TMP_ORPHAN" ErrorCodeAuditScanFailed = "E_AUDIT_SCAN_FAILED" ErrorCodeCloneHistoryInvalid = "E_CLONE_HISTORY_INVALID" ErrorCodeLifecyclePending = "E_LIFECYCLE_PENDING" )
Variables ¶
This section is empty.
Functions ¶
func RuntimeRepairActionIDs ¶
func RuntimeRepairActionIDs() []string
RuntimeRepairActionIDs returns executable public runtime-safe repair IDs.
func SetSeparatedStrictPermissionCheckerForTest ¶ added in v0.4.7
Types ¶
type Doctor ¶
type Doctor struct {
// contains filtered or unexported fields
}
Doctor performs repository health checks.
func (*Doctor) ListRepairActions ¶
func (d *Doctor) ListRepairActions() []RepairAction
ListRepairActions returns executable public runtime-safe repair actions.
type Finding ¶
type Finding struct {
Category string `json:"category"`
Description string `json:"description"`
Severity string `json:"severity"`
ErrorCode string `json:"error_code,omitempty"`
Path string `json:"path,omitempty"`
RecommendedNextCommand string `json:"recommended_next_command,omitempty"`
}
Finding represents a detected issue.
type RepairAction ¶
type RepairAction struct {
ID string `json:"id"`
Description string `json:"description"`
AutoSafe bool `json:"auto_safe"`
}
RepairAction describes a repair operation.
type RepairResult ¶
type RepairResult struct {
Action string `json:"action"`
Success bool `json:"success"`
Message string `json:"message"`
Cleaned int `json:"cleaned,omitempty"`
}
RepairResult contains the result of a repair operation.
type SeparatedStrictResult ¶ added in v0.4.7
type SeparatedStrictResult struct {
RepoID string `json:"repo_id,omitempty"`
Workspace string `json:"workspace"`
ControlRoot string `json:"control_root"`
Folder string `json:"folder"`
BoundaryValidated bool `json:"-"`
DoctorStrict string `json:"-"`
Healthy bool `json:"healthy"`
Findings []Finding `json:"findings"`
Checks []StrictCheck `json:"checks"`
}
func CheckSeparatedStrict ¶ added in v0.4.7
func CheckSeparatedStrict(req repo.SeparatedContextRequest) (*SeparatedStrictResult, error)
Click to show internal directories.
Click to hide internal directories.