feat: production readiness — security, real implementations, 383 tests, roadmap - #24
Merged
Merged
Conversation
…, 383 tests, roadmap Replace all simulated Python service logic with real implementations: - Memory: sentence-transformers embeddings (was SHA256 hash) - Probe: real LLM judge via Anthropic/OpenAI (was len(input)/100) - Models: real inference routing to Anthropic/OpenAI/vLLM (was string concat) - Forge: K8sJobBackend training orchestration (was sleep(0.05)) - Connectors: S3/Postgres/Web plugin framework (was random.randint) - Graph: NetworkX-backed with shortest path, neighbors (was regex + 5 nodes) - Ward: removed fake seed stats - Skills: write-through DB caching with table auto-creation - Annotate: real embeddings with DB persistence Security hardening across Go + Python + deployment: - Remove hardcoded secrets (production-fatal if env vars missing) - Fix TLS in K8s client (was InsecureSkipVerify: true with CA cert discarded) - Add JWT auth middleware to all 9 Python services - Add per-IP rate limiting to shared Go server - Fix CORS (require explicit origins in production) - Add agent name validation (DNS-safe regex, reserved names) - Fix 14 silent json.Unmarshal errors in API gateway Go service correctness: - Bounded worker pool for memory persistence (was fire-and-forget goroutines) - Session reaper evicts idle sessions after 30 minutes (was unbounded growth) - Real operator reconciliation with namespace management, finalizers, status conditions - Temporal workflows with 3 workflows, 7 activities, and worker Infrastructure: - Database migration framework with initial 18-table schema - Ingress TLS enforcement, rate limiting, HSTS - Pod Security Standards (restricted profile) - 3 new OPA constraint templates + constraints - Production Helm overlay (TLS, JWT, CNPG, SSL) - External Secrets properly templated Testing: 383 tests across 16 test suites, all passing. Roadmap: expanded to 7 phases — autonomous agents (Hands), 40 channel adapters, desktop app, marketplace, P2P networking, enhanced security.
…tions All 18 conflicts resolved by keeping our production-ready code (auth, CORS hardening, real implementations) over main's simulated versions. Main's structlog configuration merged in where missing. All 383 tests pass after resolution.
… bandit - Replace Depends(require_auth) in function defaults with module-level _auth_dep singleton across all 9 Python services (ruff B008) - Mock boto3 module in connectors tests when not installed (CI has no boto3) - Add nosec B608 annotation for pg_tables-sourced SQL in connectors (false positive — values from system catalog, not user input)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Makes Arcana genuinely production-ready across all layers: security, Go services, Python services, deployment, and testing. Also expands the roadmap with autonomous agents, channel adapters, desktop app, and marketplace.
60 files changed, 11,604 insertions, 498 deletions.
Security Hardening
arcana-devpasswords now fatal in production (ARCANA_ENV=production)InsecureSkipVerifyrequires explicit opt-in_shared/auth.pyjson.Unmarshalerrors fixed in API gatewayrestrictedprofile)Python Services — Real Implementations (was all simulated)
len(input)/100scoringf"Generated response for: {input}"time.sleep(0.05) * 20random.randint(5, 50)Go Service Fixes
Database
pkg/db/migrate.go) with embedded SQL and rollbackTesting — 383 tests, all passing
Roadmap
Expanded from 3 phases to 7: autonomous agents (Hands), 40 channel adapters, desktop app, ArcanaHub marketplace, P2P agent networking, enhanced security (WASM sandbox, Merkle audit, taint tracking).
Test plan
go testpasses for all 7 Go modules (pkg/db, pkg/common, pkg/server, pkg/temporal, cmd/operator, cmd/mesh, cmd/api)pytestpasses for all 9 Python services (248 tests)grep -r "arcana-dev"shows only dev-mode fallbacks)InsecureSkipVerifygated behind explicit env var