diagnostics
diagnostics
¶
Diagnostic-only remedies for self-healing.
These remedies cannot automatically fix issues but provide detailed guidance for manual resolution: - DiagnoseAuthErrorRemedy: Diagnoses authentication failures - DiagnoseMissingCLIRemedy: Diagnoses a missing CLI binary for whichever CLI instrument the job is configured to use
Phase 5 note — both remedies are now instrument-aware. They honor the active instrument profile's CLI executable name and auth environment variable where available, and fall back to the Claude-specific messaging only when the job is configured for a Claude Code instrument.
Classes¶
DiagnoseAuthErrorRemedy
¶
Bases: BaseRemedy
Diagnoses authentication failures.
Triggers when: - Error relates to API key or authentication - Error code indicates auth failure
This is DIAGNOSTIC only because: - We cannot create API keys - User must configure authentication themselves
Methods:¶
diagnose
¶
Check for authentication-related errors.
Source code in src/marianne/healing/remedies/diagnostics.py
apply
¶
Diagnostic only - no automatic fix.
Source code in src/marianne/healing/remedies/diagnostics.py
DiagnoseMissingCLIRemedy
¶
Bases: BaseRemedy
Diagnoses a missing CLI binary for the job's configured instrument.
Phase 5: previously hardcoded the claude binary. The remedy now
reads the executable name from the instrument registry (via
_cli_binary_for) and falls back to claude only when the
registry entry cannot be resolved (preserves behaviour for the
Claude Code instrument).
Triggers when: - Error indicates the configured CLI is not found - Backend is configured for CLI but binary missing
This is DIAGNOSTIC only because: - Installation requires system-level changes - User should verify installation method for their system
Methods:¶
diagnose
¶
Check for missing CLI errors.
Source code in src/marianne/healing/remedies/diagnostics.py
apply
¶
Diagnostic only - no automatic fix.