Skip to content
View m4xkushnir's full-sized avatar

Highlights

  • Pro

Block or report m4xkushnir

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Content in all repositories owned by your account will be closed.
Maximum 250 characters. Please don’t include any personal information such as legal names or email addresses. This note will only be visible to you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
m4xkushnir/README.md

Maxim Kushnir

Backend and systems engineer. Deterministic, event-sourced backends in async Python, and Rust when a benchmark says it's worth it.

Ventute LinkedIn Location Languages


Python, Rust, C++, FastAPI, PostgreSQL, Redis, Docker, Kubernetes, Terraform, Prometheus, Grafana, Java

Since December 2022 I've been the only engineer on Ventute, an AI business-simulation platform in production with real users. I designed and wrote the whole backend, from the simulation kernel to deployment and monitoring. More recently I've been building security and evaluation tools for AI agents, starting with honeyrun.

I like systems you can check. If something happened, you should be able to replay it and get the same result. If a rule matters, the code should make it impossible to break, so you aren't relying on a test to catch it. Most of my work on Ventute comes back to that.

I studied Business alongside Maths and Computer Science at A-level, and Ventute is really a financial and business model that has to stay consistent turn after turn. That's a big part of why I'm interested in fintech.


Projects

Project What it does
honeyrun
stars
Runs an untrusted repo, npm or PyPI package, or MCP server in a sandbox full of fake keys and shows what it tried to take. Catches time bombs by replaying the run 45 days later, and answers LOOKS SAFE, UNCLEAR or NOT SAFE.
findings‑triage Turns raw Semgrep, Trivy and Gitleaks output into a short list a developer can act on: stable fingerprints, cross-scanner dedup, audited suppressions and replayable reports.
cs‑agent‑regress A deterministic regression harness for LLM customer-service agents, with a failure analysis of 1,368 public τ-bench retail conversations.
run‑debugger‑evals Measures how well an agent skill diagnoses failed agent runs on Haiku, Sonnet and Opus, and which routing rule gets Sonnet-level answers at Haiku cost.
ventute‑labs Offline tooling for Ventute: scenario generation and output evaluation.

Open source

Project Change Status
AnyIO groupby() no longer splits identical keys that don't compare equal to themselves (#1447) merged
lru_cache(None) no longer silently caps the cache at 128 (#1446) in review
QueryFlux Access control denies EXECUTE and PREPARE (#384), keeps sqlglot off async workers (#385), ends an executing query exactly once (#386) merged
Keeps capacity leases of running queries on shutdown (#387) in review
RESTHeart Reported two access-control vulnerabilities in per-user read filters and change streams fixed in 9.8.2
Python plugins on GraalPy prototype (#779), design review on the Python SDK RFC #759 draft
Claude Agent SDK (Python) Keeps stdin open after ClaudeSDKClient.connect() with a message stream (#1444) in review
τ²-bench The text user simulator waits until an agreed action has actually been completed (#702) in review
Resend Python SDK HTTPXClient can use a caller-owned httpx.AsyncClient (#307); 401/403 validation errors map to ValidationError (#305) in review
vLLM Serves Inkling on SM12x GPUs through the Triton attention fallback (#51560) in review

What I've built at Ventute

A deterministic simulation kernel. One event-sourced kernel is the only thing allowed to change state, time and money. Anything unpredictable (random numbers, model output, clock reads) is resolved once and written to an append-only log. A pure reducer folds that log back into state, so any past turn replays bit for bit. Golden tests also check invariants after a snapshot is regenerated, so a bug can't slip in as the new baseline.

Declarative engine orchestration. The simulation used to run through a 1,000-line, hand-ordered sequence of engines. I replaced it with 21 engines that each declare their phase, the state they read, the state they own and what they depend on. The order is derived with Kahn's algorithm, and cycles or contradictions are rejected before anything runs. Engines only propose changes; a single writer applies them and checks ownership. It caught real bugs, including an alphabetical tie-break that let one engine overwrite revenue from closed enterprises.

A native Rust extension (PyO3 + Rayon). Monte-Carlo forecasting, optimisation and calibration run in Rust with the GIL released. Each rollout derives its random stream from its run index, so results are the same however the threads get scheduled. I also benchmarked porting the event fold to Rust and dropped it, because restructuring the Python version won.

Release safety and operations. Prometheus and Grafana across the service and simulation paths, secrets in AWS Secrets Manager, feature flags for engine rollouts, and tenant isolation at the data-access layer. My favourite fix was a canary gate that had been shipped and reviewed but never actually ran, because it treated missing data as a pass. I added a traffic metric, fixed a Prometheus label bug, handled the 0/0 case, and proved the gate worked by deploying a deliberately broken image.

How I work

  • I'd rather make a mistake impossible than detect it later: declared ownership, derived ordering, pure functions.
  • I measure before I optimise, and I'll throw work away when the numbers say so.
  • When I fix a bug, I look for the rest of its kind. Ventute has a CI-checked list of bug classes for exactly this.

Standalone examples

Small, runnable versions of patterns from Ventute, with the domain logic taken out:

Stack

Area Tools
Languages Python 3.11 (async), Rust, C++, SQL, Java
Backend FastAPI, Pydantic v2, async SQLAlchemy, asyncpg, Alembic, GraphQL
Data PostgreSQL (Neon), Redis
Infrastructure Docker, Kubernetes, Terraform, Prometheus, Grafana, feature flags
Security gVisor sandboxing, supply-chain analysis, Semgrep, Trivy, Gitleaks, Sigstore

Background

  • Cambridge International A-Levels in Mathematics, Computer Science and Business
  • ITIS Informatico, technical informatics track (algorithms, data structures, low-level architecture, OOP)
  • University of Helsinki: Full Stack Open (grade 5/5), DevOps with Kubernetes, Java Programming I & II
  • Harvard CS50's Introduction to AI with Python
  • Saylor Academy CS107: C++ Programming

Pinned Loading

  1. deterministic-ai-guardrail deterministic-ai-guardrail Public

    A three-layer boundary that turns non-deterministic LLM output into deterministic, schema-validated, auditable state changes (Pydantic v2).

    Python

  2. event-driven-replay-kernel event-driven-replay-kernel Public

    A lightweight, domain-free async event-sourcing kernel with bit-exact, hash-verified state replay (Pydantic v2, in-memory + SQLite).

    Python

  3. pyo3-rust-py-bridge pyo3-rust-py-bridge Public

    A minimal PyO3 + rayon extension: GIL-free, multi-threaded CPU-bound compute callable from Python (parallel Monte-Carlo pi, ~1000x over naive Python).

    Python