Docker Desktop workspace mount inconsistency and worker proxy CA provisioning issues

Open
#893 3 comments 1 reaction 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
docker, docker-compose, go, macos, postgresql

Research direction

Start by reviewing docker-compose.desktop.yml and tracing runner workspace-root resolution and the mounts created for workers. Then inspect how worker-facing artifact paths and proxy CA settings are configured; the issue does not identify the source files or tests. Done means Docker Desktop workers can use their sandbox workspace and read the proxy CA while sandbox protections remain enabled.

Written by the indexing model from the issue text.

Description

bug P2

On macOS with Docker Desktop, I encountered a workspace storage inconsistency between the ARTEX backend, runner and dynamically created worker containers.

The backend created task directories inside a Docker named volume, while the runner and worker were using a different host-mounted directory.

I resolved the workspace storage inconsistency locally using an additional Docker Compose override.

However, two related issues remain:

  • Workers sometimes attempt to access backend-specific absolute filesystem paths instead of their sandbox workspace.
  • A worker reported a curl error involving the proxy CA certificate path.

Environment

  • ARTEX branch: main
  • Latest tested commit: c985c830
  • OS: macOS, Apple Silicon
  • Hardware: Apple M3 Max, 64 GB RAM
  • Docker Engine: 29.7.2
  • Docker Compose: 5.4.0
  • Sandbox mode: required
  • Deployment: Docker Desktop Compose configuration

The backend, runner and PostgreSQL services were operational, and the sandbox isolation self-test passed.

Issue A: Named-volume and bind-mount inconsistency

The original storage configuration was effectively:

Component Storage source Container destination
Backend Named volume artex_data /app/data
Runner Host bind mount ./data/tasks /app/data/tasks
Worker Task directory resolved from the runner’s host workspace root /workspace

The backend created the task and intent directories inside its named volume.

The worker received a different directory and therefore could not access the expected intent workspace.

The original error was:

OCI runtime exec failed:
chdir to cwd ("/workspace/i15") set in config.json failed:
no such file or directory

The Docker daemon reported the named-volume mountpoint as:

/var/lib/docker/volumes/artex_data/_data

Local workaround

I created an additional Compose override named:

docker-compose.workspace.yml

Exact contents:

services:
artex-runner:
environment:
ARTEX_HOST_WORKSPACE_ROOT: /var/lib/docker/volumes/artex_data/_data/tasks
ARTEX_HOST_AUDIT_ROOT: /var/lib/docker/volumes/artex_data/_data/egress-audit
volumes:
- type: volume
source: data
target: /app/data/tasks
volume:
subpath: tasks
- type: volume
source: data
target: /app/data/egress-audit
volume:
subpath: egress-audit

The Compose configuration was successfully validated using:

docker compose
-f docker-compose.yml
-f docker-compose.desktop.yml
-f docker-compose.workspace.yml
config --quiet

The runner was subsequently recreated using the same Compose files.

After applying the override, the backend and runner could see the same task directories.

Verification

An isolated local worker test was performed with:

  • Network access disabled.
  • Read-only root filesystem.
  • All Linux capabilities dropped.
  • No new privileges.
  • UID 10001.

The test calculated 25 multiplied by 16, wrote the result to a temporary workspace file, read it back and removed the temporary file.

The relevant output was:

/workspace/i15
400
400
WORKSPACE_TEST_SUCCESS

A subsequent ARTEX-managed diagnostic successfully created and read:

/workspace/i18/diagnostic.txt

The backend independently accessed the corresponding file at:

/app/data/tasks/6/i18/diagnostic.txt

The file contained:

400

This confirms that the local override resolved the workspace storage inconsistency in my Docker Desktop environment.

The mount table above summarizes the earlier inspection results. I have not retained a complete sanitized dump of the resolved Compose configuration.

The audit directory write path has not been independently verified.

Issue B: Backend paths exposed to sandbox workers

After resolving the mount inconsistency, a Worker still attempted to access a backend-specific absolute path.

For example:

/app/data/tasks/6/main

However, its actual sandbox working directory was:

/workspace/i18

The attempted directory creation failed because the worker root filesystem was read-only.

The Worker subsequently succeeded when instructed to use relative paths within its existing working directory.

This suggests a possible inconsistency between the artifact or workspace paths communicated to the model and the paths actually available inside the sandbox.

The exact source of the incorrect path has not been conclusively identified.

Issue C: Proxy CA certificate path

A Worker previously returned the following curl error:

curl: (77) error setting certificate file:
/app/data/traffic/_ca/mitmproxy-ca-cert.pem

The backend also reported the following certificate path during startup:

/app/data/traffic/_ca/mitmproxy-ca-cert.pem

It is not yet clear whether the worker receives a backend-specific CA path, lacks the required certificate mount, or encounters a file permission or certificate provisioning problem.

I have not collected the worker-side CA environment variables or a direct ls -l inspection of this path inside the affected worker.

Therefore, the CA provisioning root cause remains unconfirmed.

Expected behavior

  • The default Docker Desktop deployment should provide consistent task workspace storage across the backend, runner and dynamically created workers.
  • Workers should receive valid sandbox-local working directories and artifact paths.
  • Backend-specific absolute paths should not be presented as writable worker paths when they are inaccessible inside the sandbox.
  • Proxy CA configuration should reference a certificate that is accessible and readable inside the worker.
  • Sandbox isolation, read-only filesystem protections and TLS verification should remain enabled.

Suggested investigation

Please review:

  1. Named-volume handling in docker-compose.desktop.yml.
  2. Runner workspace-root resolution and dynamically created worker mounts.
  3. Consistency between backend artifact paths and worker-facing workspace instructions.
  4. Worker CA certificate provisioning, environment variables and mount destinations.
  5. Whether Docker Desktop deployments require an officially supported workspace configuration similar to the local override above.

Current status

  • Workspace storage inconsistency: resolved locally.
  • Worker-relative file creation and reading: verified.
  • Incorrect absolute workspace paths: observed.
  • Proxy CA certificate error: observed, root cause not yet confirmed.
  • Complete resolved Compose output: not currently available.
  • Worker-side CA environment and file inspection: not yet collected.

The coverage-tool exposure and worker retry-loop concerns are being reported separately.

Thank you.

Dominant language
Go
Stars
18.7k
Forks
7k
Avg merge
10h 57m
Merged PRs (30d)
494

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from BaaRai/ARTEX

All issues in BaaRai/ARTEX

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.