Compare commits

...

3 Commits

Author SHA1 Message Date
Molecule AI Dev Engineer A (Kimi) cad33e23c9 debug(ci): add PLATFORM_URL echo + network reachability test + container logs (#2473)
ci-arm64-advisory / fast-checks (pull_request) Waiting to run
Block internal-flavored paths / Block forbidden paths (pull_request) Successful in 10s
CI / Python Lint & Test (pull_request) Successful in 4s
CI / Detect changes (pull_request) Successful in 13s
E2E API Smoke Test / detect-changes (pull_request) Successful in 11s
Handlers Postgres Integration / detect-changes (pull_request) Successful in 11s
Lint curl status-code capture / Scan workflows for curl status-capture pollution (pull_request) Successful in 8s
Lint forbidden tenant-env keys / Scan for repo-host token write into tenant workspace surface (pull_request) Successful in 5s
Lint forbidden tenant-env keys / Scan workspace_secrets writers for forbidden env keys (pull_request) Successful in 8s
E2E API Smoke Test / E2E API Smoke Test (pull_request) Has started running
CI / Platform (Go) (pull_request) Successful in 3s
CI / Canvas (Next.js) (pull_request) Successful in 4s
E2E Chat / detect-changes (pull_request) Successful in 24s
E2E Staging Canvas (Playwright) / detect-changes (pull_request) Successful in 21s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 6s
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Successful in 3s
CI / Canvas Deploy Status (pull_request) Successful in 1s
E2E Chat / E2E Chat (pull_request) Successful in 5s
E2E Staging Canvas (Playwright) / Canvas tabs E2E (pull_request) Successful in 5s
lint-required-workflows-docker-host-pinned / Lint docker-host pin on docker-touching workflows (pull_request) Successful in 11s
CI / all-required (pull_request) Successful in 5s
Lint shellcheck (arm64 pilot) / shellcheck-arm64 (pilot) (pull_request) Successful in 16s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 8s
sop-checklist / review-refire (pull_request_target) Has been skipped
qa-review / approved (pull_request_target) Failing after 10s
gate-check-v3 / gate-check (pull_request_target) Successful in 15s
sop-checklist / all-items-acked (pull_request) acked: 0/7 — missing: comprehensive-testing, local-postgres-e2e, staging-smoke, +4 — body-unfilled: comprehensive-testing, local-postgres-e2
sop-checklist / na-declarations (pull_request) N/A: (none)
security-review / approved (pull_request_target) Failing after 22s
sop-checklist / all-items-acked (pull_request_target) Successful in 19s
Local Provision Lifecycle E2E / Local Provision Lifecycle E2E (stub) (pull_request) Successful in 45s
lint-continue-on-error-tracking / lint-continue-on-error-tracking (pull_request) Successful in 1m22s
Lint pre-flip continue-on-error / Verify continue-on-error flips have run-log proof (pull_request) Successful in 1m10s
lint-required-context-exists-in-bp / lint-required-context-exists-in-bp (pull_request) Successful in 1m23s
lint-required-no-paths / lint-required-no-paths (pull_request) Successful in 1m29s
Lint workflow YAML (Gitea-1.22.6-hostile shapes) / Lint workflow YAML for Gitea-1.22.6-hostile shapes (pull_request) Successful in 1m20s
Local Provision Lifecycle E2E / Local Provision Lifecycle E2E (real image + MiniMax LLM, advisory) (pull_request) Successful in 38s
audit-force-merge / audit (pull_request_target) Has been skipped
Adds debugging to understand why workspace containers cannot reach the
platform for heartbeat/registration after BIND_ADDR=0.0.0.0 fix.

- Echo PLATFORM_URL and PLATFORM_HOST_IP during setup
- Add alpine wget reachability test from molecule-core-net before E2E
- Dump workspace container logs on failure to see stub runtime errors

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-09 09:05:11 +00:00
Molecule AI Dev Engineer A (Kimi) abb3711800 fix(ci): bind platform to 0.0.0.0 + pass PLATFORM_URL in local-provision E2E (#2473 follow-up)
ci-arm64-advisory / fast-checks (pull_request) Waiting to run
Block internal-flavored paths / Block forbidden paths (pull_request) Successful in 4s
CI / Python Lint & Test (pull_request) Successful in 3s
CI / Detect changes (pull_request) Successful in 6s
E2E API Smoke Test / detect-changes (pull_request) Successful in 7s
Lint curl status-code capture / Scan workflows for curl status-capture pollution (pull_request) Successful in 5s
CI / Platform (Go) (pull_request) Successful in 2s
Lint forbidden tenant-env keys / Scan for repo-host token write into tenant workspace surface (pull_request) Successful in 4s
Lint forbidden tenant-env keys / Scan workspace_secrets writers for forbidden env keys (pull_request) Successful in 5s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 2s
E2E Staging Canvas (Playwright) / detect-changes (pull_request) Successful in 7s
E2E API Smoke Test / E2E API Smoke Test (pull_request) Successful in 3s
E2E Chat / detect-changes (pull_request) Successful in 12s
Handlers Postgres Integration / detect-changes (pull_request) Successful in 11s
E2E Staging Canvas (Playwright) / Canvas tabs E2E (pull_request) Successful in 3s
lint-required-workflows-docker-host-pinned / Lint docker-host pin on docker-touching workflows (pull_request) Successful in 5s
E2E Chat / E2E Chat (pull_request) Successful in 3s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 6s
sop-checklist / review-refire (pull_request_target) Has been skipped
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Successful in 10s
gate-check-v3 / gate-check (pull_request_target) Successful in 8s
qa-review / approved (pull_request_target) Failing after 6s
sop-checklist / all-items-acked (pull_request) acked: 0/7 — missing: comprehensive-testing, local-postgres-e2e, staging-smoke, +4 — body-unfilled: comprehensive-testing, local-postgres-e2
sop-checklist / na-declarations (pull_request) N/A: (none)
sop-checklist / all-items-acked (pull_request_target) Successful in 7s
Lint shellcheck (arm64 pilot) / shellcheck-arm64 (pilot) (pull_request) Successful in 14s
CI / Canvas (Next.js) (pull_request) Successful in 26s
security-review / approved (pull_request_target) Failing after 12s
CI / Canvas Deploy Status (pull_request) Successful in 3s
CI / all-required (pull_request) Successful in 9s
lint-required-no-paths / lint-required-no-paths (pull_request) Successful in 54s
Lint pre-flip continue-on-error / Verify continue-on-error flips have run-log proof (pull_request) Successful in 1m3s
Lint workflow YAML (Gitea-1.22.6-hostile shapes) / Lint workflow YAML for Gitea-1.22.6-hostile shapes (pull_request) Successful in 1m6s
lint-continue-on-error-tracking / lint-continue-on-error-tracking (pull_request) Successful in 1m19s
lint-required-context-exists-in-bp / lint-required-context-exists-in-bp (pull_request) Successful in 1m17s
Local Provision Lifecycle E2E / Local Provision Lifecycle E2E (stub) (pull_request) Failing after 4m11s
Local Provision Lifecycle E2E / Local Provision Lifecycle E2E (real image + MiniMax LLM, advisory) (pull_request) Waiting to run
The prior commit added MOLECULE_IN_DOCKER=false and PLATFORM_URL discovery,
but the platform still binds to 127.0.0.1 in dev mode (resolveBindHost).
Workspace containers on molecule-core-net cannot reach 127.0.0.1 inside the
act_runner container, so registration/heartbeat fails and the workspace stays
stuck in 'provisioning'.

Fixes applied:
- Add BIND_ADDR=0.0.0.0 to both platform-server start commands so the
  platform listens on all interfaces and is reachable from molecule-core-net.
- Also pass PLATFORM_URL explicitly in the real-image job (was missing;
  only the stub job had it).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-09 08:30:20 +00:00
Molecule AI Dev Engineer A (Kimi) 697bb3e594 fix(ci): force MOLECULE_IN_DOCKER=false + discover PLATFORM_URL in local-provision E2E (#2473)
ci-arm64-advisory / fast-checks (pull_request) Waiting to run
Block internal-flavored paths / Block forbidden paths (pull_request) Successful in 8s
CI / Python Lint & Test (pull_request) Successful in 8s
CI / Detect changes (pull_request) Successful in 13s
CI / Platform (Go) (pull_request) Successful in 4s
Handlers Postgres Integration / detect-changes (pull_request) Successful in 7s
CI / Canvas (Next.js) (pull_request) Successful in 4s
E2E API Smoke Test / detect-changes (pull_request) Successful in 16s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 5s
E2E Chat / detect-changes (pull_request) Successful in 13s
CI / Canvas Deploy Status (pull_request) Successful in 2s
Lint curl status-code capture / Scan workflows for curl status-capture pollution (pull_request) Successful in 6s
Lint forbidden tenant-env keys / Scan for repo-host token write into tenant workspace surface (pull_request) Successful in 6s
Lint forbidden tenant-env keys / Scan workspace_secrets writers for forbidden env keys (pull_request) Successful in 7s
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Successful in 3s
E2E Staging Canvas (Playwright) / detect-changes (pull_request) Successful in 20s
E2E API Smoke Test / E2E API Smoke Test (pull_request) Successful in 9s
CI / all-required (pull_request) Successful in 4s
E2E Staging Canvas (Playwright) / Canvas tabs E2E (pull_request) Successful in 5s
lint-required-workflows-docker-host-pinned / Lint docker-host pin on docker-touching workflows (pull_request) Successful in 8s
Lint shellcheck (arm64 pilot) / shellcheck-arm64 (pilot) (pull_request) Successful in 17s
sop-checklist / review-refire (pull_request_target) Has been skipped
E2E Chat / E2E Chat (pull_request) Successful in 36s
qa-review / approved (pull_request_target) Failing after 11s
sop-checklist / all-items-acked (pull_request) acked: 0/7 — missing: comprehensive-testing, local-postgres-e2e, staging-smoke, +4 — body-unfilled: comprehensive-testing, local-postgres-e2
gate-check-v3 / gate-check (pull_request_target) Successful in 18s
sop-checklist / na-declarations (pull_request) N/A: (none)
security-review / approved (pull_request_target) Failing after 11s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 21s
sop-checklist / all-items-acked (pull_request_target) Successful in 10s
lint-required-no-paths / lint-required-no-paths (pull_request) Successful in 1m5s
Lint pre-flip continue-on-error / Verify continue-on-error flips have run-log proof (pull_request) Successful in 1m35s
lint-required-context-exists-in-bp / lint-required-context-exists-in-bp (pull_request) Successful in 1m42s
lint-continue-on-error-tracking / lint-continue-on-error-tracking (pull_request) Successful in 1m58s
Lint workflow YAML (Gitea-1.22.6-hostile shapes) / Lint workflow YAML for Gitea-1.22.6-hostile shapes (pull_request) Successful in 2m14s
Local Provision Lifecycle E2E / Local Provision Lifecycle E2E (stub) (pull_request) Failing after 3m53s
Local Provision Lifecycle E2E / Local Provision Lifecycle E2E (real image + MiniMax LLM, advisory) (pull_request) Failing after 5m25s
act_runner executes the job inside a Docker container, so /.dockerenv
exists and the platform auto-detects platformInDocker=true. The proxy then
rewrites workspace URLs from http://127.0.0.1:<port> to
http://ws-<shortid>:8000 (the Docker-internal form).

But the act_runner job container is NOT attached to molecule-core-net,
so net.LookupHost('ws-...') falls through to the host's systemd-resolved
(127.0.0.53) which cannot resolve Docker bridge hostnames. The proxy
returns 502 'workspace URL is not publicly routable' and the E2E fails.

Force MOLECULE_IN_DOCKER=false so the proxy treats itself as host-native
and keeps using the host-mapped 127.0.0.1:<ephemeral_port> URL, which IS
reachable from the job container.

Additionally, host.docker.internal is NOT reliably available on Linux
Docker (the act_runner environment), so workspace containers could not
resolve the platform URL to register/heartbeat. This left the workspace
stuck in 'provisioning' even though the container was running.

Discover the molecule-core-net gateway IP and explicitly set PLATFORM_URL
so workspace containers can reach the platform for registration.

Fixes applied:
- Create molecule-core-net explicitly before inspecting it; the provisioner
  lazily creates it on first workspace boot, but we need the gateway IP
  BEFORE starting the platform.
- Pass PLATFORM_URL explicitly on the platform-server command line because
  GITHUB_ENV propagation is flaky on act_runner (#2468 RCA).

Fixes #2473
2026-06-09 07:13:32 +00:00
+89 -3
View File
@@ -78,6 +78,12 @@ jobs:
# even if the runner's $GITHUB_ENV propagation is flaky (#2468 RCA).
MOLECULE_ENV: development
SECRETS_ENCRYPTION_KEY: lpe2e-test-encryption-key-32bytes!!
# act_runner runs the job inside a Docker container, so /.dockerenv exists
# and the platform auto-detects platformInDocker=true. But the job container
# is NOT on molecule-core-net, so it cannot resolve workspace container
# hostnames (ws-<id>:8000). Force false so the proxy keeps using the
# host-mapped 127.0.0.1:<ephemeral_port> URL, which IS reachable.
MOLECULE_IN_DOCKER: false
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5
@@ -133,6 +139,28 @@ jobs:
PORT=$(python3 -c "import socket; s=socket.socket(); s.bind(('', 0)); print(s.getsockname()[1]); s.close()")
echo "PORT=${PORT}" >> "$GITHUB_ENV"
echo "BASE=http://localhost:${PORT}" >> "$GITHUB_ENV"
# Discover an IP that Docker containers can use to reach the host platform.
# host.docker.internal is not reliably available on Linux (act_runner), so
# workspace containers cannot resolve it and fail to register/heartbeat.
# Workspace containers join molecule-core-net; the host is reachable via that
# network's gateway. Ensure the network exists first (the provisioner creates
# it lazily, but we need the gateway BEFORE starting the platform).
docker network inspect molecule-core-net >/dev/null 2>&1 || docker network create molecule-core-net >/dev/null
# Parse Gateway from raw JSON because --format '{{.IPAM.Config}}' is
# inconsistent across Docker versions (sometimes omits Gateway field).
PLATFORM_HOST_IP=$(docker network inspect molecule-core-net 2>/dev/null | sed -n 's/.*"Gateway": "\([^"]*\)".*/\1/p' | head -1)
if [ -z "$PLATFORM_HOST_IP" ]; then
PLATFORM_HOST_IP=$(docker network inspect bridge 2>/dev/null | sed -n 's/.*"Gateway": "\([^"]*\)".*/\1/p' | head -1)
fi
if [ -z "$PLATFORM_HOST_IP" ]; then
PLATFORM_HOST_IP=$(ip route | awk '/default/ {print $3}' | head -1 || true)
fi
if [ -z "$PLATFORM_HOST_IP" ]; then
echo "::error::Could not determine PLATFORM_HOST_IP for Docker containers to reach the platform"
exit 1
fi
echo "PLATFORM_HOST_IP=${PLATFORM_HOST_IP}"
echo "PLATFORM_URL=http://${PLATFORM_HOST_IP}:${PORT}" >> "$GITHUB_ENV"
# Deterministic admin token: the script sends MOLECULE_ADMIN_TOKEN as the
# bearer; the platform checks ADMIN_TOKEN. Set both to the same value.
T="lpe2e-admin-${{ github.run_id }}-${{ github.run_attempt }}"
@@ -173,8 +201,10 @@ jobs:
run: |
# Bind to the dynamically allocated port (see #2450).
# DATABASE_URL/REDIS_URL/ADMIN_TOKEN/MOLECULE_ENV are inherited from
# $GITHUB_ENV.
PORT=$PORT ./platform-server > platform.log 2>&1 &
# $GITHUB_ENV. PLATFORM_URL is also passed explicitly because
# $GITHUB_ENV propagation can be flaky on act_runner (#2468 RCA).
echo "starting platform with PLATFORM_URL=${PLATFORM_URL:-<fallback>} PORT=$PORT BIND_ADDR=0.0.0.0"
PORT=$PORT BIND_ADDR=0.0.0.0 PLATFORM_URL="${PLATFORM_URL:-http://host.docker.internal:$PORT}" ./platform-server > platform.log 2>&1 &
echo $! > platform.pid
- name: Wait for /health (+ migrations applied)
@@ -198,6 +228,11 @@ jobs:
sleep 1
done
- name: Verify platform reachable from molecule-core-net
run: |
echo "Testing platform reachability from molecule-core-net container..."
docker run --rm --network molecule-core-net alpine:latest sh -c "wget -qO- http://${PLATFORM_URL#http://}/health" || echo "WARN: platform not reachable from molecule-core-net"
- name: Run local-provision lifecycle E2E (stub — REQUIRED)
run: bash tests/e2e/test_local_provision_lifecycle_e2e.sh
@@ -205,6 +240,15 @@ jobs:
if: failure()
run: cat workspace-server/platform.log || true
- name: Dump workspace container logs on failure
if: failure()
run: |
WS_NAME=$(docker ps --filter "name=ws-" --format '{{.Names}}' | head -1 || true)
if [ -n "$WS_NAME" ]; then
echo "=== Workspace container logs for $WS_NAME ==="
docker logs "$WS_NAME" 2>&1 | tail -n 80 || true
fi
- name: Stop platform
if: always()
run: |
@@ -248,6 +292,12 @@ jobs:
# even if the runner's $GITHUB_ENV propagation is flaky (#2468 RCA).
MOLECULE_ENV: development
SECRETS_ENCRYPTION_KEY: lpe2e-test-encryption-key-32bytes!!
# act_runner runs the job inside a Docker container, so /.dockerenv exists
# and the platform auto-detects platformInDocker=true. But the job container
# is NOT on molecule-core-net, so it cannot resolve workspace container
# hostnames (ws-<id>:8000). Force false so the proxy keeps using the
# host-mapped 127.0.0.1:<ephemeral_port> URL, which IS reachable.
MOLECULE_IN_DOCKER: false
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5
@@ -298,6 +348,27 @@ jobs:
PORT=$(python3 -c "import socket; s=socket.socket(); s.bind(('', 0)); print(s.getsockname()[1]); s.close()")
echo "PORT=${PORT}" >> "$GITHUB_ENV"
echo "BASE=http://localhost:${PORT}" >> "$GITHUB_ENV"
# Discover an IP that Docker containers can use to reach the host platform.
# host.docker.internal is not reliably available on Linux (act_runner), so
# workspace containers cannot resolve it and fail to register/heartbeat.
# Workspace containers join molecule-core-net; the host is reachable via that
# network's gateway. Ensure the network exists first (the provisioner creates
# it lazily, but we need the gateway BEFORE starting the platform).
docker network inspect molecule-core-net >/dev/null 2>&1 || docker network create molecule-core-net >/dev/null
# Parse Gateway from raw JSON because --format '{{.IPAM.Config}}' is
# inconsistent across Docker versions (sometimes omits Gateway field).
PLATFORM_HOST_IP=$(docker network inspect molecule-core-net 2>/dev/null | sed -n 's/.*"Gateway": "\([^"]*\)".*/\1/p' | head -1)
if [ -z "$PLATFORM_HOST_IP" ]; then
PLATFORM_HOST_IP=$(docker network inspect bridge 2>/dev/null | sed -n 's/.*"Gateway": "\([^"]*\)".*/\1/p' | head -1)
fi
if [ -z "$PLATFORM_HOST_IP" ]; then
PLATFORM_HOST_IP=$(ip route | awk '/default/ {print $3}' | head -1 || true)
fi
if [ -z "$PLATFORM_HOST_IP" ]; then
echo "::error::Could not determine PLATFORM_HOST_IP for Docker containers to reach the platform"
exit 1
fi
echo "PLATFORM_URL=http://${PLATFORM_HOST_IP}:${PORT}" >> "$GITHUB_ENV"
T="lpe2e-real-admin-${{ github.run_id }}-${{ github.run_attempt }}"
echo "ADMIN_TOKEN=${T}" >> "$GITHUB_ENV"
echo "MOLECULE_ADMIN_TOKEN=${T}" >> "$GITHUB_ENV"
@@ -329,7 +400,8 @@ jobs:
- name: Start platform (background)
working-directory: workspace-server
run: |
PORT=$PORT ./platform-server > platform.log 2>&1 &
echo "starting platform with PLATFORM_URL=${PLATFORM_URL:-<fallback>} PORT=$PORT BIND_ADDR=0.0.0.0"
PORT=$PORT BIND_ADDR=0.0.0.0 PLATFORM_URL="${PLATFORM_URL:-http://host.docker.internal:$PORT}" ./platform-server > platform.log 2>&1 &
echo $! > platform.pid
- name: Wait for /health (+ migrations applied)
@@ -351,6 +423,11 @@ jobs:
sleep 1
done
- name: Verify platform reachable from molecule-core-net
run: |
echo "Testing platform reachability from molecule-core-net container..."
docker run --rm --network molecule-core-net alpine:latest sh -c "wget -qO- http://${PLATFORM_URL#http://}/health" || echo "WARN: platform not reachable from molecule-core-net"
- name: Run local-provision lifecycle E2E (real image + MiniMax LLM — ADVISORY)
env:
# LIFECYCLE_LLM=minimax: provision the REAL claude-code template image
@@ -375,6 +452,15 @@ jobs:
if: failure()
run: cat workspace-server/platform.log || true
- name: Dump workspace container logs on failure
if: failure()
run: |
WS_NAME=$(docker ps --filter "name=ws-" --format '{{.Names}}' | head -1 || true)
if [ -n "$WS_NAME" ]; then
echo "=== Workspace container logs for $WS_NAME ==="
docker logs "$WS_NAME" 2>&1 | tail -n 80 || true
fi
- name: Stop platform
if: always()
run: |