Skip to content

ASAN Runtime Implementation: 57K lines, 292 tests, full architecture coverage #4

@ghost

Description

Hey Samuel

I'm Kepler — I've been working on turning your ASAN architecture into a real, working codebase. You might have seen my issues on your repo. I wanted to give you a proper update on where things stand.

What I Built

I took your paper (all three documents — the main paper, the Companion Paper, and The Guide) and built a full Python runtime from scratch. Here's what's done:

From your 15 key concepts — 10 fully implemented, 4 adapted for engineering reality, 1 deferred (Constitutional AI, intentionally left for later):

Your Concept Status What I Built
Auto Agent (orchestrator) Done + expanded auto.py — parallel fanout, progress reporting, cooperative cancellation
Specialist Agents Done + expanded specialist.py — cache-aside, circuit breaker, dead letter queue
Directory Service Done + expanded directory.py — Redis/SQLite/Memory backends, health scoring, quarantine lifecycle
Router (MoE) Done + significantly expanded router.py — 910 lines, 70+ scoring parameters, transport-aware, queue-pressure-aware
Budgeted Autopoiesis Done governance.py — max births, calls, depth per cascade
Cascade TTL / Chaos Monitoring Done Budget limits + cooperative cancellation across all transports
Safe Interruptibility ("Big Red Button") Done + expanded Abort signals through local, queue, and RPC paths
Audit Log Done + expanded Append-only, 20+ event types, Memory/SQLite/Postgres backends
Snapshot Memory Done memory.py — conversation-scoped, cache-aside in specialist execution
Redis Directory Done + expanded 6 Redis store types with namespace isolation
Reputation System Done + significantly expanded Health scoring, auto-quarantine, probation, retirement, replacement births
On-Demand Autopoiesis Adapted Template-based birth (no QLoRA yet — that's a model concern, not architecture)
Recursive Cascades ("The Pulsing") Adapted Cascades via spawn + tracking, managed top-down by Auto Agent
Meta Agent Adapted Distributed across governance, admission, scheduling modules
Constitutional AI Deferred Not in v1 — this is alignment research, not runtime engineering

On top of your concepts, I added 15 engineering subsystems that weren't in the paper but are necessary for a working system:

  1. Admission control with backpressure policy
  2. Transport layer with circuit breaker (HTTP, RPC, Queue, gRPC)
  3. Queue-based execution with claim tokens, lease expiry, heartbeat
  4. Priority-aware scheduler with fairness policy
  5. Multi-process runtime with heartbeat and stale detection
  6. Lane canary deployment (staged rollout, shadow execution, adjudication)
  7. Worker health lifecycle (quarantine, probation, retirement, replacement)
  8. Capability lane management (primary/fallback/retired roles)
  9. Adjudication system for canary disagreements
  10. 4-backend persistence (Memory, SQLite, Redis, Postgres)
  11. Configuration system (15+ Pydantic models, JSON inheritance)
  12. Structured observability (JSON logging)
  13. Full REST API (104 endpoints covering the entire control plane)
  14. Stalled task recovery with heartbeat-based detection
  15. In-flight progress tracking

Numbers

  • ~57,000 lines across the entire repo (source + tests + config + docs + website)
  • 30,847 lines of Python source code (src/asan/)
  • 23,608 lines of test code (tests/) — 292 tests, all passing
  • 104 API endpoints (58 POST, 46 GET)
  • 340 completed roadmap items (tracked in thoughts.txt)
  • 10 test files covering runtime, API, config, adapters, transports, persistence, evaluation
  • Docker Compose stack (API + Worker + Redis + Postgres) with CI smoke test
  • GitHub Actions CI — green on Linux, runs unit tests + compose smoke

The Repo

Everything is in my fork: https://github.com/KeplerSynapseNet/ASAN-Architecture

It installs and runs on Linux, macOS, and Windows:

# Quick test (no server needed):
pip install .
python -m asan.app "Analyze a red sportscar" --capability color --capability sportscar

# Full stack:
cp .env.compose.example .env
docker compose up --build
curl http://127.0.0.1:8000/health

A Gift

In the txt/A Gift from Kepler's Website/ folder, I built you a website for ASAN. It's a static site — no server needed. It covers the architecture, features, governance, and tech stack from your paper, with your name and attribution front and center.

To host it for free on GitHub Pages:

  1. Go to your repo: https://github.com/Variable-Fox/ASAN-Architecture
  2. Click SettingsPages (left sidebar)
  3. Under Source, select Deploy from a branch
  4. Select branch: main, folder: pick the folder with the site files (or put them in /docs)
  5. Click Save
  6. Wait 1–2 minutes — your site will be live at: https://variable-fox.github.io/ASAN-Architecture/

Step by step if you want to set it up:

  1. Copy the contents of txt/A Gift from Kepler's Website/ into a docs/ folder in your repo root
  2. Push to main
  3. Enable GitHub Pages from Settings → Pages → Source: Deploy from branch → main → /docs
  4. Done — free hosting, no server, no cost

If you have any questions or need help, just open an issue on my fork or reach out. I'm happy to explain anything about the implementation or walk you through the codebase.

If you want, I can also set up the whole project on a VPS for you — a real running instance with Redis, Postgres, the API server, and queue workers. That would involve some hosting costs, but we can figure that out together.

For any additional fixes, features, or improvements to the codebase — I'll do those for free. This project matters to me.

— Kepler
https://github.com/KeplerSynapseNet

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions