install_plugin: gitea:// source on a PRIVATE repo hangs → 502 (no fast-fail; never reconciles) #3108

Closed
opened 2026-06-21 05:56:09 +00:00 by core-devops · 0 comments
Member

Summary: install_plugin with a gitea://owner/repo#ref source pointing at a private Gitea repo hangs and returns HTTP 502 (CloudFlare gateway timeout, ~100s) instead of fast-failing. The workspace is never reconciled/restarted (the POST hangs before that), and the install does not persist.

Repro (observed live 2026-06-21):

  1. install_plugin(workspace=<id>, source="gitea://molecule-ai/molecule-ai-plugin-image-gen#v0.1.0") where the repo was private.
  2. Result: HTTP 502 (host agents-team.moleculesai.app). Two attempts, both 502. list_installed_plugins stayed empty; target workspace uptime kept climbing (never restarted) → the handler failed/hung early, before touching the box.
  3. Workaround that fixed it: making the repo public → the exact same install returned {"status":"installed"} immediately and reconciled the workspace.

Root cause (strongly indicated): the server-side POST /workspaces/:id/plugins gitea source resolver fetches the repo in a way that hangs on a private repo (e.g. an unauthenticated git clone that blocks on a credential prompt, or an auth path that retries until the gateway times out) rather than using an authenticated Gitea archive/tarball API call that returns a clean 401/403/404. Note platform-mcp (also private) installs fine because it's delivered via the core-declared concierge path, not the gitea:// user-install resolver — so the bug is specific to the gitea:// install_plugin code path.

Impact: any private-repo plugin installed via gitea:// (the marketplace/user-install path) 502s with no actionable error. Operators can't tell "private repo" from "install pipeline broken."

Suggested fix:

  • Resolve gitea:// sources via the authenticated Gitea API (archive/tarball or contents) with the resolver's token, so a private repo the token can read works, and one it can't returns a fast, clear 403/404 (not a hang).
  • Bound the install op with a timeout well under the gateway's, returning a structured error.
  • Surface a clear "repo not accessible / private" error to install_plugin callers.

Found while shipping the image-gen plugin (RFC #3105). Filed for the plugin-install pipeline owners.

**Summary:** `install_plugin` with a `gitea://owner/repo#ref` source pointing at a **private** Gitea repo **hangs and returns HTTP 502** (CloudFlare gateway timeout, ~100s) instead of fast-failing. The workspace is never reconciled/restarted (the POST hangs before that), and the install does not persist. **Repro (observed live 2026-06-21):** 1. `install_plugin(workspace=<id>, source="gitea://molecule-ai/molecule-ai-plugin-image-gen#v0.1.0")` where the repo was **private**. 2. Result: `HTTP 502` (host `agents-team.moleculesai.app`). Two attempts, both 502. `list_installed_plugins` stayed empty; target workspace uptime kept climbing (never restarted) → the handler failed/hung **early**, before touching the box. 3. **Workaround that fixed it:** making the repo **public** → the exact same install returned `{"status":"installed"}` immediately and reconciled the workspace. **Root cause (strongly indicated):** the server-side `POST /workspaces/:id/plugins` gitea source resolver fetches the repo in a way that **hangs on a private repo** (e.g. an unauthenticated `git clone` that blocks on a credential prompt, or an auth path that retries until the gateway times out) rather than using an **authenticated Gitea archive/tarball API call** that returns a clean 401/403/404. Note `platform-mcp` (also private) installs fine because it's delivered via the core-declared concierge path, **not** the `gitea://` user-install resolver — so the bug is specific to the `gitea://` install_plugin code path. **Impact:** any private-repo plugin installed via `gitea://` (the marketplace/user-install path) 502s with no actionable error. Operators can't tell "private repo" from "install pipeline broken." **Suggested fix:** - Resolve `gitea://` sources via the **authenticated Gitea API** (archive/tarball or contents) with the resolver's token, so a private repo the token *can* read works, and one it *can't* returns a fast, clear 403/404 (not a hang). - Bound the install op with a timeout well under the gateway's, returning a structured error. - Surface a clear "repo not accessible / private" error to `install_plugin` callers. Found while shipping the image-gen plugin (RFC #3105). Filed for the plugin-install pipeline owners.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: molecule-ai/molecule-core#3108