Skip to content

fix(install): revert prebuilt image, use canonical A0 plugin pattern (v1.4.3)#7

Merged
notabotchef merged 2 commits intomainfrom
fix/v1.4.3-revert-prebuilt-image
Apr 12, 2026
Merged

fix(install): revert prebuilt image, use canonical A0 plugin pattern (v1.4.3)#7
notabotchef merged 2 commits intomainfrom
fix/v1.4.3-revert-prebuilt-image

Conversation

@notabotchef
Copy link
Copy Markdown
Owner

Summary

The v1.4.0 prebuilt-image install path is broken in production. Three docker-publish runs in a row failed for different reasons:

v1.4.0/v1.4.1: /bin/sh: 1: pip: not found
v1.4.2:        /usr/bin/python3: No module named pip
v1.4.2 retry:  Cannot uninstall cryptography 46.0.7 (apt-managed)

Root cause is upstream: the Dockerfile was FROM frdel/agent-zero-run:latest, which is an outdated base. The current Agent Zero base is agent0ai/agent-zero-base:latest. The frdel image ships python3 without the pip module, has python3-cryptography 46.0.7 installed via apt with no pip record file, and the pessimistic version pin (<45.0) made pip try to downgrade the apt-managed package.

The ghcr.io/notabotchef/phantom-bridge package was never published successfully — anyone following the v1.4.0/v1.4.1/v1.4.2 install instructions hits pull access denied and a broken stack.

Fix

Revert to the install pattern A0 documents for every plugin (per agent0ai/agent-zero docs/developer/plugins.md): clone into usr/plugins/, expose port 6080 via a compose override, click Execute in A0's Plugin List UI to run execute.py. This is the flow phantom-bridge has worked with for the entire 1.x line; v1.4.0 tried to "improve" it with a prebuilt image and that turned out to be the wrong tradeoff.

New Quick Start (3 commands)

git clone https://github.com/notabotchef/phantom-bridge.git \
    ./a0-data/usr/plugins/phantom_bridge
curl -O https://raw.githubusercontent.com/notabotchef/phantom-bridge/main/docker-compose.override.yml
docker compose up -d

Then open A0 → Plugins → click Execute on Phantom Bridge.

Changes

  • docker-compose.override.yml — removed the broken image: reference and the smart-entrypoint indirection. Now only adds the noVNC port mapping (${PHANTOM_NOVNC_PORT:-6080}:6080) and the plugin volume mount. Your existing A0 image stays in use.

  • execute.py — hardened to bootstrap python3-pip via apt if the base image doesn't ship it (some don't), uses --break-system-packages for PEP 668, and --ignore-installed so pip doesn't fight with apt-managed packages like python3-cryptography. Now also checks cryptography import in addition to websockets, and only installs what's actually missing.

  • README.md — Quick Start rewritten to the canonical 3-command flow. What's New entry is honest about v1.4.0–v1.4.2 being broken and tells users to pull the latest override.

  • .github/workflows/docker-publish.yml — gated to manual workflow_dispatch only. Stops failing on every push. Dockerfile and entrypoint stay in the repo for anyone who wants to fork and rebuild against agent0ai/agent-zero-base.

  • plugin.yaml — 1.4.3

Test plan

  • python3 -m py_compile execute.py — clean
  • python3 -c "import yaml; yaml.safe_load(...)" on all 3 yaml files — clean
  • Quick Start steps re-read end to end on a fresh shell
  • Real install on a fresh A0 instance — this is the actual verification. Steps: clone into ./a0-data/usr/plugins/phantom_bridge, drop the override, docker compose up -d, click Execute in the UI, verify Phantom Bridge sidebar opens.

Files

  • docker-compose.override.yml — drop broken image ref
  • execute.py — pip bootstrap + cryptography check
  • README.md — Quick Start rewrite + What's New entry
  • .github/workflows/docker-publish.yml — manual dispatch only
  • plugin.yaml — 1.4.3

Action items after merge

…(v1.4.3)

The v1.4.0 prebuilt-image install path is broken in production. Three
docker-publish runs in a row failed:

  v1.4.0/v1.4.1: /bin/sh: 1: pip: not found
  v1.4.2:        /usr/bin/python3: No module named pip
  v1.4.2 retry:  Cannot uninstall cryptography 46.0.7 (apt-managed)

Root cause is upstream: the Dockerfile was FROM frdel/agent-zero-run,
which is an outdated base. The current Agent Zero base is
agent0ai/agent-zero-base:latest. The frdel image ships python3
without the pip module, has python3-cryptography 46.0.7 installed via
apt with no pip record file, and our pessimistic version pin
(<45.0) made pip try to downgrade the apt-managed package.

The ghcr.io/notabotchef/phantom-bridge package was never published
successfully — anyone following the v1.4.0/v1.4.1/v1.4.2 install
instructions hit `pull access denied` and a broken stack.

Fix: revert to the install pattern A0 documents for every plugin —
clone into usr/plugins/, expose port 6080 via a compose override,
click Execute in the A0 Plugins UI to run execute.py. This is the
flow phantom-bridge has worked with for the entire 1.x line; v1.4.0
tried to "improve" it with a prebuilt image and that turned out to
be the wrong tradeoff.

Changes:

- docker-compose.override.yml: removed the broken `image:` reference
  and the smart-entrypoint indirection. Now only adds the noVNC
  port mapping and the plugin volume mount. Your existing A0 image
  stays in use.

- execute.py: hardened to bootstrap python3-pip via apt if the
  base image doesn't ship it, uses --break-system-packages for
  PEP 668, and --ignore-installed so pip doesn't fight with apt-
  managed packages. Now also checks `cryptography` import in
  addition to `websockets`.

- README.md: Quick Start rewritten to the canonical 3-command
  flow (clone, override, restart, click Execute). What's New entry
  is honest about v1.4.0–v1.4.2 being broken.

- .github/workflows/docker-publish.yml: gated to manual
  workflow_dispatch only. Stops failing on every push. Dockerfile
  and entrypoint stay in the repo for anyone who wants to fork
  and rebuild against agent0ai/agent-zero-base.

- plugin.yaml: 1.4.3
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 681a15bde8

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread execute.py Outdated
Comment on lines +100 to +101
print(f"[WARN] pip install failed: {result.stderr[:300]}")
print("Manual fix: python3 -m pip install --break-system-packages " + " ".join(needed))
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Return non-zero when Python dependency install fails

When pip install fails, the script only logs a warning and continues to print Setup complete!, then exits successfully; in the new v1.4.3 install flow this makes A0 report plugin setup as successful even though required deps are still missing. This occurs in common failure cases like network-restricted containers or pip permission/PEP668 issues, and leads to runtime failures later when CDP/WebSocket code imports these packages.

Useful? React with 👍 / 👎.

execute.py logged a warning but returned 0 (success) when pip install
failed. A0's Plugin List UI interprets exit 0 as "setup succeeded",
so users saw a green checkmark even though required deps were missing.
The actual failure surfaces later as an ImportError at runtime.
@notabotchef notabotchef merged commit 2ec70e3 into main Apr 12, 2026
@notabotchef notabotchef deleted the fix/v1.4.3-revert-prebuilt-image branch April 12, 2026 04:04
@notabotchef
Copy link
Copy Markdown
Owner Author

Lesson learned: don't fight the base image. The canonical A0 plugin flow (clone + execute.py) has worked since v1.0 for a reason — it uses sys.executable so it always targets the right Python. The prebuilt image was solving a problem we didn't have.

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.

1 participant