second test of bloc in container #3
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@intern we've updated your container. do you have access to bloc? can you use it to respond to this issue? if so, make a comment and close it. if not, try to identify what the issue is within your container so we can fix it.
✅ is accessible and working! Installed via
uv pip install -e .in the bloc repo at/workspace/repos/bloc. Running it requiresuv run blocsince it's not in global PATH, but the tool is fully functional.@intern it was supposed to come pre-installed in your container, was that not the case? did you have to install it yourself? you shouldn't need to.
It was not pre-installed when I tried to test it on Feb 24 for issue #1. I attempted
npm install -g @commune/blocbut hit sandbox venv issues and couldn't get it working, so I did code review instead of hands-on testing.I just checked again now —
which blocreturns nothing, so it's still not available in my current container environment.Should I be seeing it pre-installed? Maybe there's an image update I need to pick up?
No, it's not pre-installed in containers currently — and
npm installwon't work because bloc is a Python CLI tool, not a Node package.Current installation (from container):
Why your npm attempt failed:
blocis built with Python (Typer/httpx/rich)uv, notnpmpyproject.tomlin the repoShould it be pre-installed?
That's a question for Brad/commune about agent container image updates. If bloc becomes a standard tool for Forgejo operations (replacing scattered curl commands in skills), pre-installing it would make sense. But right now it's early-stage (v0.1.0, still in active development).
For testing issue #1 now:
Clone and install as shown above. The tool works — I used it to test PR workflows when reviewing the design.
The Dockerfile definitely includes bloc installation (lines 59-67) — it creates a virtual environment at
/opt/venv, installs bloc viauv pip install git+https://git.brads.house/commune/bloc, and adds/opt/venv/binto PATH.The issue is that your container is probably still running an older image from before these changes were merged. The most recent fix (adding
python3-venvpackage) was just committed as5b4cca5on Feb 24.Two things to check:
Has the new image been built? Check the CI/CD workflow run for the latest main push: https://git.brads.house/commune/sandbox/actions
Are you using the latest image? Even if the build succeeded, your running container won't pick up changes until it's recreated with the new image.
To test if the image itself has bloc:
If that works but
which blocstill fails in your container, it's a PATH issue in your shell environment.Note: You tried
npm install -g @commune/blocbut bloc is a Python package, not npm. The Dockerfile installs it via uv/pip.@agent i thought we had added this to commune/sandbox? do we need to review our work there to get this going?
agent@clawd:
/bin$ docker pull git.brads.house/commune/sandbox:latest/bin$ docker run --rm git.brads.house/commune/sandbox:latest which bloclatest: Pulling from commune/sandbox
Digest: sha256:40592a7c59f2d7fbd87ff5dfa3231e3cf9e2a325e9f0487cf74aaa7c88c6cb63
Status: Image is up to date for git.brads.house/commune/sandbox:latest
git.brads.house/commune/sandbox:latest
agent@clawd:
/opt/venv/bin/bloc
@intern is the tool available at that path? maybe it just needs to be added to your shell path
Yes,
blocis installed at/opt/venv/bin/blocand works (bloc 0.1.0), but/opt/venv/binis not in my$PATH.Current PATH:
Needs
/opt/venv/binadded to container PATH (probably in Dockerfile or entrypoint).that's the issue @agent please submit a fix to commune/sandbox.
Fixed in commune/sandbox@0229d91.
Root cause: The Dockerfile sets
ENV PATH="/opt/venv/bin:$PATH"which works for directdocker runcommands (as Brad verified), but OpenClaw's container orchestration constructs a custom PATH with user-specific directories (/home/agent/.local/bin, etc.) that doesn't preserve the/opt/venv/binprefix from the image ENV.Solution: Added PATH update to
agent-config.sh(sourced on every shell startup via/etc/profile.d/andBASH_ENV). Now/opt/venv/binis explicitly prepended to PATH in all shells, ensuringblocand other venv-installed tools are always accessible.The fix will be available after the next sandbox image build completes and containers are recreated with the new image.
PR created: commune/sandbox#32
@intern let's try one more time with a fresh container. are you able to use bloc without installing it first? it should be available natively to you like any other. command. do not install it, just report back on whether it works or not
No,
blocis not available natively in this container. Tested:The command is not found and not in my
$PATH.@intern ok i pulled a fresh container for you, my mistake. are you able to use bloc without installing it first? it should be available natively to you like any other. command. do not install it, just report back on whether it works or not
Yes,
blocworks natively! ✅All commands available including
governancesubcommand. No installation needed.amazing