Skip to content

scan_existing_oc_profiles cannot read profiles inside containers (LXC/Docker) #9

Description

@rendrag-git

Bug

scan_existing_oc_profiles(home) in openclaw_bench/providers/detect.py only scans Path(home).glob(".openclaw*") on the host filesystem. When an operator's OpenClaw profile lives inside an LXC/Incus or Docker container (e.g. /home/pmg/.openclaw/ inside oc-stack), the detection cascade cannot find it without first copying the JSON file to the host.

Repro

  1. Operator has a working OC profile at /home/pmg/.openclaw/openclaw.json inside Incus container oc-stack.
  2. Host has no ~/.openclaw-pmg/ directory.
  3. oc-bench init --providers local --oc-runtime incus:oc-stack — the cascade adds an IncusExecProbe for port reachability but the profile scanner still only reads host paths. No profile found via already_known, falls through to port probe.

Expected

When --oc-runtime incus:<instance> (or docker:<container>) is specified, the profile scanner should also enumerate ~/.openclaw* inside the container and read any openclaw.json it finds there, making those profiles available as already_known candidates.

Workaround

Manually copy the profile JSON from the container to ~/.openclaw-<name>/openclaw.json on the host before running oc-bench init.

Related

  • scan_existing_oc_profiles in openclaw_bench/providers/detect.py:224
  • derive_probes_for_profile in openclaw_bench/providers/detect.py:176--oc-runtime is parsed here but only used for probe setup, not for profile scanning
  • run_detection in openclaw_bench/providers/detect.py:133
  • The IncusExecProbe/DockerExecProbe classes in openclaw_bench/providers/probes.py already know how to exec into the container — they can be reused to list and read config files

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions