Compare commits

...

3 Commits

Author SHA1 Message Date
infra-sre e860114ef1 fix(merge-queue): add remove_label function needed by ApiError handler
Runtime PR-Built Compatibility / detect-changes (pull_request) Waiting to run
Runtime PR-Built Compatibility / PR-built wheel + import smoke (pull_request) Blocked by required conditions
E2E Staging Canvas (Playwright) / detect-changes (pull_request) Successful in 1m3s
E2E Staging Canvas (Playwright) / Canvas tabs E2E (pull_request) Successful in 15s
CI / Canvas Deploy Reminder (pull_request) Blocked by required conditions
E2E API Smoke Test / E2E API Smoke Test (pull_request) Blocked by required conditions
Harness Replays / Harness Replays (pull_request) Blocked by required conditions
lint-continue-on-error-tracking / lint-continue-on-error-tracking (pull_request) Waiting to run
Lint curl status-code capture / Scan workflows for curl status-capture pollution (pull_request) Waiting to run
lint-mask-pr-atomicity / lint-mask-pr-atomicity (pull_request) Waiting to run
Lint pre-flip continue-on-error / Verify continue-on-error flips have run-log proof (pull_request) Waiting to run
publish-runtime-autobump / bump-and-tag (pull_request) Waiting to run
Harness Replays / detect-changes (pull_request) Successful in 1m0s
E2E API Smoke Test / detect-changes (pull_request) Waiting to run
Handlers Postgres Integration / detect-changes (pull_request) Waiting to run
gate-check-v3 / gate-check (pull_request) Successful in 28s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 46s
publish-runtime-autobump / pr-validate (pull_request) Successful in 1m19s
lint-required-no-paths / lint-required-no-paths (pull_request) Successful in 1m39s
audit-force-merge / audit (pull_request) Has been skipped
qa-review / approved (pull_request) Successful in 28s
security-review / approved (pull_request) Successful in 28s
sop-checklist / all-items-acked (pull_request) Successful in 33s
sop-tier-check / tier-check (pull_request) Successful in 29s
Ops Scripts Tests / Ops scripts (unittest) (pull_request) Failing after 1m47s
Lint workflow YAML (Gitea-1.22.6-hostile shapes) / Lint workflow YAML for Gitea-1.22.6-hostile shapes (pull_request) Successful in 2m18s
Block internal-flavored paths / Block forbidden paths (pull_request) Successful in 40s
lint-required-context-exists-in-bp / lint-required-context-exists-in-bp (pull_request) Successful in 3m1s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 45s
MCP Stdio Transport Regression / MCP stdio with regular-file stdout (pull_request) Successful in 2m11s
Check migration collisions / Migration version collision check (pull_request) Successful in 2m25s
CI / Detect changes (pull_request) Successful in 2m0s
CI / Python Lint & Test (pull_request) Successful in 8m13s
CI / Canvas (Next.js) (pull_request) Successful in 18m12s
CI / Platform (Go) (pull_request) Failing after 20m25s
CI / all-required (pull_request) Failing after 27m35s
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Has been cancelled
The ApiError handler (added in 7c08352d) calls remove_label() to strip
the queue label from PRs blocked by pre-receive hooks, but the function
was never defined — causing NameError on the first merge failure and
crashing the workflow tick.

