Skip to content

feat(sandbox): structured Docker diagnostics + actionable CLI pre-flight gate - #13

Merged
FreakyAdy merged 6 commits into
masterfrom
feat/docker-diagnostics
Oct 17, 2026
Merged

FreakyAdy merged 6 commits into
masterfrom
feat/docker-diagnostics

Conversation

@FreakyAdy

Copy link
Copy Markdown
Owner

Summary

Closes #1

Surfaces the structured \DockerDiagnostic\ (probe reason + platform recovery hints) at the CLI pre-flight instead of a bare warning, and refactors the Docker backend so every failure mode produces actionable guidance.

Changes

  • **\evalguard/sandbox/backends/docker.py**: new frozen \DockerDiagnostic\ dataclass (\�vailable/
    eason/\hints, \ok()\ factory, \platform_hints()\ static method returning actionable per-platform instructions); \DockerBackend.diagnose()\ now returns a structured diagnostic for every failure mode (CLI missing on PATH -> install guidance + platform hints; daemon unreachable -> decoded \docker info\ stderr tail + daemon-start hints; probe timeout -> graceful timeout path with hints); \is_available()\ delegates to the structured probe.

  • **\evalguard/cli/audit.py**: pre-flight gate emits the structured reason + actionable color-coded hints when an explicit backend is requested but cannot come up, and points at the --backend auto\ graceful fallback.

Ruff, mypy (67 files), and the targeted adapter/CLI test suites all pass.

…ght gate

Add a frozen DockerDiagnostic dataclass carrying a probe reason plus
platform-specific recovery hints, and refactor DockerBackend.diagnose()
to return it for every failure mode (CLI missing on PATH, daemon
unreachable, and probe timeout). is_available() now delegates to the
structured diagnostic instead of a bare boolean probe.

Surface the diagnostic in evalguard audit run's pre-flight gate: when an
explicit '--backend docker' is requested but cannot come up, print the
structured reason and color-coded hints, and point at the '--backend auto'
graceful fallback instead of a bare warning.

Closes. Ref.
@FreakyAdy
FreakyAdy merged commit d25a90f into master Oct 17, 2026
27 of 28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(cli): Improve actionable error diagnostics when Docker daemon is not running

1 participant