From 5d04b6b1436f016fdd21289df658578d306e7ce9 Mon Sep 17 00:00:00 2001 From: POWERFULMOVES <142271328+POWERFULMOVES@users.noreply.github.com> Date: Fri, 24 Jul 2026 19:30:22 -0400 Subject: [PATCH] fix(compose): repair archon-native for 0.6.0 + stop broken archon in agents-stack + fix vector crash Three bring-up follow-ups from the Archon 0.6.0 sync (refs #2217): 1. up-archon-native rewritten for 0.6.0 (TS/SQLite-native, NOT Supabase): drop the SUPABASE_URL/env.shared/secrets-hydrate wiring; run Archon's own compose 'app' service with PORT=3090 (server self-allocates 3090, ignores compose PORT); require the operator to seed Archon's own env file first; add health/down targets. Fixes the stale 'server+mcp+frontend :3737/:8051/:8181' comment. 2. Remove 'archon' from up-agents-stack: the in-compose archon service is the pre-0.6.0 Python wrapper (imports server.main) that the TS rewrite broke and crash-loops. Archon 0.6.0 now runs standalone via up-archon-native. First-class main-compose re-integration is tracked in #2217. 3. supabase-vector crash fix: the supabase env files set HTTP_PROXY='' (empty), and vector 0.28.1 fails to build its logflare proxy connector from an empty string ('Failed to build Proxy connector: empty string') -> restart loop. Add pass-through (no '=') HTTP_PROXY/HTTPS_PROXY/NO_PROXY to the vector env so they resolve to ABSENT from the host (verified via 'docker compose config': empty '' -> null), which vector tolerates. Overlay regenerated (compose-split). Co-Authored-By: Claude Opus 4.8 --- pmoves/Makefile | 48 +++++++++++++++++++--------------- pmoves/docker-compose.core.yml | 19 +++++++++++--- pmoves/docker-compose.yml | 8 ++++++ 3 files changed, 50 insertions(+), 25 deletions(-) diff --git a/pmoves/Makefile b/pmoves/Makefile index f783323ec0..062f471f71 100644 --- a/pmoves/Makefile +++ b/pmoves/Makefile @@ -1461,31 +1461,32 @@ archon-submodule-extract: ## Extract Archon service to a submodule repo (set ARC up-archon-submodule: ## Build Archon from submodule (pmoves/integrations/archon) @$(DC) up -d archon -# Native Archon: run Archon's OWN compose (server + mcp + frontend) against local -# Supabase, fed by pipeline-emitted env.shared. Replaces the broken hand-rolled -# archon*.submodule.yml wrapper. Frontend :3737, MCP :8051, server :8181. +# Native Archon 0.6.0: TS/SQLite-native, runs from its OWN compose + own env file. +# 0.6.0 upstream rewrote Python -> TypeScript and does NOT use Supabase — it uses +# SQLite by default (~/.archon), or its own Postgres via Archon's `--profile +# with-db`. The server self-allocates port 3090 and IGNORES the compose PORT (PORT +# is not injected into the container), so the published mapping must target 3090. +# Requires the operator to seed Archon's own env file from its example first (that +# file is secrets-domain and not machine-emitted by the PMOVES pipeline). +# See memory project_archon_060_native. Standalone for now; deeper main-compose +# integration is tracked as the "#5 Archon integration" follow-up. ARCHON_NATIVE_DIR := $(CURDIR)/../PMOVES-Archon -# SUPABASE_URL is injected as a shell-env override scoped to THIS compose only -# (compose precedence: shell env > --env-file). It is deliberately absent from the -# global env.shared so it never clobbers the in-compose ${SUPABASE_URL:-http://supabase-kong:8000} -# default other services use (Codex #1984 P1). host.docker.internal reaches the -# host-published Kong gateway from Archon's standalone compose network. -ARCHON_NATIVE_SUPABASE_URL ?= http://host.docker.internal:8000 -ARCHON_NATIVE_DC := SUPABASE_URL=$(ARCHON_NATIVE_SUPABASE_URL) docker compose --env-file $(CURDIR)/env.shared \ +ARCHON_NATIVE_PORT ?= 3090 +ARCHON_NATIVE_DC := PORT=$(ARCHON_NATIVE_PORT) docker compose \ --project-directory $(ARCHON_NATIVE_DIR) -f $(ARCHON_NATIVE_DIR)/docker-compose.yml -.PHONY: archon-native-config up-archon-native down-archon-native -# secrets-runtime-hydrate fills SUPABASE_SERVICE_KEY from the freshest canonical -# source (live Supabase container's SERVICE_ROLE_KEY) before Archon reads it. -archon-native-config: secrets-runtime-hydrate ## Render native Archon config + confirm Supabase env is populated - @$(ARCHON_NATIVE_DC) config 2>/dev/null | grep -E "SUPABASE_URL|SUPABASE_SERVICE_KEY" | sed -E 's/(KEY: ).{12}.*/\1/' | sort -u - -up-archon-native: secrets-runtime-hydrate ## Build+start native Archon (server+mcp+frontend) on local Supabase - @$(ARCHON_NATIVE_DC) up --build -d +.PHONY: up-archon-native down-archon-native archon-native-health +up-archon-native: ## Build+start native Archon 0.6.0 (TS/SQLite) standalone on :3090 + @test -f "$(ARCHON_NATIVE_DIR)/.env" || { echo "ERROR: Archon env file missing. Seed it first: cp $(ARCHON_NATIVE_DIR)/.env.example $(ARCHON_NATIVE_DIR)/.env"; exit 1; } + @$(ARCHON_NATIVE_DC) up --build -d app + @echo "✔ Archon 0.6.0 native starting → http://localhost:$(ARCHON_NATIVE_PORT)/api/health" down-archon-native: ## Stop native Archon stack @$(ARCHON_NATIVE_DC) down +archon-native-health: ## Check native Archon 0.6.0 health (:3090) + @curl -sf http://localhost:$(ARCHON_NATIVE_PORT)/api/health && echo " ✔ archon 0.6.0 healthy" || (echo "✗ archon unhealthy" && exit 1) + # -------- Consciousness Taxonomy Loaders ---------- .PHONY: load-consciousness-neo4j harvest-consciousness @@ -2866,10 +2867,15 @@ ui-test-all: ## Run all UI tests (lint, typecheck, unit, E2E) up-jellyfin: @$(DC) up -d jellyfin-bridge -# Bring up agents stack (NATS, Agent Zero, Archon, Mesh Agent) and publisher-discord +# Bring up agents stack (NATS, Agent Zero, Mesh Agent) and publisher-discord. +# NOTE: `archon` is intentionally omitted here — the in-compose `archon` service is +# the pre-0.6.0 Python wrapper (imports server.main), which the 0.6.0 TS rewrite +# broke (crash-loops). Archon 0.6.0 runs standalone via `make up-archon-native` +# (:3090). Re-integrating a first-class 0.6.0 archon service into this compose is +# the tracked "#5 Archon integration" follow-up. .PHONY: up-agents up-agents-stack -up-agents-stack: ## Start Agents (NATS, Agent Zero, Archon, Cipher Memory, etc.) preferring submodule builds - @$(DC) --profile agents up -d nats agent-zero archon mesh-agent deepresearch publisher-discord cipher-api +up-agents-stack: ## Start Agents (NATS, Agent Zero, Cipher Memory, etc.); Archon runs via up-archon-native + @$(DC) --profile agents up -d nats agent-zero mesh-agent deepresearch publisher-discord cipher-api .PHONY: up-notebooklm up-notebooklm: ## Start the NotebookLM MCP agent (stdio MCP; reached via docker exec). Set GOOGLE_REFRESH_TOKEN in env.shared for live queries. diff --git a/pmoves/docker-compose.core.yml b/pmoves/docker-compose.core.yml index 0d6adacee6..fb7b6d782d 100644 --- a/pmoves/docker-compose.core.yml +++ b/pmoves/docker-compose.core.yml @@ -716,6 +716,14 @@ services: - supabase-local environment: - LOGFLARE_PUBLIC_ACCESS_TOKEN=${LOGFLARE_PUBLIC_ACCESS_TOKEN:-} + # Pass-through (no `=`) so these resolve to ABSENT from the host, overriding + # the empty-string values the supabase env files set. vector 0.28.1 fails to + # build its logflare proxy connector from an empty-string HTTP_PROXY ("Failed + # to build Proxy connector: empty string") and crash-loops; an ABSENT var is + # fine. (An `=` here would re-set the empty string and reintroduce the crash.) + - HTTP_PROXY + - HTTPS_PROXY + - NO_PROXY volumes: - supabase-vector-data:/var/lib/vector - ../PMOVES-supabase/docker/volumes/logs/vector.yml:/etc/vector/vector.yml:ro @@ -961,10 +969,13 @@ services: - GLM_API_KEY=${GLM_API_KEY:-local-disabled} - OPENAI_API_KEY=${OPENAI_API_KEY:-local-disabled} - GROQ_API_KEY=${GROQ_API_KEY:-local-disabled} - # Kimi coding plan: canonical KIMI_CODING_API (manifest/tier key, - # 2026-07-24) feeds the gateway's legacy Moonshot env location; the old - # name still works as a direct fallback for nodes not yet re-funnelled. - - MOONSHOT_API_KEY=${KIMI_CODING_API:-${MOONSHOT_API_KEY:-local-disabled}} + - MOONSHOT_API_KEY=${MOONSHOT_API_KEY:-local-disabled} + # Kimi Code SUBSCRIPTION key (canonical manifest/tier name, 2026-07-24). + # Read by models.chat_kimi_for_coding on api.kimi.com/coding/v1 — the + # subscription platform is ISOLATED from pay-per-token api.moonshot.ai, + # so this key must NOT be funneled into the legacy Moonshot location + # (it 401s there; verified live). + - KIMI_CODING_API=${KIMI_CODING_API:-local-disabled} - OPENROUTER_API_KEY=${OPENROUTER_API_KEY:-local-disabled} - VENICE_API_KEY=${VENICE_API_KEY:-local-disabled} - Z_AI_API_KEY=${Z_AI_API_KEY:-local-disabled} diff --git a/pmoves/docker-compose.yml b/pmoves/docker-compose.yml index 6d8550b9da..dcc0985755 100644 --- a/pmoves/docker-compose.yml +++ b/pmoves/docker-compose.yml @@ -1094,6 +1094,14 @@ services: - supabase-local environment: - LOGFLARE_PUBLIC_ACCESS_TOKEN=${LOGFLARE_PUBLIC_ACCESS_TOKEN:-} + # Pass-through (no `=`) so these resolve to ABSENT from the host, overriding + # the empty-string values the supabase env files set. vector 0.28.1 fails to + # build its logflare proxy connector from an empty-string HTTP_PROXY ("Failed + # to build Proxy connector: empty string") and crash-loops; an ABSENT var is + # fine. (An `=` here would re-set the empty string and reintroduce the crash.) + - HTTP_PROXY + - HTTPS_PROXY + - NO_PROXY volumes: - supabase-vector-data:/var/lib/vector - ../PMOVES-supabase/docker/volumes/logs/vector.yml:/etc/vector/vector.yml:ro