Fixes: mc#1144 (queue stalls after pre-receive hook 405)
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-15 09:15:08 +00:00
infra-sre d882060249 Merge branch 'main' of https://git.moleculesai.app/molecule-ai/molecule-core into sre/fix-queue-gate-context 2026-05-15 09:09:15 +00:00
app-fe 5dc1e462de fix(external-workspace): pin molecule-ai-workspace-runtime>=0.1.999 in OpenClaw snippet (#1143)
Staging SaaS smoke (every 30 min) / Staging SaaS smoke (push) Has started running
gate-check-v3 / gate-check (push) Has started running
Sweep stale Cloudflare DNS records / Sweep CF orphans (push) Has started running
ci-required-drift / drift (push) Has started running
Runtime Pin Compatibility / PyPI-latest install + import smoke (push) Has started running
Railway pin audit (drift detection) / Audit Railway env vars for drift-prone pins (push) Has started running
Block internal-flavored paths / Block forbidden paths (push) Successful in 17s
publish-workspace-server-image / Production auto-deploy (push) Blocked by required conditions
CI / Shellcheck (E2E scripts) (push) Successful in 35s
Handlers Postgres Integration / detect-changes (push) Successful in 25s
Harness Replays / detect-changes (push) Successful in 22s
CI / Detect changes (push) Successful in 58s
E2E API Smoke Test / detect-changes (push) Successful in 59s
Secret scan / Scan diff for credential-shaped strings (push) Successful in 21s
E2E Staging Canvas (Playwright) / detect-changes (push) Successful in 1m1s
Harness Replays / Harness Replays (push) Successful in 13s
Runtime PR-Built Compatibility / detect-changes (push) Successful in 1m11s
E2E Staging Canvas (Playwright) / Canvas tabs E2E (push) Successful in 53s
Runtime PR-Built Compatibility / PR-built wheel + import smoke (push) Successful in 4m7s
E2E API Smoke Test / E2E API Smoke Test (push) Successful in 6m36s
Handlers Postgres Integration / Handlers Postgres Integration (push) Successful in 7m11s
CI / Python Lint & Test (push) Successful in 8m23s
publish-workspace-server-image / build-and-push (push) Successful in 13m9s
CI / Canvas (Next.js) (push) Successful in 21m39s
CI / Platform (Go) (push) Successful in 23m7s
CI / all-required (push) Successful in 27m51s
CI / Canvas Deploy Reminder (push) Successful in 13s
main-red-watchdog / watchdog (push) Has started running
Sweep stale e2e-* orgs (staging) / Sweep e2e orgs (push) Successful in 28s
Sweep stale Cloudflare Tunnels / Sweep CF tunnels (push) Successful in 1m0s
Continuous synthetic E2E (staging) / Synthetic E2E against staging (push) Successful in 5m52s
gitea-merge-queue / queue (push) Successful in 27s
status-reaper / reap (push) Successful in 3m26s
fix(external-workspace): pin molecule-ai-workspace-runtime>=0.1.999 in OpenClaw snippet

Ensures the molecule-mcp console script (heartbeat + register-on-startup) is present on install. Older versions only ship a2a_mcp_server which does not heartbeat, causing workspaces to go OFFLINE within 60s.

Closes openclaw keepalive regression.
Co-authored-by: Molecule AI App-FE <app-fe@agents.moleculesai.app>
Co-committed-by: Molecule AI App-FE <app-fe@agents.moleculesai.app>
2026-05-15 07:35:57 +00:00
2 changed files with 28 additions and 1 deletions
+23
View File
@@ -314,6 +314,29 @@ def post_comment(pr_number: int, body: str, *, dry_run: bool) -> None:
api("POST", f"/repos/{OWNER}/{NAME}/issues/{pr_number}/comments", body={"body": body})
def remove_label(pr_number: int, label: str, *, dry_run: bool) -> None:
print(f"::notice::removing label '{label}' from PR #{pr_number}")
if dry_run:
return
# Gitea requires label ID, not name, for deletion.
# Multiple labels can share the same name with different IDs — remove all.
_, body = api("GET", f"/repos/{OWNER}/{NAME}/pulls/{pr_number}")
pr_labels = body.get("labels", []) if isinstance(body, dict) else []
removed = False
for lbl in pr_labels:
if lbl.get("name") == label:
label_id = lbl.get("id")
if label_id:
api(
"DELETE",
f"/repos/{OWNER}/{NAME}/issues/{pr_number}/labels/{label_id}",
expect_json=False,
)
removed = True
if not removed:
print(f"::notice::label '{label}' not found on PR #{pr_number}")
def update_pull(pr_number: int, *, dry_run: bool) -> None:
print(f"::notice::updating PR #{pr_number} with base branch via style={UPDATE_STYLE}")
if dry_run:
@@ -646,8 +646,12 @@ const externalOpenClawTemplate = `# OpenClaw MCP config — outbound tool path.
# external machine today, pair with the Python SDK tab.
# 1. Install openclaw CLI + the workspace runtime wheel:
# The version pin (>=0.1.999) ensures the "molecule-mcp" console
# script is present — it is what keeps the workspace ALIVE on canvas
# (register-on-startup + 20s heartbeat). Older versions only ship
# a2a_mcp_server which does not heartbeat.
npm install -g openclaw@latest
pip install molecule-ai-workspace-runtime
pip install "molecule-ai-workspace-runtime>=0.1.999"
# 2. Onboard openclaw against your model provider (one-time setup).
# --non-interactive needs an explicit --provider + --model so it