Skip to content

fix(cli): clarify Docker socket access errors - #869

Open
ousamabenyounes wants to merge 1 commit into
usestrix:mainfrom
ousamabenyounes:fix/issue-482
Open

fix(cli): clarify Docker socket access errors#869
ousamabenyounes wants to merge 1 commit into
usestrix:mainfrom
ousamabenyounes:fix/issue-482

Conversation

@ousamabenyounes

Copy link
Copy Markdown
Contributor

Summary

  • Detect Docker daemon permission/socket access failures separately from generic Docker unavailable errors.
  • Add a short hint telling users to run Strix with Docker socket access or add their user to the docker group.
  • Add regression coverage for the permission-denied Docker connection path.

Issue

Fix #482

Test verification (RED -> GREEN)

RED, test-only on upstream main:

$ uv run pytest tests/test_docker_connection_message.py -q
AssertionError: assert 'Docker socket' in ...
1 failed

GREEN, after fix:

$ uv run pytest tests/test_docker_connection_message.py -q
. [100%]
1 passed in 2.32s

Additional targeted validation:

$ uv run pytest tests/test_docker_connection_message.py tests/test_docker_client_delete.py -q
6 passed in 2.53s

$ uv run ruff check strix/interface/utils.py tests/test_docker_connection_message.py
All checks passed!

$ uv run mypy strix/interface/utils.py
Success: no issues found in 1 source file

$ uv run bandit -r strix/interface/utils.py -c pyproject.toml
No issues identified.

$ git diff --check
clean

Full-suite baseline comparison:

upstream main: uv run pytest -q -> 2 failed, 339 passed
this branch:   uv run pytest -q -> 2 failed, 340 passed

The remaining pytest failures are pre-existing in tests/test_runner_root_prompt.py with AttributeError: 'types.SimpleNamespace' object has no attribute 'runtime'.

Full Ruff baseline comparison:

upstream main: uv run ruff format --check . -> 4 files would be reformatted
this branch:   uv run ruff format --check . -> 4 files would be reformatted

upstream main: uv run ruff check . -> 2 PLC0415 lazy-import errors
this branch:   uv run ruff check . -> 2 PLC0415 lazy-import errors

@greptile-apps

greptile-apps Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Adds clearer Docker connection diagnostics for permission-related failures.

  • Detects permission-denied and operation-not-permitted Docker exceptions.
  • Displays Docker socket and group-access guidance when detected.
  • Adds regression coverage for the permission-denied diagnostic path.

Confidence Score: 5/5

The PR appears safe to merge.

The new diagnostic is limited to recognized permission-related Docker exceptions, preserves the existing generic error and exception behavior, and is covered by a focused regression test.

Important Files Changed

Filename Overview
strix/interface/utils.py Adds focused classification and guidance for Docker permission errors without changing the existing failure behavior.
tests/test_docker_connection_message.py Verifies that a permission-denied Docker connection failure displays both socket-access and docker-group guidance.

Reviews (1): Last reviewed commit: "fix(cli): clarify Docker socket access e..." | Re-trigger Greptile

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.

Improve error message for better understanding by users

1 participant