Nov 2025 – Present
CrunchAtlas
Software Engineer
Local-first, air-gapped AI security platform for critical infrastructure. Sole author of the systems below.
- Replaced Celery with a Postgres-native job queue for the platform's GPU, LLM, sandbox, and document jobs, so any one job can be cancelled without killing its worker. Interactive work runs ahead of background work, customers take fair-share turns, dependency DAGs gate what is claimable, and workers claim with
SELECT FOR UPDATE SKIP LOCKED. - Made every job reach a terminal state, even when its process dies. Each runs under a spawned (not forked) supervisor that survives a segfault or OOM kill and reaps the child's process group, and a heartbeat sweeper fails jobs whose supervisor dies or freezes. Chaos tests SIGKILL live supervisors and kill the database mid-job.
- Replaced fixed LLM concurrency with token-budgeted GPU scheduling. Five fixed 131k-token llama.cpp slots became one 655k-token KV-cache pool that holds 7 concurrent 128k-context agents or 160 4k-token jobs; a per-pool Postgres advisory lock admits a job only when its tokens fit, re-pricing under
READ COMMITTEDafter any wait. - Made the platform investigate on its own, completing nearly 17,000 PCAP investigations in its first two months with no analyst click. A background reconciler queues the AI work that should exist, recording its progress durably so a crash loses nothing already queued.
- Cut the main document-list query from 12.3 s to 1.5 ms on a 7.2M-row table by moving per-document alert counts into a summary table kept exact by statement-level Postgres triggers, with a reconcile job that repairs drift.
- Created the agent harness every security agent runs on (LangChain/LangGraph). Before each model call it tokenizes the exact outgoing request and compacts or refuses anything that won't fit; it also evicts oversized tool output, detects tool-call loops, and sandboxes each run in a network-isolated container.
- Own AtlasCyber's AWS across GovCloud and commercial partitions, managed in Terraform: EC2 and its reverse-proxy/tunnel fleet, load balancers, WAF, S3, IAM, VPC networking, CloudWatch alarms, and CloudFront.
- Rewrote the network-capture sensor from scratch in Rust (
#![forbid(unsafe_code)]): a headless Linux daemon whose SQLite-WAL upload queue persists each capture before upload, so queued captures survive a restart.